From 95668bdbb2159a95132df13cb8e78dc6406fabaa Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Fri, 30 May 2014 11:52:51 +0200 Subject: [PATCH 1/8] Add explanation of the bootstraping process --- python3.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/python3.spec b/python3.spec index aad4eaa..7bc69d4 100644 --- a/python3.spec +++ b/python3.spec @@ -2,6 +2,18 @@ # Conditionals and other variables controlling the build # ====================================================== +# NOTES ON BOOTSTRAPING PYTHON 3.4: +# +# Due to dependency cycle between Python, pip, setuptools and +# wheel caused by the rewheel patch, one has to build in the +# following order: +# +# 1) python3 with with_rewheel set to 0 +# 2) python3-setuptools and python3-pip with with_rewheel set to 0 +# 3) python3-wheel +# 4) python3-setuptools and python3-pip with with_rewheel set to 1 +# 5) python3 with with_rewheel set to 1 + %global with_rewheel 1 %global pybasever 3.4 From 1014fca077e1a1a399c3718553afd5cc1d24ab9a Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Tue, 3 Jun 2014 22:28:46 +0200 Subject: [PATCH 2/8] Change paths to bundled projects in rewheel patch --- 00189-add-rewheel-module.patch | 6 +++--- python3.spec | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/00189-add-rewheel-module.patch b/00189-add-rewheel-module.patch index b3804b8..ddb39f9 100644 --- a/00189-add-rewheel-module.patch +++ b/00189-add-rewheel-module.patch @@ -21,7 +21,7 @@ unchanged: pip.main(args) -@@ -87,20 +90,40 @@ def bootstrap(*, root=None, upgrade=Fals +@@ -87,20 +90,39 @@ def bootstrap(*, root=None, upgrade=Fals # omit pip and easy_install os.environ["ENSUREPIP_OPTIONS"] = "install" @@ -50,9 +50,9 @@ unchanged: - whl = pkgutil.get_data( + whl = os.path.join( + os.path.dirname(__file__), - "ensurepip", +- "ensurepip", - "_bundled/{}".format(wheel_name), -+ "bundled", ++ "_bundled", + "{}-{}-py2.py3-none-any.whl".format(project, version) ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: diff --git a/python3.spec b/python3.spec index 7bc69d4..622890c 100644 --- a/python3.spec +++ b/python3.spec @@ -140,7 +140,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.1 -Release: 8%{?dist} +Release: 9%{?dist} License: Python Group: Development/Languages @@ -1853,6 +1853,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Tue Jun 03 2014 Matej Stuchlik - 3.4.1-9 +- Change paths to bundled projects in rewheel patch + * Fri May 30 2014 Miro Hrončok - 3.4.1-8 - In config script, use uname -m to write the arch From cb99f9f0e58934179176280671dbda223a5c2c65 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Wed, 4 Jun 2014 23:16:38 +0200 Subject: [PATCH 3/8] bump release and rebuild to link with the correct tcl/tk libs on ppcle --- python3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index 622890c..e154bee 100644 --- a/python3.spec +++ b/python3.spec @@ -140,7 +140,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.1 -Release: 9%{?dist} +Release: 10%{?dist} License: Python Group: Development/Languages @@ -1853,6 +1853,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Wed Jun 04 2014 Karsten Hopp 3.4.1-10 +- bump release and rebuild to link with the correct tcl/tk libs on ppcle + * Tue Jun 03 2014 Matej Stuchlik - 3.4.1-9 - Change paths to bundled projects in rewheel patch From a292e5b2122f0082a73d677659f5c111ecbb6ad0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 19:38:08 -0500 Subject: [PATCH 4/8] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- python3.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python3.spec b/python3.spec index e154bee..867c42d 100644 --- a/python3.spec +++ b/python3.spec @@ -140,7 +140,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.1 -Release: 10%{?dist} +Release: 11%{?dist} License: Python Group: Development/Languages @@ -1853,6 +1853,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 3.4.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Wed Jun 04 2014 Karsten Hopp 3.4.1-10 - bump release and rebuild to link with the correct tcl/tk libs on ppcle From 9012997174030631046c5489f87c2341f07a1758 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 8 Jun 2014 16:27:22 +0100 Subject: [PATCH 5/8] aarch64 has valgrind, just list those that don't support it with a ifnarch --- python3.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python3.spec b/python3.spec index 867c42d..2596e4f 100644 --- a/python3.spec +++ b/python3.spec @@ -71,7 +71,7 @@ %global with_systemtap 1 # some arches don't have valgrind so we need to disable its support on them -%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 s390x %{arm} +%ifnarch s390 ppc64le %global with_valgrind 1 %else %global with_valgrind 0 @@ -140,7 +140,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.1 -Release: 11%{?dist} +Release: 12%{?dist} License: Python Group: Development/Languages @@ -1853,6 +1853,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Sun Jun 8 2014 Peter Robinson 3.4.1-12 +- aarch64 has valgrind, just list those that don't support it + * Sun Jun 08 2014 Fedora Release Engineering - 3.4.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 95a55939d74997721acfb6e9b190a815c3e41fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 30 Jun 2014 18:53:45 +0200 Subject: [PATCH 6/8] Rewrite the config wrapper from Bash to Python, so it can be interpreted with Python --- config.py | 9 +++++++++ python3.spec | 15 +++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 config.py diff --git a/config.py b/config.py new file mode 100644 index 0000000..964d5d9 --- /dev/null +++ b/config.py @@ -0,0 +1,9 @@ +#!/bin/python3 +import sys +import subprocess +ver = sys.version[:3] +arch = subprocess.check_output('uname -m'.split()).decode("utf-8").rstrip() +call = ['python{ver}m-{arch}-config'.format(ver=ver, arch=arch)] + sys.argv[1:] +retval = subprocess.call(call) +if retval == 127: + print('Could not find python{ver}m-{arch}-config. Look around to see available arches.'.format(ver=ver, arch=arch), file=sys.stderr) diff --git a/python3.spec b/python3.spec index 2596e4f..e956ab5 100644 --- a/python3.spec +++ b/python3.spec @@ -140,7 +140,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.1 -Release: 12%{?dist} +Release: 13%{?dist} License: Python Group: Development/Languages @@ -243,6 +243,9 @@ Source7: pyfuntop.stp # Written by bkabrda Source8: check-pyc-and-pyo-timestamps.py +# Python wrapper arounf pythonXXm-config to be able to keep python3-devel multiarch +Source9: config.py + # Fixup distutils/unixccompiler.py to remove standard library path from rpath: # Was Patch0 in ivazquez' python3000 specfile: Patch1: Python-3.1.1-rpath.patch @@ -1381,11 +1384,8 @@ sed \ # Rename the script that differs on different arches to arch specific name mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config -echo -e '#!/bin/sh\nexec `dirname $0`/python%{LDVERSION_optimized}-`uname -m`-config "$@"' > \ - %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config -echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_optimized}-`uname -m`-config. Look around to see available arches." >&2' >> \ - %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config - chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config +cp %{SOURCE9} %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config +chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config # ====================================================== # Running the upstream test suite @@ -1853,6 +1853,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Mon Jun 30 2014 Miro Hrončok - 3.4.1-13 +- Rewrite the config wrapper from Bash to Python, so it can be interpreted with Python + * Sun Jun 8 2014 Peter Robinson 3.4.1-12 - aarch64 has valgrind, just list those that don't support it From 41a68301c70978d906d1b08d4aaa85337d1de3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 30 Jun 2014 19:11:22 +0200 Subject: [PATCH 7/8] Header of config script improval --- config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index 964d5d9..b40b483 100644 --- a/config.py +++ b/config.py @@ -1,4 +1,6 @@ -#!/bin/python3 +#!/usr/bin/python3.4m +# -*- python -*- + import sys import subprocess ver = sys.version[:3] From 8430e60b7bf430abf5981c28da74ad999ec8ddda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 1 Jul 2014 12:14:53 +0200 Subject: [PATCH 8/8] Back to Bash wrapper, as upstream in 3.4 also uses Bash for some reasons This reverts commit 95a55939d74997721acfb6e9b190a815c3e41fc1. This reverts commit 41a68301c70978d906d1b08d4aaa85337d1de3fc. --- config.py | 11 ----------- python3.spec | 15 ++++++--------- 2 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 config.py diff --git a/config.py b/config.py deleted file mode 100644 index b40b483..0000000 --- a/config.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python3.4m -# -*- python -*- - -import sys -import subprocess -ver = sys.version[:3] -arch = subprocess.check_output('uname -m'.split()).decode("utf-8").rstrip() -call = ['python{ver}m-{arch}-config'.format(ver=ver, arch=arch)] + sys.argv[1:] -retval = subprocess.call(call) -if retval == 127: - print('Could not find python{ver}m-{arch}-config. Look around to see available arches.'.format(ver=ver, arch=arch), file=sys.stderr) diff --git a/python3.spec b/python3.spec index e956ab5..2596e4f 100644 --- a/python3.spec +++ b/python3.spec @@ -140,7 +140,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.1 -Release: 13%{?dist} +Release: 12%{?dist} License: Python Group: Development/Languages @@ -243,9 +243,6 @@ Source7: pyfuntop.stp # Written by bkabrda Source8: check-pyc-and-pyo-timestamps.py -# Python wrapper arounf pythonXXm-config to be able to keep python3-devel multiarch -Source9: config.py - # Fixup distutils/unixccompiler.py to remove standard library path from rpath: # Was Patch0 in ivazquez' python3000 specfile: Patch1: Python-3.1.1-rpath.patch @@ -1384,8 +1381,11 @@ sed \ # Rename the script that differs on different arches to arch specific name mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config -cp %{SOURCE9} %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config -chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config +echo -e '#!/bin/sh\nexec `dirname $0`/python%{LDVERSION_optimized}-`uname -m`-config "$@"' > \ + %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config +echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_optimized}-`uname -m`-config. Look around to see available arches." >&2' >> \ + %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config + chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config # ====================================================== # Running the upstream test suite @@ -1853,9 +1853,6 @@ rm -fr %{buildroot} # ====================================================== %changelog -* Mon Jun 30 2014 Miro Hrončok - 3.4.1-13 -- Rewrite the config wrapper from Bash to Python, so it can be interpreted with Python - * Sun Jun 8 2014 Peter Robinson 3.4.1-12 - aarch64 has valgrind, just list those that don't support it