[IPython-user] readline and leopard revisited
Thu Jan 17 10:37:32 CST 2008
I just tried this and it works perfect. This is truly fantastic and
makes Leopard's Python usable. I will use this for a few days and if
things still look great, we should post this on the IPython website if
that is OK with you?
Thanks for tackling this persistent annoying issue.
On Jan 17, 2008 5: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