Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r90695:b517a201935d
Date: 2017-03-15 12:01 +0100
http://bitbucket.org/pypy/pypy/changeset/b517a201935d/
Log: Copy more closely the logic of sysconfig_cpython.py. Fix for the
'venv' standard module on pypy3.
diff --git a/lib-python/3/distutils/sysconfig_pypy.py
b/lib-python/3/distutils/sysconfig_pypy.py
--- a/lib-python/3/distutils/sysconfig_pypy.py
+++ b/lib-python/3/distutils/sysconfig_pypy.py
@@ -19,13 +19,16 @@
PREFIX = os.path.normpath(sys.prefix)
EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+BASE_PREFIX = os.path.normpath(sys.base_prefix)
+BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
project_base = os.path.dirname(os.path.abspath(sys.executable))
python_build = False
def get_python_inc(plat_specific=0, prefix=None):
- from os.path import join as j
- return j(sys.prefix, 'include')
+ if prefix is None:
+ prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
+ return os.path.join(prefix, 'include')
def get_python_version():
"""Return a string containing the major and minor Python version,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit