[Python-checkins] r69486 - in python/branches/release26-maint: Lib/distutils/sysconfig.py Lib/distutils/tests/test_sysconfig.py Misc/NEWS

tarek.ziade python-checkins at python.org
Tue Feb 10 13:33:42 CET 2009


Author: tarek.ziade
Date: Tue Feb 10 13:33:42 2009
New Revision: 69486

Log:
Merged revisions 69485 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69485 | tarek.ziade | 2009-02-10 13:31:09 +0100 (Tue, 10 Feb 2009) | 1 line
  
  Fixed #3386: the optional prefix argument was ignored under OS2 and NT in distutils.sysconfig.get_python_lib
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Lib/distutils/sysconfig.py
   python/branches/release26-maint/Lib/distutils/tests/test_sysconfig.py
   python/branches/release26-maint/Misc/NEWS

Modified: python/branches/release26-maint/Lib/distutils/sysconfig.py
==============================================================================
--- python/branches/release26-maint/Lib/distutils/sysconfig.py	(original)
+++ python/branches/release26-maint/Lib/distutils/sysconfig.py	Tue Feb 10 13:33:42 2009
@@ -129,7 +129,7 @@
             if get_python_version() < "2.2":
                 return prefix
             else:
-                return os.path.join(PREFIX, "Lib", "site-packages")
+                return os.path.join(prefix, "Lib", "site-packages")
 
     elif os.name == "mac":
         if plat_specific:
@@ -145,9 +145,9 @@
 
     elif os.name == "os2":
         if standard_lib:
-            return os.path.join(PREFIX, "Lib")
+            return os.path.join(prefix, "Lib")
         else:
-            return os.path.join(PREFIX, "Lib", "site-packages")
+            return os.path.join(prefix, "Lib", "site-packages")
 
     else:
         raise DistutilsPlatformError(

Modified: python/branches/release26-maint/Lib/distutils/tests/test_sysconfig.py
==============================================================================
--- python/branches/release26-maint/Lib/distutils/tests/test_sysconfig.py	(original)
+++ python/branches/release26-maint/Lib/distutils/tests/test_sysconfig.py	Tue Feb 10 13:33:42 2009
@@ -17,6 +17,8 @@
         # 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?
+        self.assertNotEqual(sysconfig.get_python_lib(),
+                            sysconfig.get_python_lib(prefix=TESTFN))
 
     def test_get_python_inc(self):
         # The check for srcdir is copied from Python's setup.py,

Modified: python/branches/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS	(original)
+++ python/branches/release26-maint/Misc/NEWS	Tue Feb 10 13:33:42 2009
@@ -80,6 +80,9 @@
 Library
 -------
 
+- Issue #3386: distutils.sysconfig.get_python_lib prefix argument was ignored
+  under NT and OS2. Patch by Philip Jenvey.
+
 - Issue #4890: Handle empty text search pattern in Tkinter.Text.search.
 
 - Issue #5170: Fixed Unicode output bug in logging and added test case.


More information about the Python-checkins mailing list