[Python-Dev] readline and setup.py
M.-A. Lemburg
mal@lemburg.com
Mon, 22 Jan 2001 11:42:52 +0100
"M.-A. Lemburg" wrote:
>
> The new setup.py procedure for Python causes readline not to
> be built on my machine. Instead I get a linker error telling
> me that termcap is not found.
>
> Looking at my old Setup file, I have this line:
>
> readline readline.c \
> -I/usr/include/readline -L/usr/lib/termcap \
> -lreadline -lterm
>
> I guess, setup.py should be modified to include additional
> library search paths -- shouldn't hurt on platforms which
> don't need them.
Here's a patch which works for me:
projects/Python> diff CVS-Python/setup.py Dev-Python/
--- CVS-Python/setup.py Mon Jan 22 11:36:56 2001
+++ Dev-Python/setup.py Mon Jan 22 11:40:15 2001
@@ -216,10 +216,11 @@ class PyBuildExt(build_ext):
exts.append( Extension('rgbimg', ['rgbimgmodule.c']) )
# readline
if (self.compiler.find_library_file(lib_dirs, 'readline')):
exts.append( Extension('readline', ['readline.c'],
+ library_dirs=['/usr/lib/termcap'],
libraries=['readline', 'termcap']) )
# The crypt module is now disabled by default because it breaks builds
# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
--
Marc-Andre Lemburg
______________________________________________________________________
Company: http://www.egenix.com/
Consulting: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/