mirror of https://github.com/python/cpython
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 ........
This commit is contained in:
parent
a86f2c06fd
commit
7d5e9879e6
|
@ -130,7 +130,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
||||||
if get_python_version() < "2.2":
|
if get_python_version() < "2.2":
|
||||||
return prefix
|
return prefix
|
||||||
else:
|
else:
|
||||||
return os.path.join(PREFIX, "Lib", "site-packages")
|
return os.path.join(prefix, "Lib", "site-packages")
|
||||||
elif os.name == "mac":
|
elif os.name == "mac":
|
||||||
if plat_specific:
|
if plat_specific:
|
||||||
if standard_lib:
|
if standard_lib:
|
||||||
|
@ -144,9 +144,9 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
||||||
return os.path.join(prefix, "Lib", "site-packages")
|
return os.path.join(prefix, "Lib", "site-packages")
|
||||||
elif os.name == "os2":
|
elif os.name == "os2":
|
||||||
if standard_lib:
|
if standard_lib:
|
||||||
return os.path.join(PREFIX, "Lib")
|
return os.path.join(prefix, "Lib")
|
||||||
else:
|
else:
|
||||||
return os.path.join(PREFIX, "Lib", "site-packages")
|
return os.path.join(prefix, "Lib", "site-packages")
|
||||||
else:
|
else:
|
||||||
raise DistutilsPlatformError(
|
raise DistutilsPlatformError(
|
||||||
"I don't know where Python installs its library "
|
"I don't know where Python installs its library "
|
||||||
|
|
|
@ -26,6 +26,8 @@ class SysconfigTestCase(unittest.TestCase):
|
||||||
# XXX doesn't work on Linux 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)
|
#self.assert_(os.path.isdir(lib_dir), lib_dir)
|
||||||
# test for pythonxx.lib?
|
# test for pythonxx.lib?
|
||||||
|
self.assertNotEqual(sysconfig.get_python_lib(),
|
||||||
|
sysconfig.get_python_lib(prefix=TESTFN))
|
||||||
|
|
||||||
def test_get_python_inc(self):
|
def test_get_python_inc(self):
|
||||||
inc_dir = sysconfig.get_python_inc()
|
inc_dir = sysconfig.get_python_inc()
|
||||||
|
|
|
@ -163,6 +163,9 @@ Core and Builtins
|
||||||
Library
|
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
|
- 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
|
to be recreated. This avoids a timing hole thanks to the old reliance on the
|
||||||
ctime of the files involved.
|
ctime of the files involved.
|
||||||
|
|
Loading…
Reference in New Issue