Compare commits

...

14 Commits

Author SHA1 Message Date
David Abdurachmanov c0b23c7159
Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2020-03-23 12:29:15 +02:00
Miro Hrončok 7baa535f27 Enable https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup on power and arm
https://bugzilla.redhat.com/show_bug.cgi?id=1795575 is "fixed for almost a month"
2020-02-28 18:34:31 +01:00
Miro Hrončok 66b21b9b89 Rebased to 3.8.2 final
All patches applied cleanly.
2020-02-26 15:03:31 +01:00
Miro Hrončok 471a304653 Update the ensurepip module to work with setuptools >= 45
setuptools 45.x is Python 3 only and changed the name of the wheel
2020-02-24 21:49:54 +01:00
Nicolas Chauvet 086f5b2234 Use __isa_bits instead of crafted value
This is easier to read and the appropriate macro to use here

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
2020-02-24 19:53:58 +00:00
Marcel Plch b6982963b8 Rebase to v3.8.2rc2 2020-02-24 17:22:04 +01:00
Miro Hrončok e2dce1ef0e Rebased to 3.8.2rc1
Patches 339 and 341 were backports, now included.
No other patches changes required.
2020-02-12 11:40:41 +01:00
Lumir Balhar e90b6d950b Use compileall2 module for byte-compilation in the python3 package 2020-01-31 07:46:43 +00:00
Tomas Orsava 97e152a6da De-hardcode py_SOVERSION in the files section 2020-01-30 20:52:35 +00:00
Miro Hrončok b1c7775af7 Fix test_zipfile.test_add_file_after_2107() 2020-01-30 17:50:12 +01:00
Miro Hrončok a7179c0ac5 Temporarily don't use -fno-semantic-interposition on power and arm
Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1795575
2020-01-30 17:50:12 +01:00
Victor Stinner bb05cf63a4 Run the test suite with --timeout=1800 2020-01-30 17:50:12 +01:00
Miro Hrončok acf2f58231 ctypes: Disable checks for union types being passed by value
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1794572
Fixed upstream: https://bugs.python.org/issue16575
2020-01-30 17:50:10 +01:00
Fedora Release Engineering 1e4e35f9c2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 16:28:16 +00:00
9 changed files with 79 additions and 51 deletions

View File

@ -1,4 +1,4 @@
From 616ba760b78cb3c002d1f7e2a0dfc2902ca9dbb4 Mon Sep 17 00:00:00 2001
From bf01d6c367d9cb8f6594afa87c16f0498ae7321f Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 13 Jan 2010 21:25:18 +0000
Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard

View File

@ -1,4 +1,4 @@
From 16ee9d86a77c8bbca3d41c9926130d37686d3bf3 Mon Sep 17 00:00:00 2001
From 96580364051672475607c88cdb31ec875cea6e97 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 13 Jan 2010 21:25:18 +0000
Subject: [PATCH] 00102: Change the various install paths to use /usr/lib64/
@ -154,7 +154,7 @@ index 41c4229919..543c88432a 100644
'site-packages')
self.assertEqual(dirs[0], wanted)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 502317aa0c..4ad3df1122 100644
index a914a9c70f..406a441082 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -143,7 +143,7 @@ LIBDIR= @libdir@
@ -198,10 +198,10 @@ index b727f66953..a0c5fb6139 100644
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
}
diff --git a/configure b/configure
index 0914e24704..889d6b6a7f 100755
index a979363acf..b89ae1be3c 100755
--- a/configure
+++ b/configure
@@ -15170,9 +15170,9 @@ fi
@@ -15188,9 +15188,9 @@ fi
if test x$PLATFORM_TRIPLET = x; then
@ -214,10 +214,10 @@ index 0914e24704..889d6b6a7f 100755
diff --git a/configure.ac b/configure.ac
index 7051dc109a..a13be153fa 100644
index e57ef7c38b..c59cbc223f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4668,9 +4668,9 @@ fi
@@ -4674,9 +4674,9 @@ fi
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
if test x$PLATFORM_TRIPLET = x; then

View File

@ -1,4 +1,4 @@
From 2559cbe8f0431ba20de8a1c9921013e5e3820967 Mon Sep 17 00:00:00 2001
From fb93392b0f4975a02775a608611dc9ceb20c06ad Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Mon, 18 Jan 2010 17:59:07 +0000
Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a
@ -21,7 +21,7 @@ Co-authored-by: Miro Hrončok <miro@hroncok.cz>
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 4ad3df1122..72d202d71b 100644
index 406a441082..917303dd92 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -562,7 +562,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c

View File

@ -1,18 +1,18 @@
From 710cd909297d8e0291d37a4753b8e5a7965dc59f Mon Sep 17 00:00:00 2001
From 72d6cb277804f58b660bf96d8f5efff78d88491c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Wed, 15 Aug 2018 15:36:29 +0200
Subject: [PATCH] 00189: Instead of bundled wheels, use our RPM packaged wheels
We keep them in /usr/share/python-wheels
---
Lib/ensurepip/__init__.py | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
Lib/ensurepip/__init__.py | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
index fc0edec6e3..4d17e413db 100644
index fc0edec6e3..731817a3f0 100644
--- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -1,16 +1,27 @@
@@ -1,16 +1,31 @@
+import distutils.version
+import glob
import os
@ -27,14 +27,18 @@ index fc0edec6e3..4d17e413db 100644
+_WHEEL_DIR = "/usr/share/python-wheels/"
-_SETUPTOOLS_VERSION = "41.2.0"
+_wheels = {}
-_PIP_VERSION = "19.2.3"
+def _get_most_recent_wheel_version(pkg):
+ prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg))
+ suffix = "-py2.py3-none-any.whl"
+ pattern = "{}*{}".format(prefix, suffix)
+ versions = (p[len(prefix):-len(suffix)] for p in glob.glob(pattern))
+ return str(max(versions, key=distutils.version.LooseVersion))
+ _wheels[pkg] = {}
+ for suffix in "-py2.py3-none-any.whl", "-py3-none-any.whl":
+ pattern = "{}*{}".format(prefix, suffix)
+ for path in glob.glob(pattern):
+ version_str = path[len(prefix):-len(suffix)]
+ _wheels[pkg][version_str] = os.path.basename(path)
+ return str(max(_wheels[pkg], key=distutils.version.LooseVersion))
+
+
+_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools")
@ -43,16 +47,18 @@ index fc0edec6e3..4d17e413db 100644
_PROJECTS = [
("setuptools", _SETUPTOOLS_VERSION),
@@ -96,12 +107,9 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
@@ -95,13 +110,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
# additional paths that need added to sys.path
additional_paths = []
for project, version in _PROJECTS:
wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version)
- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version)
- whl = pkgutil.get_data(
- "ensurepip",
- "_bundled/{}".format(wheel_name),
- )
- with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
- fp.write(whl)
+ wheel_name = _wheels[project][version]
+ with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp:
+ with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
+ fp.write(sfp.read())

View File

@ -1,4 +1,4 @@
From 4201bb6bf1f6579d7aa14c05876a412e158a2bb5 Mon Sep 17 00:00:00 2001
From a1f0ea8fae6fb87cdc9d9c16bc0898e8f66fa907 Mon Sep 17 00:00:00 2001
From: Michal Cyprian <m.cyprian@gmail.com>
Date: Mon, 26 Jun 2017 16:32:56 +0200
Subject: [PATCH] 00251: Change user install location

View File

@ -1,4 +1,4 @@
From 6fa351057216fe2ce43ea6f509f40a63050a0684 Mon Sep 17 00:00:00 2001
From b60a8fee7e91e36b48a2ea27d1bb9f42642c3eb2 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pviktori@redhat.com>
Date: Mon, 28 Aug 2017 17:16:46 +0200
Subject: [PATCH] 00274: Upstream uses Debian-style architecture naming, change
@ -29,10 +29,10 @@ index ba37cf99e2..52a9ec6662 100755
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
diff --git a/configure.ac b/configure.ac
index a13be153fa..edf17032b8 100644
index c59cbc223f..a3e1c04e1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -741,9 +741,9 @@ cat >> conftest.c <<EOF
@@ -747,9 +747,9 @@ cat >> conftest.c <<EOF
alpha-linux-gnu
# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
# if defined(__ARMEL__)
@ -44,7 +44,7 @@ index a13be153fa..edf17032b8 100644
# endif
# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
# if defined(__ARMEL__)
@@ -783,7 +783,7 @@ cat >> conftest.c <<EOF
@@ -789,7 +789,7 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32
mips64el-linux-gnuabin32
# elif _MIPS_SIM == _ABI64
@ -53,7 +53,7 @@ index a13be153fa..edf17032b8 100644
# else
# error unknown platform triplet
# endif
@@ -793,22 +793,22 @@ cat >> conftest.c <<EOF
@@ -799,22 +799,22 @@ cat >> conftest.c <<EOF
# elif _MIPS_SIM == _ABIN32
mips64-linux-gnuabin32
# elif _MIPS_SIM == _ABI64

View File

@ -1,4 +1,4 @@
From 95f28a4e0417c5749ac228b1d443ec49ccc72e5b Mon Sep 17 00:00:00 2001
From 0d41a311e805af08637e3f6dc0fb6fae32e508ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 11 Jul 2019 13:44:13 +0200
Subject: [PATCH] 00328: Restore pyc to TIMESTAMP invalidation mode as default

View File

@ -13,11 +13,11 @@ URL: https://www.python.org/
# WARNING When rebasing to a new Python version,
# remember to update the python3-docs package as well
%global general_version %{pybasever}.1
%global general_version %{pybasever}.2
#global prerel ...
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 1.0.riscv64%{?dist}
Release: 2.0.riscv64%{?dist}
License: Python
@ -63,6 +63,9 @@ License: Python
# Expensive optimizations (mainly, profile-guided optimizations)
%bcond_without optimizations
# https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
%bcond_without no_semantic_interposition
# Run the test suite in %%check
%bcond_without tests
@ -136,16 +139,6 @@ License: Python
# on files that test invalid syntax.
%undefine py_auto_byte_compile
# For multilib support, files that are different between 32- and 64-bit arches
# need different filenames. Use "64" or "32" according to the word size.
# Currently, the best way to determine an architecture's word size happens to
# be checking %%{_lib}.
%if "%{_lib}" == "lib64"
%global wordsize 64
%else
%global wordsize 32
%endif
# =======================
# Build-time requirements
@ -667,14 +660,14 @@ topdir=$(pwd)
# Fedora packages utilizing %%py3_build will use them as well
# https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
export CFLAGS="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
export CFLAGS_NODIST="%{build_cflags} -D_GNU_SOURCE -fPIC -fwrapv -fno-semantic-interposition"
export CFLAGS_NODIST="%{build_cflags} -D_GNU_SOURCE -fPIC -fwrapv%{?with_no_semantic_interposition: -fno-semantic-interposition}"
export CXXFLAGS="%{extension_cxxflags} -D_GNU_SOURCE -fPIC -fwrapv"
export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
export OPT="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
export LINKCC="gcc"
export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
export LDFLAGS="%{extension_ldflags} -g $(pkg-config --libs-only-L openssl)"
export LDFLAGS_NODIST="%{build_ldflags} -fno-semantic-interposition -g $(pkg-config --libs-only-L openssl)"
export LDFLAGS_NODIST="%{build_ldflags}%{?with_no_semantic_interposition: -fno-semantic-interposition} -g $(pkg-config --libs-only-L openssl)"
# We can build several different configurations of Python: regular and debug.
# Define a common function that does one build:
@ -779,7 +772,7 @@ mkdir -p %{buildroot}$DirHoldingGdbPy
# Filanames are defined here:
%global _pyconfig32_h pyconfig-32.h
%global _pyconfig64_h pyconfig-64.h
%global _pyconfig_h pyconfig-%{wordsize}.h
%global _pyconfig_h pyconfig-%{__isa_bits}.h
# Use a common function to do an install for all our configurations:
InstallPython() {
@ -930,10 +923,17 @@ find . -name "*~" -exec rm -f {} \;
# Do bytecompilation with the newly installed interpreter.
# This is similar to the script in macros.pybytecompile
# compile *.pyc
find %{buildroot} -type f -a -name "*.py" -print0 | \
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
xargs -0 %{buildroot}%{_bindir}/python%{pybasever} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=opt) for opt in range(3) for f in sys.argv[1:]]' || :
# Python CMD line options:
# -s - don't add user site directory to sys.path
# -B - don't write .pyc files on import
# Compileall2 CMD line options:
# -f - force rebuild even if timestamps are up to date
# -o - optimization levels to run compilation with
# -s - part of path to left-strip from path to source file (buildroot)
# -p - path to add as prefix to path to source file (/ to make it absolute)
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
PYTHONPATH="%{_rpmconfigdir}/redhat" %{buildroot}%{_bindir}/python%{pybasever} -s -B -m \
compileall2 -f %{_smp_mflags} -o 0 -o 1 -o 2 -s %{buildroot} -p / %{buildroot} || :
# Since we have pathfix.py in bindir, this is created, but we don't want it
rm -rf %{buildroot}%{_bindir}/__pycache__
@ -1049,6 +1049,7 @@ CheckPython() {
LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.pythoninfo
# Run the upstream test suite
# --timeout=1800: kill test running for longer than 30 minutes
# test_gdb skipped on s390x:
# https://bugzilla.redhat.com/show_bug.cgi?id=1678277
# test_gdb skipped everywhere:
@ -1057,7 +1058,7 @@ CheckPython() {
# distutils.tests.test_bdist_rpm tests fail when bootstraping the Python
# package: rpmbuild requires /usr/bin/pythonX.Y to be installed
LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
-wW --slowest -j0 \
-wW --slowest -j0 --timeout=1800 \
%if %{with bootstrap}
-x test_distutils \
%endif
@ -1530,7 +1531,7 @@ CheckPython optimized
%{_bindir}/python%{LDVERSION_debug}-config
%{_bindir}/python%{LDVERSION_debug}-*-config
%{_libdir}/libpython%{LDVERSION_debug}.so
%{_libdir}/libpython%{LDVERSION_debug}.so.1.0
%{_libdir}/libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}-embed.pc
@ -1572,9 +1573,30 @@ CheckPython optimized
# ======================================================
%changelog
* Sat Dec 21 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> - 3.8.1-1.0.riscv64
* Mon Mar 23 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 3.8.2-2.0.riscv64
- Disable test_posix test on riscv64 (failing)
* Fri Feb 28 2020 Miro Hrončok <mhroncok@redhat.com> - 3.8.2-2
- Enable https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup on power and arm
* Wed Feb 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.8.2-1
- Rebased to 3.8.2 final
* Mon Feb 24 2020 Miro Hrončok <mhroncok@redhat.com> - 3.8.2~rc2-2
- Update the ensurepip module to work with setuptools >= 45
* Mon Feb 24 2020 Marcel Plch <mplch@redhat.com> - 3.8.2~rc2-1
- Rebased to 3.8.2rc2
* Wed Feb 12 2020 Miro Hrončok <mhroncok@redhat.com> - 3.8.2~rc1-1
- Rebased to 3.8.2rc1
* Thu Jan 30 2020 Miro Hrončok <mhroncok@redhat.com> - 3.8.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
- ctypes: Disable checks for union types being passed by value (#1794572)
- Temporarily disable https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
on ppc64le and armv7hl (#1795575)
* Thu Dec 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.1-1
- Update to Python 3.8.1

View File

@ -1,2 +1,2 @@
SHA512 (Python-3.8.1.tar.xz) = d41381848cc1ec8009643b71875f395a9ac2c8e12a5b1efef33caf8a9e99a337c790d4354695c85352d11b62092ae372b5af62f78724363fcbf3504ff9a6ddca
SHA512 (Python-3.8.1.tar.xz.asc) = 10472ee0061c38a87e9e28905db4f43d51ddfa67704dbe4835299321a8858ddc4f1a5730433747b207a129f9e8294772f1d27c7f75b8245d98a857da3ea9d565
SHA512 (Python-3.8.2.tar.xz) = ca37ad0e7c5845f5f228566aa8ff654a8f428c7d4a5aaabff29baebb0ca3219b31ba8bb2607f89e37cf3fc564f023b8407e53a4f2c47bd99122c1cc222613e37
SHA512 (Python-3.8.2.tar.xz.asc) = 765796ab5539576bbf1578e05cdb041dbc9a9ca0d6d2040a473a00a293b49f90be11ea6e33b47889da33b25f8e360fad4adeec292f0d43e5fae233d1f03bafd2