[Distutils] msvccompiler clobbers LIB/INCLUDE vars
Thomas Heller
theller at python.net
Thu Jan 22 02:43:46 EST 2004
"Mark Hammond" <mhammond at skippinet.com.au> writes:
> I've recently noticed that msvccompiler clobbers the LIB and INCLUDE
> environment variables set in the environment. What happens is that
> distutils looks up the registry entries for the DevStudio include and lib
> file settings, then *sets* the LIB and INCLUDE environment with these
> values, ignoring any previous values.
It was decided in the early distutils development to prefer the registry
entries over env variables. Heck, most of my C/C++ developer collegues
*never* run *anything* from the command line, or even know about the
msvcvars.bat, vcvars32.bat, and vsvars32.bat batch files.
Given the amount of complaints we get here about this, maybe the
decision was wrong.
> It is quite common (for me anyway <wink>) to say something like:
> set LIB=%LIB%;c:\some_obscure_sdk\lib
> set INCLUDE=%INCLUDE%;c:\some_obscure_sdk\include
> make
>
> But if I try and use the same technique with distutils, these variable
> values are lost.
>
> It seems the *only* way I can add new paths that will work with distutils is
> via the DevStudio GUI, rather than these standard environment variables. Is
> that the intent? I understand we need to work when these variables are not
> set.
Can't you use the include_dirs and library_dirs arguments to the setup
function?
Thomas
More information about the Distutils-SIG
mailing list