diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-10 12:36:33 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-10 12:36:33 (GMT) |
commit | 7d5e9879e6ef1daadcb13c28b79e8a70b76c8e83 (patch) | |
tree | 04e422778018f864e37eef6c028409d6231b4818 /Lib | |
parent | a86f2c06fd08e8aebf3641c1ad2d234425b90c55 (diff) | |
download | cpython-7d5e9879e6ef1daadcb13c28b79e8a70b76c8e83.zip cpython-7d5e9879e6ef1daadcb13c28b79e8a70b76c8e83.tar.gz cpython-7d5e9879e6ef1daadcb13c28b79e8a70b76c8e83.tar.bz2 |
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
........
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/sysconfig.py | 6 | ||||
-rw-r--r-- | Lib/distutils/tests/test_sysconfig.py | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index a3ef3f6..fbeb45f 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -130,7 +130,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: @@ -144,9 +144,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 " diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py index af6f183..1e9dbd5 100644 --- a/Lib/distutils/tests/test_sysconfig.py +++ b/Lib/distutils/tests/test_sysconfig.py @@ -26,6 +26,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): inc_dir = sysconfig.get_python_inc() |