Tarek Ziadé avatar Tarek Ziadé committed 3423f64

Merged revisions 69487 via svnmerge from
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
........
................

Comments (0)

Files changed (3)

Lib/distutils/sysconfig.py

             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:
                 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 "

Lib/distutils/tests/test_sysconfig.py

         # 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,
 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.