Deutsch Open-Source Weblog Resources zopyx group 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

— abgelegt unter:

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

Testimonial

Since more than 5 Jahre we are using various open-source products of ZOPYX and ask Andreas Jung for his expertise in our of development projects.

Lars Walter, CEO, Novareto GmbH, Fürth

The Zope & Plone
Expert Network

 
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