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

— 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

Andreas Jung held a two-day hands-on training and workshop in our company. Due to his large knowledge in Zope we were able to proceed with our project faster and more efficient. He could answer all questions in details or delivered solutions to open problems immediately after the workshop. This laid the foundation for a good cooperation in the future.

Walter Streicher, Project leader, BG-Phoenics, Munich

 
ZOPYX Ltd. & Co. KG, 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