Ronald> You probably have to add the directory containing readline to
Ronald> the CFLAGS and LDFLAGS when running Python's configure, AFAIK
Ronald> setup.py doesn't automaticly look for readline in
Ronald> $prefix/{lib,include}.
Since readline is an extension module I think you want to specify this stuff
to distutils, e.g.:
% ./python.exe ../setup.py build_ext --help
Common commands: (see '--help-commands' for more)
setup.py build will build the package underneath 'build/'
setup.py install will install the package
Global options:
--verbose (-v) run verbosely (default)
--quiet (-q) run quietly (turns verbosity off)
--dry-run (-n) don't actually do anything
--help (-h) show detailed help message
Options for 'PyBuildExt' command:
--build-lib (-b) directory for compiled extension modules
--build-temp (-t) directory for temporary files (build by-products)
--inplace (-i) ignore build-lib and put compiled extensions into the
source directory alongside your pure Python modules
--include-dirs (-I) list of directories to search for header files
(separated by ':')
--define (-D) C preprocessor macros to define
--undef (-U) C preprocessor macros to undefine
--libraries (-l) external C libraries to link with
--library-dirs (-L) directories to search for external C libraries
(separated by ':')
--rpath (-R) directories to search for shared C libraries at
runtime
--link-objects (-O) extra explicit link objects to include in the link
...
which suggests something like
./python.exe setup.py build_ext --include-dirs=/sw/include
--library-dirs=/sw/lib
I have fink installed, hence the references to /sw/...
As proof for the OP that it can be done:
% python
Python 2.6a0 (trunk:52571, Oct 31 2006, 20:49:22)
[GCC 4.0.0 (Apple Computer, Inc. build 5026)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
>>> readline.__file__
'/Users/skip/local/lib/python2.6/lib-dynload/readline.so'
% otool -L /Users/skip/local/lib/python2.6/lib-dynload/readline.so
/Users/skip/local/lib/python2.6/lib-dynload/readline.so:
/sw/lib/libreadline.4.dylib (compatibility version 4.2.0, current
version 4.3.0)
/sw/lib/ncurses/libncurses.5.dylib (compatibility version 5.0.0,
current version 5.0.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current
version 93.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.1.7)
Skip
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig