Deutsch Open-Source Weblog Resources Imprint

Python, Zope, Plone — Development and Consulting

What can we do for you?

Your contact
Andreas Jung will assist you. Please call
+49(0)70 71/79 33 76

Or use our Callback service

Compiling readline support for Python on MacOSX

Since ages it has been impossible to build Python from the sources with readline support out-of-the-box. The reason seems to be an outdated or broken version of libreadline that ships with MacOSX. To resolve this issue you have to install Darwinports and install readline from the sources. However configure won't pick up this installation automatically. Usually it is sufficient to specify the location of additional header files and libraries through the CFLAGS and LDFLAGS environment variables however that also did not work. I ended up hacking the generated Makefile. After modifiying the CC definition to

CC = gcc -I/opt/local/include -L/opt/local/lib

I was able to compile and install Python 2.4 and 2.5 with working readline support. It's a hack - but a hack that actually works.


Update for Leopard:
  • after running configure you have to edit setup.py
  • search for "if do_readline:" 
  • add do_readline = True before the if-statement

Artikelaktionen

Kundenstimme

Für die Webrepräsentation der Gruppen und wissenschaftlichen Projekte am Friedrich-Miescher-Laboratorium setzen wir seit 2005 auf Plone.

Dank Andreas Jungs Expertise konnten auch komplexe Plone-Migrationen in kürzester Zeit abgeschlossen und Plone-Produkte optimal an unsere Bedürfnisse angepasst werden.

Gunnar Rätsch, Gruppenleiter, Friedrich-Miescher-Laboratorium der Max-Planck-Gesellschaft

 
ZOPYX Ltd., Charlottenstr. 37/1, D-72070 Tübingen, Germany
Phone +49(0)70 71/79 33 76, Fax +49(0)70 71/7 93 68 40, Email: info@zopyx.com
Contact form Callback service Print page