]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 69487 via svnmerge from
authorTarek Ziadé <ziade.tarek@gmail.com>
Tue, 10 Feb 2009 12:41:19 +0000 (12:41 +0000)
committerTarek Ziadé <ziade.tarek@gmail.com>
Tue, 10 Feb 2009 12:41:19 +0000 (12:41 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r69487 | tarek.ziade | 2009-02-10 13:36:33 +0100 (Tue, 10 Feb 2009) | 9 lines

  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
  ........
................

Lib/distutils/sysconfig.py
Lib/distutils/tests/test_sysconfig.py
Misc/NEWS

index b17743a8651768cbbdc4b8c260a5747a6be458a2..466194cd3fca7dcc7525bdc2275c970b3e99c304 100644 (file)
@@ -127,7 +127,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
             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:
             if standard_lib:
@@ -141,9 +141,9 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
                 return os.path.join(prefix, "Lib", "site-packages")
     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(
             "I don't know where Python installs its library "
index c6ab9aa5d59e8f4b6c63a8ab457777ec03d8b446..1934abaf960857a335178d1fa81156bb436506a0 100644 (file)
@@ -17,6 +17,8 @@ class SysconfigTestCase(unittest.TestCase):
         # 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,
index 747f4e0fd6e35b7a63e88bc5f8dcc5962471395f..22ce9c087ae5a82ee40736e8b8928fd84191c9ec 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -116,6 +116,9 @@ Core and Builtins
 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.
 
 - Partial fix to issue #1731706: memory leak in Tkapp_Call when calling