[Python-bugs-list] [ python-Bugs-567605 ] setup.py ignores env and uses wrong libs

noreply@sourceforge.net noreply@sourceforge.net
Thu, 13 Jun 2002 09:33:13 -0700


Bugs item #567605, was opened at 2002-06-11 15:23
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=567605&group_id=5470

Category: Build
Group: Python 2.2.1
Status: Closed
Resolution: Wont Fix
Priority: 5
Submitted By: Marc Lehmann (pcg)
Assigned to: Nobody/Anonymous (nobody)
Summary: setup.py ignores env and uses wrong libs

Initial Comment:
tcl/tk and lot's of other libs reside in /opt/lib and
/opt/include on my system. CPPFLAGS and LDFLAGS reflect
this. python doesn't find anything in /opt, though, as
setup.py completely ignores this.

To debug this, I added a print libdirs after the line:

        lib_dirs = self.compiler.library_dirs +
['/lib', '/usr/lib']

and found that "lib_dirs" contains "/usr/local/lib",
which is completely bogus (but not wrong) (prefix is
/opt/python, my compiler doesn't search for /usr/local
etc.), "/lib" and "/usr/lib".

My system:

linux (2.4), glibc-2.2.5, every package is in
/opt/packagename, symlinked to common subdirs in
/opt/lib etc,,

LDFLAGS=-L/usr/app/lib -L/opt/lib
CPPFLAGS=-I/usr/app/include -I/opt/include
CFLAGS=-O3 -g -pipe -march=pentium -mcpu=pentiumpro
-momit-leaf-frame-pointer



----------------------------------------------------------------------

>Comment By: Skip Montanaro (montanaro)
Date: 2002-06-13 11:33

Message:
Logged In: YES 
user_id=44345

I believe if you set LIBDIR and INCLUDEDIR environment 
variables you can coax setup.py into looking in alternate 
directories for libraries and include files, respectively.

Distutils should probably be modified to allow either to be a 
colon-separated list of directories.  I think you are restricted 
to a single directory for each at the moment.  Also, the 
names are a bit generic.  Perhaps something more 
Python-specific would be better.

Skip


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-06-13 08:41

Message:
Logged In: YES 
user_id=21627

Ok, closing the report.

----------------------------------------------------------------------

Comment By: Marc Lehmann (pcg)
Date: 2002-06-13 07:51

Message:
Logged In: YES 
user_id=8851

On my system it obviously doesn't detect the configuration
(see env-variables, which are ignored etc.). But it's your
bug, not my bug. If you don't care to fix then I feel fine
;->

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-06-13 07:45

Message:
Logged In: YES 
user_id=21627

autoconf is used to aid portability of the interpreter
proper, and certain core modules; not for general
integration of all extension modules (like _tkinter).

The documentation you quote is correct: configure does
determine your system configuration and creates the Makefile.

----------------------------------------------------------------------

Comment By: Marc Lehmann (pcg)
Date: 2002-06-13 06:51

Message:
Logged In: YES 
user_id=8851

If this is expected behaviour, then why does python come
with a configure script at all? I find it confusing when a
software package imitates a common standard (autoconf) and
then doesn't really implement it.

In any case, if it isn't a sofwtare bug then it's a
documentation bug, as the README claims:

   Start by running the script "./configure", which
determines your
   system configuration and creates the Makefile

which is clearly not the case, as it would be with any other
software package.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-06-11 15:28

Message:
Logged In: YES 
user_id=21627

I don't think this is a bug. If you use a certain
configuration not supported by setup.py, you need to edit
Modules/Setup manually.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=567605&group_id=5470