Compiling readline 5.0 on OS X
Since Python on Tiger (and also Panther) is missing full readline support, we need to build readline ourselves and rebuild Python.
To build readline on Tiger follow the normal configure/make/install dance, with one exception:
curl ftp://ftp.gnu.org/gnu/readline/readline-5.0.tar.gz tar xzf readline-5.0.tar.gz cd readline-5.0 ./configureOn Tiger you need to do the following extra step:
cd shlib mv Makefile Makefile.backup sed -e 's/-dynamic/-dynamiclib/' Makefile.backup > Makefile cd ..Now run make then install it to the /usr/local directory – which you should already have or will have created.
make sudo make installAn optional step is to move the current libreadline out of the way and symlink to our newly built version:
sudo rm /usr/lib/libreadline* sudo ln -s /usr/local/lib/libreadline* /usr/lib/On Panther you will most likely not see libreadline at all and on Tiger it will be a symlink to /usr/lib/libedit.dylib.
That’s all it takes to get some GNU readline love on OS X :)
Tags:

