Python 3.7 (fedpkg prep ok, builds ok without debug)

This commit is contained in:
Miro Hrončok 2017-11-28 13:47:21 +01:00
commit d668c1e89c
9 changed files with 85 additions and 1244 deletions

View file

@ -6,15 +6,18 @@ Name: python3
Summary: Interpreter of the Python programming language
URL: https://www.python.org/
%global pybasever 3.6
%global pybasever 3.7
# pybasever without the dot:
%global pyshortver 36
%global pyshortver 37
# Second alpha
%global prerel a2
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
Version: %{pybasever}.3
Release: 4%{?dist}
Version: %{pybasever}.0
Release: 0.1.%{?prerel}%{?dist}
License: Python
@ -183,6 +186,7 @@ BuildRequires: gmp-devel
BuildRequires: libappstream-glib
BuildRequires: libffi-devel
BuildRequires: libGL-devel
BuildRequires: libuuid-devel
BuildRequires: libX11-devel
BuildRequires: ncurses-devel
@ -225,7 +229,7 @@ BuildRequires: python3-pip
# Source code and patches
# =======================
Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
Source: https://www.python.org/ftp/python/%{version}/Python-%{version}%{prerel}.tar.xz
# Supply an RPM macro "py_byte_compile" for the python3-devel subpackage
# to enable specfiles to selectively byte-compile individual files and paths
@ -354,13 +358,6 @@ Patch205: 00205-make-libpl-respect-lib64.patch
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
Patch251: 00251-change-user-install-location.patch
# 00262 #
# Backport of PEP 538: Coercing the legacy C locale to a UTF-8 based locale
# https://www.python.org/dev/peps/pep-0538/
# Fedora Change: https://fedoraproject.org/wiki/Changes/python3_c.utf-8_locale
# Original proposal: https://bugzilla.redhat.com/show_bug.cgi?id=1404918
Patch262: 00262-pep538_coerce_legacy_c_locale.patch
# 00264 #
# test_pass_by_value was added in Python 3.6.1 and on aarch64
# it is catching an error that was there, but wasn't tested before.
@ -377,18 +374,6 @@ Patch273: 00273-skip-float-test.patch
# Upstream uses Debian-style architecture naming. Change to match Fedora.
Patch274: 00274-fix-arch-names.patch
# 00277 #
# Fix test_exception_errpipe_bad_data() and
# test_exception_errpipe_normal() of test_subprocess: mock os.waitpid()
# to avoid calling the real os.waitpid(0, 0) which is an unexpected
# side effect of the test, which makes the koji builds hang.
# Fixed upstream: https://github.com/python/cpython/commit/11045c9d8a21dd9bd182a3939189db02815f9783
Patch277: 00277-fix-test-subprocess-hanging-tests.patch
# 00279 #
# Fix memory corruption due to allocator mix
# Fixed upstream: https://bugs.python.org/issue31532
Patch279: 00279-fix-memory-corruption-due-to-allocator-mix.patch
# (New patches go here ^^^)
#
@ -619,7 +604,6 @@ cp -a %{SOURCE7} .
# Remove bundled libraries to ensure that we're using the system copy.
rm -r Modules/expat
rm -r Modules/zlib
%if %{with rewheel}
%global pip_version 9.0.1
@ -652,7 +636,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch205 -p1
%patch251 -p1
%patch262 -p1
%ifarch aarch64
%patch264 -p1
@ -660,8 +643,6 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en
%patch273 -p1
%patch274 -p1
%patch277 -p1
%patch279 -p1
# Remove files that should be generated by the build
@ -1266,6 +1247,7 @@ fi
#%{dynload_dir}/time.%{SOABI_optimized}.so
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
%{dynload_dir}/_uuid.%{SOABI_optimized}.so
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
%{dynload_dir}/zlib.%{SOABI_optimized}.so
@ -1416,6 +1398,7 @@ fi
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so
%{pylibdir}/lib2to3/tests
%{pylibdir}/tkinter/test
%{pylibdir}/unittest/test
@ -1502,6 +1485,8 @@ fi
#%{dynload_dir}/time.%{SOABI_debug}.so
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
%{dynload_dir}/_uuid.%{SOABI_debug}.so
%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so
%{dynload_dir}/zlib.%{SOABI_debug}.so
# No need to split things out the "Makefile" and the config-32/64.h file as we
@ -1560,6 +1545,10 @@ fi
# ======================================================
%changelog
* Tue Nov 28 2017 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.1.a2
- Update to 3.7.0 alpha 2
- Removed merged patches 262, 277, 279
* Tue Nov 21 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.3-4
- Raise the release of platform-python obsoletes for better maintainability