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

tarek.ziade python-checkins at python.org
Tue Feb 10 13:31:09 CET 2009


Author: tarek.ziade
Date: Tue Feb 10 13:31:09 2009
New Revision: 69485
Log:
Fixed #3386: the optional prefix argument was ignored under OS2 and NT in distutils.sysconfig.get_python_lib
Modified:
 python/trunk/Lib/distutils/sysconfig.py
 python/trunk/Lib/distutils/tests/test_sysconfig.py
 python/trunk/Misc/NEWS
Modified: python/trunk/Lib/distutils/sysconfig.py
==============================================================================
--- python/trunk/Lib/distutils/sysconfig.py	(original)
+++ python/trunk/Lib/distutils/sysconfig.py	Tue Feb 10 13:31:09 2009
@@ -132,7 +132,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:
@@ -148,9 +148,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/trunk/Lib/distutils/tests/test_sysconfig.py
==============================================================================
--- python/trunk/Lib/distutils/tests/test_sysconfig.py	(original)
+++ python/trunk/Lib/distutils/tests/test_sysconfig.py	Tue Feb 10 13:31:09 2009
@@ -26,6 +26,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):
 inc_dir = sysconfig.get_python_inc()
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Tue Feb 10 13:31:09 2009
@@ -152,6 +152,9 @@
 Library
 -------
 
+- Issue #3386: distutils.sysconfig.get_python_lib prefix argument was ignored
+ under NT and OS2. Patch by Philip Jenvey.
+
 - Issue #5128: Make compileall properly inspect bytecode to determine if needs
 to be recreated. This avoids a timing hole thanks to the old reliance on the
 ctime of the files involved.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /