diff options
author | Georg Brandl <georg@python.org> | 2007-03-13 10:19:35 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-03-13 10:19:35 (GMT) |
commit | 74fb2114455e73bc4ce9c384ee599db24ba95b3f (patch) | |
tree | 319c0b751430aa3db0e71273e85bf5f8a48d1273 /Lib | |
parent | 6cdcdbcdaad14351d392888403419f5a3204b1a3 (diff) | |
download | cpython-74fb2114455e73bc4ce9c384ee599db24ba95b3f.zip cpython-74fb2114455e73bc4ce9c384ee599db24ba95b3f.tar.gz cpython-74fb2114455e73bc4ce9c384ee599db24ba95b3f.tar.bz2 |
Patch #1569798: fix a bug in distutils when building Python from a
directory within sys.exec_prefix.
(backport from rev. 54331)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 542b77a..82474de 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -186,7 +186,7 @@ class build_ext (Command): # for extensions under Cygwin and AtheOS Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos': - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + get_python_version(), @@ -199,7 +199,7 @@ class build_ext (Command): # Python's library directory must be appended to library_dirs if (sys.platform.startswith('linux') or sys.platform.startswith('gnu')) \ and sysconfig.get_config_var('Py_ENABLE_SHARED'): - if string.find(sys.executable, sys.exec_prefix) != -1: + if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: |