From bbccd649abc2d4cd646b9cc2c0889e3bd897e501 Mon Sep 17 00:00:00 2001 From: Michal Cyprian Date: Feb 24 2017 13:57:15 +0000 Subject: Revert "Set values of prefix and exec_prefix to /usr/local for..." - Prevent build failures of packages using alternate build tools - This reverts commit 24515db173c9d3d65e1e24fc29fb9be88227bf52 --- diff --git a/00251-set-python3-prefixes.patch b/00251-set-python3-prefixes.patch deleted file mode 100644 index c3043bf..0000000 --- a/00251-set-python3-prefixes.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/Lib/site.py b/Lib/site.py -index ad1033e..f2fb028 100644 ---- a/Lib/site.py -+++ b/Lib/site.py -@@ -537,6 +537,23 @@ def execusercustomize(): - (err.__class__.__name__, err)) - - -+def set_prefixes(): -+ """Set values of prefix and exec_prefix to /usr/local if executable is -+ /usr/bin/python* to make pip and distutils install into separate location. -+ -+ New value of sys.prefix is inserted to PREFIXES list that contains -+ it's previous value. Both paths /usr/lib/pythonX.Y/site-packages and -+ /usr/local/lib/pythonX.Y/site-packages will be included in sys.path. -+ """ -+ global PREFIXES -+ global ENABLE_USER_SITE -+ -+ if sys.executable.startswith("/usr/bin/python"): -+ sys.prefix = sys.exec_prefix = "/usr/local" -+ if ENABLE_USER_SITE: -+ PREFIXES.insert(0, sys.prefix) -+ -+ - def main(): - """Add standard site-specific directories to the module search path. - -@@ -550,6 +567,7 @@ def main(): - known_paths = venv(known_paths) - if ENABLE_USER_SITE is None: - ENABLE_USER_SITE = check_enableusersite() -+ set_prefixes() - known_paths = addusersitepackages(known_paths) - known_paths = addsitepackages(known_paths) - setquit() diff --git a/python3.spec b/python3.spec index 2ce5024..1599b60 100644 --- a/python3.spec +++ b/python3.spec @@ -124,7 +124,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.0 -Release: 18%{?dist} +Release: 19%{?dist} License: Python Group: Development/Languages @@ -410,11 +410,6 @@ Patch249: 00249-fix-out-of-tree-dtrace-builds.patch # http://bugs.python.org/issue29157 Patch250: 00250-getentropy.patch -# 00251 -# Set values of prefix and exec_prefix to /usr/local if executable is -# /usr/bin/python* to make pip and distutils install into separate location -Patch251: 00251-set-python3-prefixes.patch - # 00252 # Add executable option to install.py command to make it work for # scripts specified as an entry_points @@ -481,12 +476,6 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Obsoletes: python%{pyshortver} Provides: python%{pyshortver} = %{version}-%{release} -%if 0%{?_module_build} -Requires: system-python = %{version} -%else -Requires: system-python = %{version}-%{release} -%endif - %if 0%{with_rewheel} Requires: python3-setuptools Requires: python3-pip @@ -502,7 +491,7 @@ considerably, and a lot of deprecated features have finally been removed. Summary: Python 3 runtime libraries Group: Development/Libraries # For Modularity purpose we need not to include the dist-tag int he dependency -%if 0%{?_module_build} +%if %(d="%{?dist}"; [ "${d#module-base-runtime-}x" != "${d}x" ] && echo 1 || echo 0) Requires: system-python-libs%{?_isa} = %{version} %else Requires: system-python-libs%{?_isa} = %{version}-%{release} @@ -697,7 +686,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en %patch243 -p1 %patch249 -p1 %patch250 -p1 -%patch251 -p1 %patch252 -p1 %patch253 -p1 %patch254 -p1 @@ -1625,6 +1613,11 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Fri Feb 24 2017 Michal Cyprian - 3.6.0-19 +- Revert "Set values of prefix and exec_prefix to /usr/local for + /usr/bin/python* executables..." to prevent build failures + of packages using alternate build tools + * Tue Feb 21 2017 Michal Cyprian - 3.6.0-18 - Set values of prefix and exec_prefix to /usr/local for /usr/bin/python* executables