Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(31456)

Unified Diff: Lib/distutils/sysconfig.py

Issue 17086: backport cross-build patches to the 2.7 branch
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « configure.ac ('k') | Lib/distutils/util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/distutils/sysconfig.py Tue Jan 29 22:59:02 2013 +0000
+++ b/Lib/distutils/sysconfig.py Thu Jan 31 00:03:23 2013 +0100
@@ -37,6 +37,11 @@
project_base = os.path.abspath(os.path.join(project_base, os.path.pardir,
os.path.pardir))
+# set for cross builds
+if "_PYTHON_PROJECT_BASE" in os.environ:
+ # this is the build directory, at least for posix
+ project_base = os.path.normpath(os.environ["_PYTHON_PROJECT_BASE"])
+
# python_build: (Boolean) if true, we're either building Python or
# building an extension with an un-installed Python, so we use
# different (hard-wired) directories.
@@ -244,7 +249,7 @@
def get_makefile_filename():
"""Return full pathname of installed Makefile from the Python build."""
if python_build:
- return os.path.join(os.path.dirname(sys.executable), "Makefile")
+ return os.path.join(project_base, "Makefile")
lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
return os.path.join(lib_dir, "config", "Makefile")
« no previous file with comments | « configure.ac ('k') | Lib/distutils/util.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+