[IPython-user] readline and leopard revisited
Thu Jan 17 13:29:58 CST 2008
This works beautifully for me as well. Now that the system python is
fully useable, I don't see any reason not to stick with it. I'll
update the IPython wiki (InstallationOSXLeopard). Can we host the egg
on the scipy.org server somewhere (or upload to PyPI)? If not, I'll
put it on our server. We can update the InstallationOSXLeopard page
again with that link when it's available.
On Jan 17, 2008 4:37 AM, Ludwig Schwardt <email@example.com> wrote:
> After a few useful hints from Ville and a Japanese forum
> I reworked my readline extension build process. It now builds a
> statically linked extension module which is installed as a Python egg.
> It seems to work with the system-installed Python 2.5.1 on Leopard
> 10.5.1. IPython 0.8.1 correctly picks up the new version, and now has
> tab completion and ctrl-r search.
> I attach a "lite" version of the extension - just unpack, add
> readline-5.2.tar.gz from somewhere, and run ./build.sh. A full version
> could be sent on request, which includes the readline tarball for
> about 2MB extra. Both versions include all recent readline patches.
> Especially patch 12 is relevant, as this fixes configure support for
> Leopard. The build script contains some commented-out lines for
> enabling a 4-way universal build based on the 10.5 SDK, like the rest
> of the system Python (not required, it seems).
> Ville: You spotted the correct reason for my troubles - I was being
> too clever and ended up linking against the system readline instead of
> the real one, leading to some insidious behaviour...
> Enjoy and let me know of any problems.
> P.S. If you don't like eggs, it is reasonably straightforward to fix:
> 1. Unpack pyreadline-2.5.1.tar.gz
> 2. In pyreadline-2.5.1/setup.py, change the 3 lines:
> import ez_setup
> from setuptools import setup, Extension
> from distutils.core import setup, Extension
> Also comment out the second-last line:
> 3. Recreate the tarball and run ./build.sh, which now installs to site-packages.
> 4. Add a file 'sitecustomize.py' to site-packages, which contains
> (change the path to something appropriate):
> import imp
> imp.load_dynamic('readline', '/Library/Python/2.5/site-packages/readline.so')
> IPython-user mailing list
More information about the IPython-user