[Python-checkins] r59511 - in python/trunk/Lib/distutils: sysconfig.py tests/test_sysconfig.py

christian.heimes python-checkins at python.org
Sat Dec 15 00:42:37 CET 2007


Author: christian.heimes
Date: Sat Dec 15 00:42:36 2007
New Revision: 59511

Modified:
   python/trunk/Lib/distutils/sysconfig.py
   python/trunk/Lib/distutils/tests/test_sysconfig.py
Log:
Fixed bug #1628
The detection now works on Unix with Makefile, Makefile with VPATH and on Windows.

Modified: python/trunk/Lib/distutils/sysconfig.py
==============================================================================
--- python/trunk/Lib/distutils/sysconfig.py	(original)
+++ python/trunk/Lib/distutils/sysconfig.py	Sat Dec 15 00:42:36 2007
@@ -31,8 +31,10 @@
 # python_build: (Boolean) if true, we're either building Python or
 # building an extension with an un-installed Python, so we use
 # different (hard-wired) directories.
-python_build = os.path.isfile(os.path.join(project_base, "Modules",
-                                           "Setup.local"))
+# Setup.local is available for Makefile builds including VPATH builds,
+# Setup.dist is available on Windows
+python_build = any(os.path.isfile(os.path.join(project_base, "Modules", fn))
+                   for fn in ("Setup.dist", "Setup.local"))
 
 
 def get_python_version():

Modified: python/trunk/Lib/distutils/tests/test_sysconfig.py
==============================================================================
--- python/trunk/Lib/distutils/tests/test_sysconfig.py	(original)
+++ python/trunk/Lib/distutils/tests/test_sysconfig.py	Sat Dec 15 00:42:36 2007
@@ -15,7 +15,7 @@
 
     def test_get_python_lib(self):
         lib_dir = sysconfig.get_python_lib()
-        # XXX doesn't work on Inux when Python was never installed before
+        # XXX doesn't work on Linux when Python was never installed before
         #self.assert_(os.path.isdir(lib_dir), lib_dir)
         # test for pythonxx.lib?
 


More information about the Python-checkins mailing list