[ python-Bugs-1569886 ] distutils don't respect standard env variables

SourceForge.net noreply at sourceforge.net
Tue Oct 3 15:02:53 CEST 2006


Bugs item #1569886, was opened at 2006-10-03 12:59
Message generated for change (Comment added) made by luks
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1569886&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils
Group: Python 2.5
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Lukas Lalinsky (luks)
Assigned to: Nobody/Anonymous (nobody)
Summary: distutils don't respect standard env variables

Initial Comment:
Using environment variables INCLUDE and LIB is a
standard way to set system-wide paths for C compilers.
However distutils.msvccompiler always overwrites these
variables with it's own values, which means users have
no way to customize their MSVC setups. It should
*append* the Python-specific stuff to the variables,
not overwrite them.

--- msvccompiler.py.orig	2006-10-03 12:56:15.812500000
+0200
+++ msvccompiler.py	2006-10-03 12:56:22.718750000 +0200
@@ -635,4 +635,7 @@
         else:
             p = self.get_msvc_paths(name)
         if p:
-            os.environ[name] = string.join(p, ';')
+            p = string.join(p, ';')
+            if name in os.environ:
+                p = os.environ[name] + ';' + p
+            os.environ[name] = p


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

>Comment By: Lukas Lalinsky (luks)
Date: 2006-10-03 15:02

Message:
Logged In: YES 
user_id=587716

Oh, I didn't know about this. Thank you.

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

Comment By: Martin v. Löwis (loewis)
Date: 2006-10-03 14:50

Message:
Logged In: YES 
user_id=21627

This bug was fixed in Python 2.5. If the environment
variables MSSdk and DISTUTILS_USE_SDK are set, then
distutils doesn't attempt to overwrite LIB or INCLUDE.

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

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


More information about the Python-bugs-list mailing list