diff options
| author | Alexandru Ardelean <ardeleanalex@gmail.com> | 2021-11-22 10:28:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-22 10:28:29 +0200 |
| commit | 40ca2f6dd60c660043b5e994794b1163d50d8dc3 (patch) | |
| tree | 19457088f06f87a19ed60c91fb540cb9729d5b26 /lang/python/python3/patches/008-distutils-use-python-sysroot.patch | |
| parent | 30007d380466b76a6f8ea3dbbdc1fa2c9d1704a6 (diff) | |
| parent | 4e05541782edeb06b51d691dadf52648df24c940 (diff) | |
Merge pull request #17121 from commodo/python3-bump
python3: bump to version 3.10.0
Diffstat (limited to 'lang/python/python3/patches/008-distutils-use-python-sysroot.patch')
| -rw-r--r-- | lang/python/python3/patches/008-distutils-use-python-sysroot.patch | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lang/python/python3/patches/008-distutils-use-python-sysroot.patch b/lang/python/python3/patches/008-distutils-use-python-sysroot.patch index f218c46d5..26f22d7df 100644 --- a/lang/python/python3/patches/008-distutils-use-python-sysroot.patch +++ b/lang/python/python3/patches/008-distutils-use-python-sysroot.patch @@ -17,7 +17,7 @@ third-party Python modules. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- Lib/distutils/command/build_ext.py | 5 ++++- - Lib/distutils/sysconfig.py | 15 +++++++++++---- + Lib/sysconfig.py | 15 +++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) --- a/Lib/distutils/command/build_ext.py @@ -34,27 +34,27 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> else: # building python standard extensions self.library_dirs.append('.') ---- a/Lib/distutils/sysconfig.py -+++ b/Lib/distutils/sysconfig.py -@@ -17,10 +17,17 @@ import sys - from .errors import DistutilsPlatformError - - # These are needed in a couple of spots, so just compute them once. --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) +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -123,10 +123,17 @@ _SCHEME_KEYS = ('stdlib', 'platstdlib', + _PY_VERSION = sys.version.split()[0] + _PY_VERSION_SHORT = f'{sys.version_info[0]}.{sys.version_info[1]}' + _PY_VERSION_SHORT_NO_DOT = f'{sys.version_info[0]}{sys.version_info[1]}' +-_PREFIX = os.path.normpath(sys.prefix) +-_BASE_PREFIX = os.path.normpath(sys.base_prefix) +-_EXEC_PREFIX = os.path.normpath(sys.exec_prefix) +-_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) +if "_python_sysroot" in os.environ: + _sysroot=os.environ.get('_python_sysroot') -+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) -+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) -+ BASE_PREFIX = PREFIX -+ BASE_EXEC_PREFIX = EXEC_PREFIX ++ _PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) ++ _EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) ++ _BASE_PREFIX = _PREFIX ++ _BASE_EXEC_PREFIX = _EXEC_PREFIX +else: -+ 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) ++ _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) + _CONFIG_VARS = None + _USER_BASE = None - # Path to the base directory of the project. On Windows the binary may - # live in project/PCbuild/win32 or project/PCbuild/amd64. |
