summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-03-13 10:19:22 (GMT)
committerGeorg Brandl <georg@python.org>2007-03-13 10:19:22 (GMT)
commit18c47f6a3b3cc848dc2fc09329954378e483dce1 (patch)
treec2d4986af4e762757655b385ea5770fbcfb4501f
parentb6a87542b301e54872807940f71c06be9f03f990 (diff)
downloadcpython-18c47f6a3b3cc848dc2fc09329954378e483dce1.zip
cpython-18c47f6a3b3cc848dc2fc09329954378e483dce1.tar.gz
cpython-18c47f6a3b3cc848dc2fc09329954378e483dce1.tar.bz2
Patch #1569798: fix a bug in distutils when building Python from a
directory within sys.exec_prefix.
-rw-r--r--Lib/distutils/command/build_ext.py4
-rw-r--r--Misc/NEWS3
2 files changed, 5 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:
diff --git a/Misc/NEWS b/Misc/NEWS
index 605d9b5..fa17fb9 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -646,6 +646,9 @@ Tools/Demos
Build
-----
+- Patch #1569798: fix a bug in distutils when building Python from a
+ directory within sys.exec_prefix.
+
- Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
- Disable _XOPEN_SOURCE on NetBSD 1.x.