[Distutils] Why doesn't distutils respect the INCLUDE/LIB environment variable (MSVC)?

Paul Moore gustav@morpheus.demon.co.uk
Sun Jul 15 08:41:00 2001


I'm trying to build an extension (Imaging) which depends on a number of =
external
libraries (JPEG, Zlib, Tk). Rather than hard code the locations of the =
libraries
in the setup.py, I set my INCLUDE and LIB environment variables so that =
MSVC
picks up the libraries automatically. Unfortunately, this doesn't seem to=
 work
properly, as distutils ignores these variables! Checking in the source, I=
 see
that this is deliberate (see get_msvc_paths and set_path_env_var in
msvccompiler.py).

I don't believe that this decision is correct - it leaves the user no =
way, short
of modifying the registry manually, to add include/library directories to=
 the
standard paths. So manually hacking setup.py becomes a necessity.

Can I suggest that msvccompiler.py *adds* the current entries to INCLUDE =
and
LIB, rather than replacing those variables completely. Or at least, that =
another
way of including include/library directories external to setup.py be
available...

Thanks,
Paul.