[Python-Dev] setup.py is too aggressive

Martin von Loewis loewis@informatik.hu-berlin.de
Sat, 24 Mar 2001 13:02:53 +0100 (MET)


> It seems to me setup.py tries to build libraries even when it's
> impossible E.g., I had to add the patch attached so I will get no
> more ImportErrors where the module shouts at me that it could not
> find a symbol.

The more general problem here is that building of a module may fail:
Even if a library is detected correctly, it might be that additional
libraries are needed. In some cases, it helps to put the correct
module line into Modules/Setup (which would have helped in your case);
then setup.py will not attempt to build the module.

However, there may be cases where a module cannot be build at all:
either some libraries are missing, or the module won't work on the
system for some other reason (e.g. since the system library it relies
on has some bug).

There should be a mechanism to tell setup.py not to build a module at
all. Since it is looking into Modules/Setup anyway, perhaps a

*excluded*
dbm

syntax in Modules/Setup would be appropriate? Of course, makesetup
needs to be taught such a syntax. Alternatively, an additional
configuration file or command line options might work.

In any case, distributors are certainly advised to run the testsuite
and potentially remove or fix modules for which the tests fail.

Regards,
Martin