diff --git a/00001-rpath.patch b/00001-rpath.patch index d9dd3ce..e2809a5 100644 --- a/00001-rpath.patch +++ b/00001-rpath.patch @@ -1,4 +1,4 @@ -From 8ecb6d320c03242ca94bf2e99d9d80510d5011e1 Mon Sep 17 00:00:00 2001 +From dd253c4f803a5dfa2ba7dfdb01b722e47c2b02e8 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 13 Jan 2010 21:25:18 +0000 Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard @@ -29,5 +29,5 @@ index d10a78da31..4df4b67810 100644 include_dirs=None, extra_preargs=None, extra_postargs=None): fixed_args = self._fix_compile_args(None, macros, include_dirs) -- -2.21.0 +2.23.0 diff --git a/00102-lib64.patch b/00102-lib64.patch index f1f0c8d..0a9db42 100644 --- a/00102-lib64.patch +++ b/00102-lib64.patch @@ -1,4 +1,4 @@ -From b9f1dd6be195cc3b11a80e6f0dde2096dd8b9855 Mon Sep 17 00:00:00 2001 +From 25fcefdafb47ee30f4dc802742f49e501d7b2f37 Mon Sep 17 00:00:00 2001 From: David Malcolm 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 d08c78df39..4d2f68447d 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -143,7 +143,7 @@ LIBDIR= @libdir@ @@ -167,41 +167,41 @@ index 502317aa0c..4ad3df1122 100644 # Detailed destination directories diff --git a/Modules/getpath.c b/Modules/getpath.c -index b727f66953..a0c5fb6139 100644 +index 8632d1fe6d..09a818609e 100644 --- a/Modules/getpath.c +++ b/Modules/getpath.c -@@ -730,7 +730,7 @@ calculate_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, - if (safe_wcscpy(exec_prefix, calculate->exec_prefix, exec_prefix_len) < 0) { - return PATHLEN_ERR(); +@@ -810,7 +810,7 @@ calculate_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig) } -- status = joinpath(exec_prefix, L"lib/lib-dynload", exec_prefix_len); -+ status = joinpath(exec_prefix, L"lib64/lib-dynload", exec_prefix_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -1067,7 +1067,7 @@ calculate_zip_path(PyCalculatePath *calculate, const wchar_t *prefix, - return PATHLEN_ERR(); + + calculate->exec_prefix = joinpath2(calculate->exec_prefix_macro, +- L"lib/lib-dynload"); ++ L"lib64/lib-dynload"); + if (calculate->exec_prefix == NULL) { + return _PyStatus_NO_MEMORY(); } +@@ -1284,7 +1284,7 @@ calculate_read_pyenv(PyCalculatePath *calculate) + static PyStatus + calculate_zip_path(PyCalculatePath *calculate) + { +- const wchar_t *lib_python = L"lib/python00.zip"; ++ const wchar_t *lib_python = L"lib64/python00.zip"; + + if (calculate->prefix_found > 0) { + /* Use the reduced prefix returned by Py_GetPrefix() +@@ -1435,7 +1435,7 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config) + return DECODE_LOCALE_ERR("VPATH macro", len); } -- status = joinpath(zip_path, L"lib/python00.zip", zip_path_len); -+ status = joinpath(zip_path, L"lib64/python00.zip", zip_path_len); - if (_PyStatus_EXCEPTION(status)) { - return status; - } -@@ -1197,7 +1197,7 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config) - if (!calculate->exec_prefix) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); - } + - calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len); + calculate->lib_python = Py_DecodeLocale("lib64/python" VERSION, &len); if (!calculate->lib_python) { - return DECODE_LOCALE_ERR("EXEC_PREFIX define", len); + return DECODE_LOCALE_ERR("EXEC_PREFIX macro", len); } diff --git a/configure b/configure -index 2a933cdbeb..bec365124e 100755 +index 44f14c3c2c..020531594c 100755 --- a/configure +++ b/configure -@@ -15182,9 +15182,9 @@ fi +@@ -15192,9 +15192,9 @@ fi if test x$PLATFORM_TRIPLET = x; then @@ -214,10 +214,10 @@ index 2a933cdbeb..bec365124e 100755 diff --git a/configure.ac b/configure.ac -index a189d42c2c..154a0aa5cc 100644 +index 0b28dda44c..4fca719c71 100644 --- a/configure.ac +++ b/configure.ac -@@ -4668,9 +4668,9 @@ fi +@@ -4679,9 +4679,9 @@ fi dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) if test x$PLATFORM_TRIPLET = x; then @@ -230,7 +230,7 @@ index a189d42c2c..154a0aa5cc 100644 AC_SUBST(LIBPL) diff --git a/setup.py b/setup.py -index 20d7f35652..024a1035c0 100644 +index 02f523c42d..559498d14b 100644 --- a/setup.py +++ b/setup.py @@ -649,7 +649,7 @@ class PyBuildExt(build_ext): @@ -257,5 +257,5 @@ index 20d7f35652..024a1035c0 100644 libraries=readline_libs)) else: -- -2.21.0 +2.23.0 diff --git a/00111-no-static-lib.patch b/00111-no-static-lib.patch index 361af70..784a281 100644 --- a/00111-no-static-lib.patch +++ b/00111-no-static-lib.patch @@ -1,4 +1,4 @@ -From f6df02cde47874f10e183ead483c90941bb8076f Mon Sep 17 00:00:00 2001 +From 796f2a2d1f213e963768e7c987fb49f8c4f47dfa Mon Sep 17 00:00:00 2001 From: David Malcolm 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 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Makefile.pre.in b/Makefile.pre.in -index 4ad3df1122..72d202d71b 100644 +index 4d2f68447d..3cd2f25571 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -562,7 +562,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c @@ -55,7 +55,7 @@ index 4ad3df1122..72d202d71b 100644 $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ############################################################################ -@@ -1557,17 +1551,6 @@ libainstall: @DEF_MAKE_RULE@ python-config +@@ -1562,17 +1556,6 @@ libainstall: @DEF_MAKE_RULE@ python-config else true; \ fi; \ done @@ -74,5 +74,5 @@ index 4ad3df1122..72d202d71b 100644 $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in -- -2.21.0 +2.23.0 diff --git a/00189-use-rpm-wheels.patch b/00189-use-rpm-wheels.patch index 349c894..e11b421 100644 --- a/00189-use-rpm-wheels.patch +++ b/00189-use-rpm-wheels.patch @@ -1,26 +1,24 @@ -From e5c11f104e1d2543ac3ba4b3f0a7989821e57947 Mon Sep 17 00:00:00 2001 +From d8ff047b2d9c510ab81e73111999554a8e54eccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= 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 | 25 +++++++++++++++++-------- + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py -index fc0edec6e3..4d17e413db 100644 +index 386ed6c25c..7f5f639bde 100644 --- a/Lib/ensurepip/__init__.py +++ b/Lib/ensurepip/__init__.py -@@ -1,16 +1,27 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path --import pkgutil import sys - import tempfile - +@@ -10,10 +12,20 @@ from . import _bundled __all__ = ["version", "bootstrap"] @@ -43,13 +41,13 @@ index fc0edec6e3..4d17e413db 100644 _PROJECTS = [ ("setuptools", _SETUPTOOLS_VERSION), -@@ -96,12 +107,9 @@ def _bootstrap(*, root=None, upgrade=False, user=False, +@@ -99,12 +111,9 @@ def _bootstrap(*, root=None, upgrade=False, user=False, additional_paths = [] for project, version in _PROJECTS: wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) -- whl = pkgutil.get_data( -- "ensurepip", -- "_bundled/{}".format(wheel_name), +- whl = resources.read_binary( +- _bundled, +- wheel_name, - ) - with open(os.path.join(tmpdir, wheel_name), "wb") as fp: - fp.write(whl) @@ -60,5 +58,5 @@ index fc0edec6e3..4d17e413db 100644 additional_paths.append(os.path.join(tmpdir, wheel_name)) -- -2.21.0 +2.23.0 diff --git a/00251-change-user-install-location.patch b/00251-change-user-install-location.patch index 1e0ddbb..9e38dbd 100644 --- a/00251-change-user-install-location.patch +++ b/00251-change-user-install-location.patch @@ -1,4 +1,4 @@ -From 76330e0a8798b3b03160edc7e8d42d3dbee756fd Mon Sep 17 00:00:00 2001 +From 7438360d65b2e000440d7ee126f32d2500dbd82c Mon Sep 17 00:00:00 2001 From: Michal Cyprian Date: Mon, 26 Jun 2017 16:32:56 +0200 Subject: [PATCH] 00251: Change user install location @@ -60,5 +60,5 @@ index 22d53fa562..9513526109 100644 if os.path.isdir(sitedir): addsitedir(sitedir, known_paths) -- -2.21.0 +2.23.0 diff --git a/00274-fix-arch-names.patch b/00274-fix-arch-names.patch index f383a58..bbcf7f1 100644 --- a/00274-fix-arch-names.patch +++ b/00274-fix-arch-names.patch @@ -1,4 +1,4 @@ -From 64c67dbfa789f242e8ffd1ac88bafb4df2842401 Mon Sep 17 00:00:00 2001 +From 607b2e6099745b2c8c0d55d258ade620e6c35dbd Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 28 Aug 2017 17:16:46 +0200 Subject: [PATCH] 00274: Upstream uses Debian-style architecture naming, change @@ -29,7 +29,7 @@ index ba37cf99e2..52a9ec6662 100755 ppc64le | powerpc64little) basic_machine=powerpc64le-unknown diff --git a/configure.ac b/configure.ac -index 154a0aa5cc..273954f461 100644 +index 4fca719c71..3d06f82981 100644 --- a/configure.ac +++ b/configure.ac @@ -741,9 +741,9 @@ cat >> conftest.c < Date: Thu, 11 Jul 2019 13:44:13 +0200 Subject: [PATCH] 00328: Restore pyc to TIMESTAMP invalidation mode as default @@ -51,5 +51,5 @@ index d6677ab45f..88059b127e 100644 return wrapper -- -2.21.0 +2.23.0 diff --git a/python38.rpmlintrc b/python38.rpmlintrc deleted file mode 100644 index 1314d45..0000000 --- a/python38.rpmlintrc +++ /dev/null @@ -1,80 +0,0 @@ -# KNOWN BUGS: -# https://bugzilla.redhat.com/show_bug.cgi?id=1489816 -addFilter(r'crypto-policy-non-compliance-openssl') - - -# TESTS: -addFilter(r'(zero-length|pem-certificate|uncompressed-zip) /usr/lib(64)?/python3.\d/test') - - -# OTHER DELIBERATES: -# chroot function -addFilter(r'missing-call-to-chdir-with-chroot') - -# intentionally unversioned and selfobsoleted -addFilter(r'unversioned-explicit-obsoletes python') -addFilter(r'self-obsoletion python3\d obsoletes python3\d') - -# intentionally hardcoded -addFilter(r'hardcoded-library-path in %{_prefix}/lib/(debug/%{_libdir}|python%{pybasever})') - -# intentional for our pythonXY package -addFilter(r'python3\d\.[^:]+: (E|W): devel-file-in-non-devel-package') - -# we have non binary stuff, python files -addFilter(r'only-non-binary-in-usr-lib') - -# some devel files that are deliberately needed -addFilter(r'devel-file-in-non-devel-package /usr/include/python3\.\dm/pyconfig-(32|64)\.h') -addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/python3\.\d/distutils/tests/xxmodule\.c') - - -# SORRY, NOT SORRY: -# manual pages -addFilter(r'no-manual-page-for-binary (idle|pydoc|pyvenv|2to3|python3-debug|pathfix|msgfmt|pygettext)') -addFilter(r'no-manual-page-for-binary python3.*-config$') -addFilter(r'no-manual-page-for-binary python3.\dd?m$') - -# missing documentation from subpackages -addFilter(r'^python3\d?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation') - -# platform python is obsoleted, but not provided -addFilter(r'obsolete-not-provided platform-python') - - -# RPMLINT IMPERFECTIONS -# https://github.com/rpm-software-management/rpmlint/issues/123 -addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3393') -# https://github.com/rpm-software-management/rpmlint/pull/133 -addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3394') - -# https://bugzilla.redhat.com/show_bug.cgi?id=1550562 -# https://github.com/rpm-software-management/rpmlint/issues/128 -addFilter(r'python-bytecode-inconsistent-mtime .* 1970') - -# debugsource -addFilter(r'^python3\d?-debugsource\.[^:]+: (E|W): no-documentation') - -# debuginfo -addFilter(r'^python3\d?-debuginfo\.[^:]+: (E|W): useless-provides debuginfo\(build-id\)') - -# this is OK for F28+ -addFilter(r'library-without-ldconfig-post') - -# debug package contains devel and non-devel files -addFilter(r'python3\d?-debug.[^:]+: (E|W): (non-)?devel-file-in-(non-)?devel-package') - -# this goes to other subpackage, hence not actually dangling, the read error is bogus -addFilter(r'dangling-relative-symlink /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc python-3\.\d\.pc') -addFilter(r'read-error /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc \[Errno 2\]') - -# we need this macro to evaluate, even if the line starts with # -addFilter(r'macro-in-comment %\{_pyconfig(32|64)_h\}') - -# Python modules don't need to be linked against libc -# Since 3.8 they are no longer linked against libpython3.8.so.1.0 -addFilter(r'E: library-not-linked-against-libc /usr/lib(64)?/python3.\d/lib-dynload/') -addFilter(r'E: shared-lib-without-dependency-information /usr/lib(64)?/python3.\d/lib-dynload/') - -# SPELLING ERRORS -addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest) ') diff --git a/python38.spec b/python38.spec deleted file mode 100644 index 53bb8e7..0000000 --- a/python38.spec +++ /dev/null @@ -1,1575 +0,0 @@ -# ================== -# Top-level metadata -# ================== - -%global pybasever 3.8 - -# pybasever without the dot: -%global pyshortver 38 - -Name: python%{pyshortver} -Summary: Version %{pybasever} of the Python interpreter -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}.0 -#global prerel ... -%global upstream_version %{general_version}%{?prerel} -Version: %{general_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} -License: Python - - -# ================================== -# Conditionals controlling the build -# ================================== - -# Note that the bcond macros are named for the CLI option they create. -# "%%bcond_without" means "ENABLE by default and create a --without option" - - -# Flat package, i.e. python36, python37, python38 for tox etc. -# warning: changes some other defaults -# in Fedora, never turn this on for the python3 package -# and always keep it on for python37 etc. -# WARNING: This does not change the package name and summary above -%bcond_without flatpackage - -# When bootstrapping python3, we need to build setuptools. -# but setuptools BR python3-devel and that brings in python3-rpm-generators; -# python3-rpm-generators needs python3-setuptools, so we cannot have it yet. -# -# Procedure: https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython -# -# IMPORTANT: When bootstrapping, it's very likely the wheels for pip and -# setuptools are not available. Turn off the rpmwheels bcond until -# the two packages are built with wheels to get around the issue. -%bcond_with bootstrap - -# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package -# Uses upstream bundled prebuilt wheels otherwise -%bcond_without rpmwheels - -# Expensive optimizations (mainly, profile-guided optimizations) -%bcond_without optimizations - -# Run the test suite in %%check -%bcond_without tests - -# Extra build for debugging the interpreter or C-API extensions -# (the -debug subpackages) -%if %{with flatpackage} -%bcond_with debug_build -%else -%bcond_without debug_build -%endif - -# Support for the GDB debugger -%bcond_without gdb_hooks - -# The dbm.gnu module (key-value database) -%bcond_without gdbm - -# Main interpreter loop optimization -%bcond_without computed_gotos - -# Support for the Valgrind debugger/profiler -%ifarch %{valgrind_arches} -%bcond_without valgrind -%else -%bcond_with valgrind -%endif - - -# ===================== -# General global macros -# ===================== - -%global pylibdir %{_libdir}/python%{pybasever} -%global dynload_dir %{pylibdir}/lib-dynload - -# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac -# See PEP 3149 for some background: http://www.python.org/dev/peps/pep-3149/ -%global ABIFLAGS_optimized %{nil} -%global ABIFLAGS_debug d - -%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized} -%global LDVERSION_debug %{pybasever}%{ABIFLAGS_debug} - -%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu} -%global SOABI_debug cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu} - -# All bytecode files are in a __pycache__ subdirectory, with a name -# reflecting the version of the bytecode. -# See PEP 3147: http://www.python.org/dev/peps/pep-3147/ -# For example, -# foo/bar.py -# has bytecode at: -# foo/__pycache__/bar.cpython-%%{pyshortver}.pyc -# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc -# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc -%global bytecode_suffixes .cpython-%{pyshortver}*.pyc - -# Python's configure script defines SOVERSION, and this is used in the Makefile -# to determine INSTSONAME, the name of the libpython DSO: -# LDLIBRARY='libpython$(VERSION).so' -# INSTSONAME="$LDLIBRARY".$SOVERSION -# We mirror this here in order to make it easier to add the -gdb.py hooks. -# (if these get out of sync, the payload of the libs subpackage will fail -# and halt the build) -%global py_SOVERSION 1.0 -%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION} -%global py_INSTSONAME_debug libpython%{LDVERSION_debug}.so.%{py_SOVERSION} - -# Disable automatic bytecompilation. The python3 binary is not yet be -# available in /usr/bin when Python is built. Also, the bytecompilation fails -# 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 -# ======================= - -# (keep this list alphabetized) - -BuildRequires: autoconf -BuildRequires: bluez-libs-devel -BuildRequires: bzip2 -BuildRequires: bzip2-devel -BuildRequires: desktop-file-utils -BuildRequires: expat-devel - -BuildRequires: findutils -BuildRequires: gcc-c++ -%if %{with gdbm} -BuildRequires: gdbm-devel -%endif -BuildRequires: glibc-all-langpacks -BuildRequires: glibc-devel -BuildRequires: gmp-devel -BuildRequires: gnupg2 -BuildRequires: libappstream-glib -BuildRequires: libffi-devel -BuildRequires: libnsl2-devel -BuildRequires: libtirpc-devel -BuildRequires: libGL-devel -BuildRequires: libuuid-devel -BuildRequires: libX11-devel -BuildRequires: ncurses-devel - -BuildRequires: openssl-devel -BuildRequires: pkgconfig -BuildRequires: readline-devel -BuildRequires: redhat-rpm-config >= 127 -BuildRequires: sqlite-devel -BuildRequires: gdb - -BuildRequires: tar -BuildRequires: tcl-devel -BuildRequires: tix-devel -BuildRequires: tk-devel - -%if %{with valgrind} -BuildRequires: valgrind-devel -%endif - -BuildRequires: xz-devel -BuildRequires: zlib-devel - -BuildRequires: /usr/bin/dtrace - -# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig) -BuildRequires: /usr/sbin/ifconfig - -# For %%python_provide -BuildRequires: python-rpm-macros - -%if %{with rpmwheels} -BuildRequires: python-setuptools-wheel -BuildRequires: python-pip-wheel -%endif - -%if %{without bootstrap} -# for make regen-all and distutils.tests.test_bdist_rpm -BuildRequires: python%{pyshortver} -%endif - -# ======================= -# Source code and patches -# ======================= - -Source0: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz -Source1: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz.asc -Source2: %{url}static/files/pubkeys.txt - -# A simple script to check timestamps of bytecode files -# Run in check section with Python that is currently being built -# Originally written by bkabrda -Source8: check-pyc-timestamps.py - -# Desktop menu entry for idle3 -Source10: idle3.desktop - -# AppData file for idle3 -Source11: idle3.appdata.xml - -# 00001 # -# Fixup distutils/unixccompiler.py to remove standard library path from rpath: -# Was Patch0 in ivazquez' python3000 specfile: -Patch1: 00001-rpath.patch - -# 00102 # -# Change the various install paths to use /usr/lib64/ instead or /usr/lib -# Only used when "%%{_lib}" == "lib64" -# Not yet sent upstream. -Patch102: 00102-lib64.patch - -# 00111 # -# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build -# a libpythonMAJOR.MINOR.a -# See https://bugzilla.redhat.com/show_bug.cgi?id=556092 -# Downstream only: not appropriate for upstream -Patch111: 00111-no-static-lib.patch - -# 00189 # -# Instead of bundled wheels, use our RPM packaged wheels from -# /usr/share/python-wheels -# Downstream only: upstream bundles -# We might eventually pursuit upstream support, but it's low prio -Patch189: 00189-use-rpm-wheels.patch - -# 00251 -# Set values of prefix and exec_prefix in distutils install command -# to /usr/local if executable is /usr/bin/python* and RPM build -# is not detected to make pip and distutils install into separate location -# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe -# Downstream only: Awaiting resources to work on upstream PEP -Patch251: 00251-change-user-install-location.patch - -# 00274 # -# Upstream uses Debian-style architecture naming. Change to match Fedora. -Patch274: 00274-fix-arch-names.patch - -# 00328 # -# Restore pyc to TIMESTAMP invalidation mode as default in rpmbubild -# See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426 -# Downstream only: only used when building RPM packages -# Ideally, we should talk to upstream and explain why we don't want this -Patch328: 00328-pyc-timestamp-invalidation-mode.patch - -# (New patches go here ^^^) -# -# When adding new patches to "python" and "python3" in Fedora, EL, etc., -# please try to keep the patch numbers in-sync between all specfiles. -# -# More information, and a patch number catalog, is at: -# -# https://fedoraproject.org/wiki/SIGs/Python/PythonPatches -# -# The patches are stored and rebased at: -# -# https://github.com/fedora-python/cpython - - -# ========================================== -# Descriptions, and metadata for subpackages -# ========================================== - -# People might want to dnf install pythonX.Y instead of pythonXY; -# we enable this in both flat and nonflat package. -Provides: python%{pybasever} = %{version}-%{release} - -%if %{without flatpackage} - -# Packages with Python modules in standard locations automatically -# depend on python(abi). Provide that here. -Provides: python(abi) = %{pybasever} - -Requires: %{name}-libs%{?_isa} = %{version}-%{release} - -# In order to support multiple Python interpreters for development purposes, -# packages with the naming scheme flatpackage (e.g. python35) exist for -# non-default versions of Python 3. -# For consistency, and to keep the upgrade path clean, we Provide/Obsolete -# these names here. -Provides: python%{pyshortver} = %{version}-%{release} -# Note that using Obsoletes without package version is not standard practice. -# Here we assert that *any* version of the system's default interpreter is -# preferable to an "extra" interpreter. For example, python3-3.6.1 will -# replace python36-3.6.2. -Obsoletes: python%{pyshortver} - -# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package -# https://fedoraproject.org/wiki/Changes/Python_means_Python3 -# We recommend /usr/bin/python so users get it by default -# Versioned recommends are problematic, and we know that the package requires -# python3 back with fixed version, so we just use the path here: -Recommends: %{_bindir}/python - -# In Fedora 31, /usr/bin/pydoc was moved here from Python 2. -# Ideally we'd have an explicit conflict with "/usr/bin/pydoc < 3", -# but file provides aren't versioned and the file moved across packages. -# Instead, we rely on the conflict in python3-libs. - -# Previously, this was required for our rewheel patch to work. -# This is technically no longer needed, but we keep it recommended -# for the developer experience. -Recommends: python3-setuptools -Recommends: python3-pip - -# This prevents ALL subpackages built from this spec to require -# /usr/bin/python3*. Granularity per subpackage is impossible. -# It's intended for the libs package not to drag in the interpreter, see -# https://bugzilla.redhat.com/show_bug.cgi?id=1547131 -# All others require %%{name} anyway. -%global __requires_exclude ^/usr/bin/python3 - - -# The description used both for the SRPM and the main `python3` subpackage: -%description -Python is an accessible, high-level, dynamically typed, interpreted programming -language, designed with an emphasis on code readability. -It includes an extensive standard library, and has a vast ecosystem of -third-party libraries. - -The %{name} package provides the "python3" executable: the reference -interpreter for the Python language, version 3. -The majority of its standard library is provided in the %{name}-libs package, -which should be installed automatically along with %{name}. -The remaining parts of the Python standard library are broken out into the -%{name}-tkinter and %{name}-test packages, which may need to be installed -separately. - -Documentation for Python is provided in the %{name}-docs package. - -Packages containing additional libraries for Python are generally named with -the "%{name}-" prefix. - - -# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package -# https://fedoraproject.org/wiki/Changes/Python_means_Python3 -%package -n python-unversioned-command -Summary: The "python" command that runs Python 3 -BuildArch: noarch - -# In theory this could require any python3 version -Requires: python3 == %{version}-%{release} -# But since we want to provide versioned python, we require exact version -Provides: python = %{version}-%{release} -# This also save us an explicit conflict for older python3 builds - -%description -n python-unversioned-command -This package contains /usr/bin/python - the "python" command that runs Python 3. - - -%package libs -Summary: Python runtime libraries - -%if %{with rpmwheels} -Requires: python-setuptools-wheel -Requires: python-pip-wheel -%else -Provides: bundled(python3-pip) = 19.2.3 -Provides: bundled(python3-setuptools) = 41.2.0 -%endif - -%{?python_provide:%python_provide python3-libs} - -# There are files in the standard library that have python shebang. -# We've filtered the automatic requirement out so libs are installable without -# the main package. This however makes it pulled in by default. -# See https://bugzilla.redhat.com/show_bug.cgi?id=1547131 -Recommends: %{name}%{?_isa} = %{version}-%{release} - -# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package -# In Fedora 31, several "unversioned" files like /usr/bin/pydoc and all the -# "unversioned" provides were moved from python2 to python3. -# So, newer python3 packages need to conflict with old Python 2 builds that -# still provided unversioned Python. -# Since all python packages, new and old, have versioned requires on -# python?-libs, we do it here: -Conflicts: python-libs < 3 -# (We explicitly conflict with python-libs and not python2-libs, so only the -# old Python 2 builds that still provided unversioned Python are handled.) - - -%description libs -This package contains runtime libraries for use by Python: -- the majority of the Python standard library -- a dynamically linked library for use by applications that embed Python as - a scripting language, and by the main "python3" executable - - -%package devel -Summary: Libraries and header files needed for Python development -Requires: %{name} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} -BuildRequires: python-rpm-macros -# The RPM related dependencies bring nothing to a non-RPM Python developer -# But we want them when packages BuildRequire python3-devel -Requires: (python-rpm-macros if rpm-build) -Requires: (python3-rpm-macros if rpm-build) - -%if %{without bootstrap} -# This is not "API" (packages that need setuptools should still BuildRequire it) -# However some packages apparently can build both with and without setuptools -# producing egg-info as file or directory (depending on setuptools presence). -# Directory-to-file updates are problematic in RPM, so we ensure setuptools is -# installed when -devel is required. -# See https://bugzilla.redhat.com/show_bug.cgi?id=1623914 -# See https://fedoraproject.org/wiki/Packaging:Directory_Replacement -Requires: (python3-setuptools if rpm-build) - -Requires: (python3-rpm-generators if rpm-build) -%endif - -%{?python_provide:%python_provide python3-devel} - -Provides: %{name}-2to3 = %{version}-%{release} -Provides: 2to3 = %{version}-%{release} - -Conflicts: %{name} < %{version}-%{release} - -# In Fedora 31, several "unversioned" files were moved here from Python 2: -# pygettext.py, msgfmt.py, python-config, python.pc -Conflicts: python-devel < 3 - -%description devel -This package contains the header files and configuration needed to compile -Python extension modules (typically written in C or C++), to embed Python -into other programs, and to make binary distributions for Python libraries. - -It also contains the necessary macros to build RPM packages with Python modules -and 2to3 tool, an automatic source converter from Python 2.X. - - -%package idle -Summary: A basic graphical development environment for Python -Requires: %{name} = %{version}-%{release} -Requires: %{name}-tkinter = %{version}-%{release} - -Provides: idle3 = %{version}-%{release} -Provides: idle = %{version}-%{release} - -Provides: %{name}-tools = %{version}-%{release} -Provides: %{name}-tools%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-tools < %{version}-%{release} - -# In Fedora 31, /usr/bin/idle was moved here from Python 2. -Conflicts: python-tools < 3 - -%{?python_provide:%python_provide python3-idle} - -%description idle -IDLE is Python’s Integrated Development and Learning Environment. - -IDLE has the following features: Python shell window (interactive -interpreter) with colorizing of code input, output, and error messages; -multi-window text editor with multiple undo, Python colorizing, -smart indent, call tips, auto completion, and other features; -search within any window, replace within editor windows, and -search through multiple files (grep); debugger with persistent -breakpoints, stepping, and viewing of global and local namespaces; -configuration, browsers, and other dialogs. - - -%package tkinter -Summary: A GUI toolkit for Python -Requires: %{name} = %{version}-%{release} - -%{?python_provide:%python_provide python3-tkinter} - -%description tkinter -The Tkinter (Tk interface) library is a graphical user interface toolkit for -the Python programming language. - - -%package test -Summary: The self-test suite for the main python3 package -Requires: %{name} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} - -%{?python_provide:%python_provide python3-test} - -%description test -The self-test suite for the Python interpreter. - -This is only useful to test Python itself. For testing general Python code, -you should use the unittest module from %{name}-libs, or a library such as -%{name}-pytest or %{name}-nose. - - -%if %{with debug_build} -%package debug -Summary: Debug version of the Python runtime - -# The debug build is an all-in-one package version of the regular build, and -# shares the same .py/.pyc files and directories as the regular build. Hence -# we depend on all of the subpackages of the regular build: -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: %{name}-devel%{?_isa} = %{version}-%{release} -Requires: %{name}-test%{?_isa} = %{version}-%{release} -Requires: %{name}-tkinter%{?_isa} = %{version}-%{release} -Requires: %{name}-idle%{?_isa} = %{version}-%{release} - -# In Fedora 31, /usr/bin/python-debug was moved here from Python 2. -Conflicts: python-debug < 3 - -%{?python_provide:%python_provide python3-debug} - -%description debug -python3-debug provides a version of the Python runtime with numerous debugging -features enabled, aimed at advanced Python users such as developers of Python -extension modules. - -This version uses more memory and will be slower than the regular Python build, -but is useful for tracking down reference-counting issues and other bugs. - -The debug build shares installation directories with the standard Python -runtime. Python modules -- source (.py), bytecode (.pyc), and C-API extensions -(.cpython*.so) -- are compatible between this and the standard version -of Python. - -The debug runtime additionally supports debug builds of C-API extensions -(with the "d" ABI flag) for debugging issues in those extensions. -%endif # with debug_build - -%else # with flatpackage - -# We'll not provide this, on purpose -# No package in Fedora shall ever depend on flatpackage via this -%global __requires_exclude ^python\\(abi\\) = 3\\..$ -%global __provides_exclude ^python\\(abi\\) = 3\\..$ - -%if %{with rpmwheels} -Requires: python-setuptools-wheel -Requires: python-pip-wheel -%else -Provides: bundled(python3-pip) = 19.2.3 -Provides: bundled(python3-setuptools) = 41.2.0 -%endif - -# The description for the flat package -%description -Python %{pybasever} package for developers. - -This package exists to allow developers to test their code against a newer -version of Python. This is not a full Python stack and if you wish to run -your applications with Python %{pybasever}, update your Fedora to a newer -version once Python %{pybasever} is stable. - -%endif # with flatpackage - -# ====================================================== -# The prep phase of the build: -# ====================================================== - -%prep -%gpgverify -k2 -s1 -d0 -%setup -q -n Python-%{upstream_version} -# Remove all exe files to ensure we are not shipping prebuilt binaries -# note that those are only used to create Microsoft Windows installers -# and that functionality is broken on Linux anyway -find -name '*.exe' -print -delete - -# Remove bundled libraries to ensure that we're using the system copy. -rm -r Modules/expat - -# -# Apply patches: -# -%patch1 -p1 - -%if "%{_lib}" == "lib64" -%patch102 -p1 -%endif -%patch111 -p1 - -%if %{with rpmwheels} -%patch189 -p1 -rm Lib/ensurepip/_bundled/*.whl -%endif - -%patch251 -p1 -%patch274 -p1 -%patch328 -p1 - - -# Remove files that should be generated by the build -# (This is after patching, so that we can use patches directly from upstream) -rm configure pyconfig.h.in - - -# ====================================================== -# Configuring and building the code: -# ====================================================== - -%build - -# Regenerate the configure script and pyconfig.h.in -autoconf -autoheader - -# Remember the current directory (which has sources and the configure script), -# so we can refer to it after we "cd" elsewhere. -topdir=$(pwd) - -# Get proper option names from bconds -%if %{with computed_gotos} -%global computed_gotos_flag yes -%else -%global computed_gotos_flag no -%endif - -%if %{with optimizations} -%global optimizations_flag "--enable-optimizations" -%else -%global optimizations_flag "--disable-optimizations" -%endif - -# Set common compiler/linker flags -# We utilize the %%extension_...flags macros here so users building C/C++ -# extensions with our python won't get all the compiler/linker flags used -# in Fedora RPMs. -# Standard library built here will still use the %%build_...flags, -# 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" -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} -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: -BuildPython() { - ConfName=$1 - ExtraConfigArgs=$2 - MoreCFlags=$3 - - # Each build is done in its own directory - ConfDir=build/$ConfName - echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName - mkdir -p $ConfDir - pushd $ConfDir - - # Normally, %%configure looks for the "configure" script in the current - # directory. - # Since we changed directories, we need to tell %%configure where to look. - %global _configure $topdir/configure - -%configure \ - --enable-ipv6 \ - --enable-shared \ - --with-computed-gotos=%{computed_gotos_flag} \ - --with-dbmliborder=gdbm:ndbm:bdb \ - --with-system-expat \ - --with-system-ffi \ - --enable-loadable-sqlite-extensions \ - --with-dtrace \ - --with-lto \ - --with-ssl-default-suites=openssl \ -%if %{with valgrind} - --with-valgrind \ -%endif - $ExtraConfigArgs \ - %{nil} - -%global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags" - -%if %{without bootstrap} - # Regenerate generated files (needs python3) - %make_build %{flags_override} regen-all PYTHON_FOR_REGEN="python%{pybasever}" -%endif - - # Invoke the build - %make_build %{flags_override} - - popd - echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfName -} - -# Call the above to build each configuration. - -%if %{with debug_build} -BuildPython debug \ - "--without-ensurepip --with-pydebug" \ - "-Og" -%endif # with debug_build - -BuildPython optimized \ - "--without-ensurepip %{optimizations_flag}" \ - "" - -# ====================================================== -# Installing the built code: -# ====================================================== - -%install - -# As in %%build, remember the current directory -topdir=$(pwd) - -# We install a collection of hooks for gdb that make it easier to debug -# executables linked against libpython3* (such as /usr/bin/python3 itself) -# -# These hooks are implemented in Python itself (though they are for the version -# of python that gdb is linked with) -# -# gdb-archer looks for them in the same path as the ELF file or its .debug -# file, with a -gdb.py suffix. -# We put them next to the debug file, because ldconfig would complain if -# it found non-library files directly in /usr/lib/ -# (see https://bugzilla.redhat.com/show_bug.cgi?id=562980) -# -# We'll put these files in the debuginfo package by installing them to e.g.: -# /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py -# (note that the debug path is /usr/lib/debug for both 32/64 bit) -# -# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more -# information - -%if %{with gdb_hooks} -DirHoldingGdbPy=%{_usr}/lib/debug/%{_libdir} -mkdir -p %{buildroot}$DirHoldingGdbPy -%endif # with gdb_hooks - -# Multilib support for pyconfig.h -# 32- and 64-bit versions of pyconfig.h are different. For multilib support -# (making it possible to install 32- and 64-bit versions simultaneously), -# we need to install them under different filenames, and to make the common -# "pyconfig.h" include the right file based on architecture. -# See https://bugzilla.redhat.com/show_bug.cgi?id=192747 -# Filanames are defined here: -%global _pyconfig32_h pyconfig-32.h -%global _pyconfig64_h pyconfig-64.h -%global _pyconfig_h pyconfig-%{wordsize}.h - -# Use a common function to do an install for all our configurations: -InstallPython() { - - ConfName=$1 - PyInstSoName=$2 - MoreCFlags=$3 - LDVersion=$4 - - # Switch to the directory with this configuration's built files - ConfDir=build/$ConfName - echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName - mkdir -p $ConfDir - pushd $ConfDir - - make \ - DESTDIR=%{buildroot} \ - INSTALL="install -p" \ - EXTRA_CFLAGS="$MoreCFlags" \ - install - - popd - -%if %{with gdb_hooks} - # See comment on $DirHoldingGdbPy above - PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName-%{version}-%{release}.%{_arch}.debug-gdb.py - cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy -%endif # with gdb_hooks - - # Rename the -devel script that differs on different arches to arch specific name - mv %{buildroot}%{_bindir}/python${LDVersion}-{,`uname -m`-}config - echo -e '#!/bin/sh\nexec `dirname $0`/python'${LDVersion}'-`uname -m`-config "$@"' > \ - %{buildroot}%{_bindir}/python${LDVersion}-config - echo '[ $? -eq 127 ] && echo "Could not find python'${LDVersion}'-`uname -m`-config. Look around to see available arches." >&2' >> \ - %{buildroot}%{_bindir}/python${LDVersion}-config - chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config - - # Make python3-devel multilib-ready - mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \ - %{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h} - cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF -#include - -#if __WORDSIZE == 32 -#include "%{_pyconfig32_h}" -#elif __WORDSIZE == 64 -#include "%{_pyconfig64_h}" -#else -#error "Unknown word size" -#endif -EOF - - echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName -} - -# Install the "debug" build first; any common files will be overridden with -# later builds -%if %{with debug_build} -InstallPython debug \ - %{py_INSTSONAME_debug} \ - -O0 \ - %{LDVERSION_debug} -%endif # with debug_build - -# Now the optimized build: -InstallPython optimized \ - %{py_INSTSONAME_optimized} \ - "" \ - %{LDVERSION_optimized} - -# Install directories for additional packages -install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__ -%if "%{_lib}" == "lib64" -# The 64-bit version needs to create "site-packages" in /usr/lib/ (for -# pure-Python modules) as well as in /usr/lib64/ (for packages with extension -# modules). -# Note that rpmlint will complain about hardcoded library path; -# this is intentional. -install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__ -%endif - -%if %{without flatpackage} -# add idle3 to menu -install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle3.png -install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle3.png -install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle3.png -desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10} - -# Install and validate appdata file -mkdir -p %{buildroot}%{_metainfodir} -cp -a %{SOURCE11} %{buildroot}%{_metainfodir} -appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/idle3.appdata.xml -%endif - -# Make sure distutils looks at the right pyconfig.h file -# See https://bugzilla.redhat.com/show_bug.cgi?id=201434 -# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate -# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py -# when python starts up (see https://bugzilla.redhat.com/show_bug.cgi?id=653058) -# -# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h -# variants: -sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \ - %{buildroot}%{pylibdir}/distutils/sysconfig.py \ - %{buildroot}%{pylibdir}/sysconfig.py - -# Install pathfix.py to bindir -# See https://github.com/fedora-python/python-rpm-porting/issues/24 -cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/ - -# Install i18n tools to bindir -# They are also in python2, so we version them -# https://bugzilla.redhat.com/show_bug.cgi?id=1571474 -for tool in pygettext msgfmt; do - cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{pybasever}.py - ln -s ${tool}%{pybasever}.py %{buildroot}%{_bindir}/${tool}3.py -done - -# Switch all shebangs to refer to the specific Python version. -# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$, -# so handle files named using other naming scheme separately. -LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \ - Tools/scripts/pathfix.py \ - -i "%{_bindir}/python%{pybasever}" -pn \ - %{buildroot} \ - %{buildroot}%{_bindir}/*%{pybasever}.py \ - %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py} - -# Remove tests for python3-tools which was removed in -# https://bugzilla.redhat.com/show_bug.cgi?id=1312030 -rm -rf %{buildroot}%{pylibdir}/test/test_tools - -# Remove shebang lines from .py files that aren't executable, and -# remove executability from .py files that don't have a shebang line: -find %{buildroot} -name \*.py \ - \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ - -print -exec sed -i '1d' {} \; \) -o \( \ - -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ - -exec chmod a-x {} \; \) \) - -# Get rid of DOS batch files: -find %{buildroot} -name \*.bat -exec rm {} \; - -# Get rid of backup files: -find %{buildroot}/ -name "*~" -exec rm -f {} \; -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:]]' || : - -# Since we have pathfix.py in bindir, this is created, but we don't want it -rm -rf %{buildroot}%{_bindir}/__pycache__ - -# Fixup permissions for shared libraries from non-standard 555 to standard 755: -find %{buildroot} -perm 555 -exec chmod 755 {} \; - -# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to -# avoid the user having to know the precise version and ABI flags. -# See e.g. https://bugzilla.redhat.com/show_bug.cgi?id=676748 -%if %{with debug_build} && %{without flatpackage} -ln -s \ - %{_bindir}/python%{LDVERSION_debug} \ - %{buildroot}%{_bindir}/python3-debug -%endif - -# There's 2to3-X.X executable and 2to3 soft link to it. -# No reason to have both, so keep only 2to3 as an executable. -# See https://bugzilla.redhat.com/show_bug.cgi?id=1111275 -mv %{buildroot}%{_bindir}/2to3-%{pybasever} %{buildroot}%{_bindir}/2to3 - -%if %{with flatpackage} -# Remove stuff that would conflict with python3 package -rm %{buildroot}%{_bindir}/python3 -rm %{buildroot}%{_bindir}/pydoc3 -rm %{buildroot}%{_bindir}/pathfix.py -rm %{buildroot}%{_bindir}/pygettext3.py -rm %{buildroot}%{_bindir}/msgfmt3.py -rm %{buildroot}%{_bindir}/idle3 -rm %{buildroot}%{_bindir}/python3-* -rm %{buildroot}%{_bindir}/2to3 -rm %{buildroot}%{_libdir}/libpython3.so -rm %{buildroot}%{_mandir}/man1/python3.1* -rm %{buildroot}%{_libdir}/pkgconfig/python3.pc -rm %{buildroot}%{_libdir}/pkgconfig/python3-embed.pc -%else -# Link the unversioned stuff -# https://fedoraproject.org/wiki/Changes/Python_means_Python3 -ln -s ./python3 %{buildroot}%{_bindir}/python -ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc -ln -s ./pygettext3.py %{buildroot}%{_bindir}/pygettext.py -ln -s ./msgfmt3.py %{buildroot}%{_bindir}/msgfmt.py -ln -s ./idle3 %{buildroot}%{_bindir}/idle -ln -s ./python3-config %{buildroot}%{_bindir}/python-config -ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1 -ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc -%if %{with debug_build} -ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug -%endif -%endif - - -# ====================================================== -# Checks for packaging issues -# ====================================================== - -%check - -# first of all, check timestamps of bytecode files -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} %{SOURCE8} - -# Ensure that the curses module was linked against libncursesw.so, rather than -# libncurses.so -# See https://bugzilla.redhat.com/show_bug.cgi?id=539917 -ldd %{buildroot}/%{dynload_dir}/_curses*.so \ - | grep curses \ - | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1) - -# Ensure that the debug modules are linked against the debug libpython, and -# likewise for the optimized modules and libpython: -for Module in %{buildroot}/%{dynload_dir}/*.so ; do - case $Module in - *.%{SOABI_debug}) - ldd $Module | grep %{py_INSTSONAME_optimized} && - (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1) - - ;; - *.%{SOABI_optimized}) - ldd $Module | grep %{py_INSTSONAME_debug} && - (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1) - ;; - esac -done - - -# ====================================================== -# Running the upstream test suite -# ====================================================== - -topdir=$(pwd) -CheckPython() { - ConfName=$1 - ConfDir=$(pwd)/build/$ConfName - - echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName - - # Note that we're running the tests using the version of the code in the - # builddir, not in the buildroot. - - # Show some info, helpful for debugging test failures - LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.pythoninfo - - # Run the upstream test suite - # test_gdb skipped on s390x: - # https://bugzilla.redhat.com/show_bug.cgi?id=1678277 - # test_gdb skipped everywhere: - # https://bugzilla.redhat.com/show_bug.cgi?id=1734327 - # test_distutils - # 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 \ - %if %{with bootstrap} - -x test_distutils \ - %endif - -x test_gdb \ - %ifarch %{mips64} - -x test_ctypes \ - %endif - - echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName - -} - -%if %{with tests} - -# Check each of the configurations: -%if %{with debug_build} -CheckPython debug -%endif # with debug_build -CheckPython optimized - -%endif # with tests - - -%files -%doc README.rst - -%if %{without flatpackage} -%{_bindir}/pydoc* -%{_bindir}/python3 -%else -%{_bindir}/pydoc%{pybasever} -%endif - -%{_bindir}/python%{pybasever} -%{_bindir}/python%{LDVERSION_optimized} -%{_mandir}/*/*3* - - -%if %{without flatpackage} -%files -n python-unversioned-command -%{_bindir}/python -%{_mandir}/*/python.1* - -%files libs -%doc README.rst -%endif - -%dir %{pylibdir} -%dir %{dynload_dir} - -%license %{pylibdir}/LICENSE.txt - -%{pylibdir}/lib2to3 -%if %{without flatpackage} -%exclude %{pylibdir}/lib2to3/tests -%endif - -%dir %{pylibdir}/unittest/ -%dir %{pylibdir}/unittest/__pycache__/ -%{pylibdir}/unittest/*.py -%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes} - -%dir %{pylibdir}/asyncio/ -%dir %{pylibdir}/asyncio/__pycache__/ -%{pylibdir}/asyncio/*.py -%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes} - -%dir %{pylibdir}/venv/ -%dir %{pylibdir}/venv/__pycache__/ -%{pylibdir}/venv/*.py -%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes} -%{pylibdir}/venv/scripts - -%{pylibdir}/wsgiref -%{pylibdir}/xmlrpc - -%dir %{pylibdir}/ensurepip/ -%dir %{pylibdir}/ensurepip/__pycache__/ -%{pylibdir}/ensurepip/*.py -%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes} - -%if %{with rpmwheels} -%exclude %{pylibdir}/ensurepip/_bundled -%else -%dir %{pylibdir}/ensurepip/_bundled -%{pylibdir}/ensurepip/_bundled/*.whl -%endif - -%dir %{pylibdir}/concurrent/ -%dir %{pylibdir}/concurrent/__pycache__/ -%{pylibdir}/concurrent/*.py -%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes} - -%dir %{pylibdir}/concurrent/futures/ -%dir %{pylibdir}/concurrent/futures/__pycache__/ -%{pylibdir}/concurrent/futures/*.py -%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes} - -%{pylibdir}/pydoc_data - -%{dynload_dir}/_blake2.%{SOABI_optimized}.so -%{dynload_dir}/_md5.%{SOABI_optimized}.so -%{dynload_dir}/_sha1.%{SOABI_optimized}.so -%{dynload_dir}/_sha256.%{SOABI_optimized}.so -%{dynload_dir}/_sha3.%{SOABI_optimized}.so -%{dynload_dir}/_sha512.%{SOABI_optimized}.so - -%{dynload_dir}/_asyncio.%{SOABI_optimized}.so -%{dynload_dir}/_bisect.%{SOABI_optimized}.so -%{dynload_dir}/_bz2.%{SOABI_optimized}.so -%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so -%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so -%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so -%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so -%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so -%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so -%{dynload_dir}/_contextvars.%{SOABI_optimized}.so -%{dynload_dir}/_crypt.%{SOABI_optimized}.so -%{dynload_dir}/_csv.%{SOABI_optimized}.so -%{dynload_dir}/_ctypes.%{SOABI_optimized}.so -%{dynload_dir}/_curses.%{SOABI_optimized}.so -%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so -%{dynload_dir}/_dbm.%{SOABI_optimized}.so -%{dynload_dir}/_decimal.%{SOABI_optimized}.so -%{dynload_dir}/_elementtree.%{SOABI_optimized}.so -%if %{with gdbm} -%{dynload_dir}/_gdbm.%{SOABI_optimized}.so -%endif -%{dynload_dir}/_hashlib.%{SOABI_optimized}.so -%{dynload_dir}/_heapq.%{SOABI_optimized}.so -%{dynload_dir}/_json.%{SOABI_optimized}.so -%{dynload_dir}/_lsprof.%{SOABI_optimized}.so -%{dynload_dir}/_lzma.%{SOABI_optimized}.so -%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so -%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so -%{dynload_dir}/_opcode.%{SOABI_optimized}.so -%{dynload_dir}/_pickle.%{SOABI_optimized}.so -%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so -%{dynload_dir}/_queue.%{SOABI_optimized}.so -%{dynload_dir}/_random.%{SOABI_optimized}.so -%{dynload_dir}/_socket.%{SOABI_optimized}.so -%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so -%{dynload_dir}/_ssl.%{SOABI_optimized}.so -%{dynload_dir}/_statistics.%{SOABI_optimized}.so -%{dynload_dir}/_struct.%{SOABI_optimized}.so -%{dynload_dir}/array.%{SOABI_optimized}.so -%{dynload_dir}/audioop.%{SOABI_optimized}.so -%{dynload_dir}/binascii.%{SOABI_optimized}.so -%{dynload_dir}/cmath.%{SOABI_optimized}.so -%{dynload_dir}/_datetime.%{SOABI_optimized}.so -%{dynload_dir}/fcntl.%{SOABI_optimized}.so -%{dynload_dir}/grp.%{SOABI_optimized}.so -%{dynload_dir}/math.%{SOABI_optimized}.so -%{dynload_dir}/mmap.%{SOABI_optimized}.so -%{dynload_dir}/nis.%{SOABI_optimized}.so -%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so -%{dynload_dir}/parser.%{SOABI_optimized}.so -%{dynload_dir}/_posixshmem.%{SOABI_optimized}.so -%{dynload_dir}/pyexpat.%{SOABI_optimized}.so -%{dynload_dir}/readline.%{SOABI_optimized}.so -%{dynload_dir}/resource.%{SOABI_optimized}.so -%{dynload_dir}/select.%{SOABI_optimized}.so -%{dynload_dir}/spwd.%{SOABI_optimized}.so -%{dynload_dir}/syslog.%{SOABI_optimized}.so -%{dynload_dir}/termios.%{SOABI_optimized}.so -%{dynload_dir}/unicodedata.%{SOABI_optimized}.so -%{dynload_dir}/_uuid.%{SOABI_optimized}.so -%{dynload_dir}/xxlimited.%{SOABI_optimized}.so -%{dynload_dir}/_xxsubinterpreters.%{SOABI_optimized}.so -%{dynload_dir}/zlib.%{SOABI_optimized}.so - -%dir %{pylibdir}/site-packages/ -%dir %{pylibdir}/site-packages/__pycache__/ -%{pylibdir}/site-packages/README.txt -%{pylibdir}/*.py -%dir %{pylibdir}/__pycache__/ -%{pylibdir}/__pycache__/*%{bytecode_suffixes} - -%dir %{pylibdir}/collections/ -%dir %{pylibdir}/collections/__pycache__/ -%{pylibdir}/collections/*.py -%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes} - -%dir %{pylibdir}/ctypes/ -%dir %{pylibdir}/ctypes/__pycache__/ -%{pylibdir}/ctypes/*.py -%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes} -%{pylibdir}/ctypes/macholib - -%{pylibdir}/curses - -%dir %{pylibdir}/dbm/ -%dir %{pylibdir}/dbm/__pycache__/ -%{pylibdir}/dbm/*.py -%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes} - -%dir %{pylibdir}/distutils/ -%dir %{pylibdir}/distutils/__pycache__/ -%{pylibdir}/distutils/*.py -%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes} -%{pylibdir}/distutils/README -%{pylibdir}/distutils/command - -%dir %{pylibdir}/email/ -%dir %{pylibdir}/email/__pycache__/ -%{pylibdir}/email/*.py -%{pylibdir}/email/__pycache__/*%{bytecode_suffixes} -%{pylibdir}/email/mime -%doc %{pylibdir}/email/architecture.rst - -%{pylibdir}/encodings - -%{pylibdir}/html -%{pylibdir}/http - -%dir %{pylibdir}/importlib/ -%dir %{pylibdir}/importlib/__pycache__/ -%{pylibdir}/importlib/*.py -%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes} - -%dir %{pylibdir}/json/ -%dir %{pylibdir}/json/__pycache__/ -%{pylibdir}/json/*.py -%{pylibdir}/json/__pycache__/*%{bytecode_suffixes} - -%{pylibdir}/logging -%{pylibdir}/multiprocessing - -%dir %{pylibdir}/sqlite3/ -%dir %{pylibdir}/sqlite3/__pycache__/ -%{pylibdir}/sqlite3/*.py -%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes} - -%if %{without flatpackage} -%exclude %{pylibdir}/turtle.py -%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} -%endif - -%{pylibdir}/urllib -%{pylibdir}/xml - -%if "%{_lib}" == "lib64" -%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever} -%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages -%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/ -%endif - -# "Makefile" and the config-32/64.h file are needed by -# distutils/sysconfig.py:_init_posix(), so we include them in the core -# package, along with their parent directories (bug 531901): -%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/ -%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile -%dir %{_includedir}/python%{LDVERSION_optimized}/ -%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} - -%{_libdir}/%{py_INSTSONAME_optimized} -%if %{without flatpackage} -%{_libdir}/libpython3.so -%endif - - -%if %{without flatpackage} -%files devel -%{_bindir}/2to3 -%endif - -%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/* -%if %{without flatpackage} -%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile -%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} -%endif -%{_includedir}/python%{LDVERSION_optimized}/*.h -%{_includedir}/python%{LDVERSION_optimized}/internal/ -%{_includedir}/python%{LDVERSION_optimized}/cpython/ -%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit - -%if %{without flatpackage} -%{_bindir}/python3-config -%{_bindir}/python-config -%{_libdir}/pkgconfig/python3.pc -%{_libdir}/pkgconfig/python.pc -%{_libdir}/pkgconfig/python3-embed.pc -%{_bindir}/pathfix.py -%{_bindir}/pygettext3.py -%{_bindir}/pygettext.py -%{_bindir}/msgfmt3.py -%{_bindir}/msgfmt.py -%endif - -%{_bindir}/pygettext%{pybasever}.py -%{_bindir}/msgfmt%{pybasever}.py - -%{_bindir}/python%{pybasever}-config -%{_bindir}/python%{LDVERSION_optimized}-config -%{_bindir}/python%{LDVERSION_optimized}-*-config -%{_libdir}/libpython%{LDVERSION_optimized}.so -%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc -%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}-embed.pc -%{_libdir}/pkgconfig/python-%{pybasever}.pc -%{_libdir}/pkgconfig/python-%{pybasever}-embed.pc - - -%if %{without flatpackage} -%files idle - -%{_bindir}/idle* -%else -%{_bindir}/idle%{pybasever} -%endif - -%{pylibdir}/idlelib - -%if %{without flatpackage} -%{_metainfodir}/idle3.appdata.xml -%{_datadir}/applications/idle3.desktop -%{_datadir}/icons/hicolor/*/apps/idle3.* -%endif - -%if %{without flatpackage} -%files tkinter -%endif - -%{pylibdir}/tkinter -%if %{without flatpackage} -%exclude %{pylibdir}/tkinter/test -%endif -%{dynload_dir}/_tkinter.%{SOABI_optimized}.so -%{pylibdir}/turtle.py -%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} -%dir %{pylibdir}/turtledemo -%{pylibdir}/turtledemo/*.py -%{pylibdir}/turtledemo/*.cfg -%dir %{pylibdir}/turtledemo/__pycache__/ -%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes} - - -%if %{without flatpackage} -%files test -%endif - -%{pylibdir}/ctypes/test -%{pylibdir}/distutils/tests -%{pylibdir}/sqlite3/test -%{pylibdir}/test -%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so -%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so -%{dynload_dir}/_testcapi.%{SOABI_optimized}.so -%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so -%{dynload_dir}/_testinternalcapi.%{SOABI_optimized}.so -%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so -%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so -%{pylibdir}/lib2to3/tests -%{pylibdir}/tkinter/test -%{pylibdir}/unittest/test - -# We don't bother splitting the debug build out into further subpackages: -# if you need it, you're probably a developer. - -# Hence the manifest is the combination of analogous files in the manifests of -# all of the other subpackages - -%if %{with debug_build} -%if %{without flatpackage} -%files debug -%{_bindir}/python3-debug -%{_bindir}/python-debug -%endif - -# Analog of the core subpackage's files: -%{_bindir}/python%{LDVERSION_debug} - -# Analog of the -libs subpackage's files: -# ...with debug builds of the built-in "extension" modules: - -%{dynload_dir}/_blake2.%{SOABI_debug}.so -%{dynload_dir}/_md5.%{SOABI_debug}.so -%{dynload_dir}/_sha1.%{SOABI_debug}.so -%{dynload_dir}/_sha256.%{SOABI_debug}.so -%{dynload_dir}/_sha3.%{SOABI_debug}.so -%{dynload_dir}/_sha512.%{SOABI_debug}.so - -%{dynload_dir}/_asyncio.%{SOABI_debug}.so -%{dynload_dir}/_bisect.%{SOABI_debug}.so -%{dynload_dir}/_bz2.%{SOABI_debug}.so -%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so -%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so -%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so -%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so -%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so -%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so -%{dynload_dir}/_contextvars.%{SOABI_debug}.so -%{dynload_dir}/_crypt.%{SOABI_debug}.so -%{dynload_dir}/_csv.%{SOABI_debug}.so -%{dynload_dir}/_ctypes.%{SOABI_debug}.so -%{dynload_dir}/_curses.%{SOABI_debug}.so -%{dynload_dir}/_curses_panel.%{SOABI_debug}.so -%{dynload_dir}/_dbm.%{SOABI_debug}.so -%{dynload_dir}/_decimal.%{SOABI_debug}.so -%{dynload_dir}/_elementtree.%{SOABI_debug}.so -%if %{with gdbm} -%{dynload_dir}/_gdbm.%{SOABI_debug}.so -%endif -%{dynload_dir}/_hashlib.%{SOABI_debug}.so -%{dynload_dir}/_heapq.%{SOABI_debug}.so -%{dynload_dir}/_json.%{SOABI_debug}.so -%{dynload_dir}/_lsprof.%{SOABI_debug}.so -%{dynload_dir}/_lzma.%{SOABI_debug}.so -%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so -%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so -%{dynload_dir}/_opcode.%{SOABI_debug}.so -%{dynload_dir}/_pickle.%{SOABI_debug}.so -%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so -%{dynload_dir}/_queue.%{SOABI_debug}.so -%{dynload_dir}/_random.%{SOABI_debug}.so -%{dynload_dir}/_socket.%{SOABI_debug}.so -%{dynload_dir}/_sqlite3.%{SOABI_debug}.so -%{dynload_dir}/_ssl.%{SOABI_debug}.so -%{dynload_dir}/_statistics.%{SOABI_debug}.so -%{dynload_dir}/_struct.%{SOABI_debug}.so -%{dynload_dir}/array.%{SOABI_debug}.so -%{dynload_dir}/audioop.%{SOABI_debug}.so -%{dynload_dir}/binascii.%{SOABI_debug}.so -%{dynload_dir}/cmath.%{SOABI_debug}.so -%{dynload_dir}/_datetime.%{SOABI_debug}.so -%{dynload_dir}/fcntl.%{SOABI_debug}.so -%{dynload_dir}/grp.%{SOABI_debug}.so -%{dynload_dir}/math.%{SOABI_debug}.so -%{dynload_dir}/mmap.%{SOABI_debug}.so -%{dynload_dir}/nis.%{SOABI_debug}.so -%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so -%{dynload_dir}/parser.%{SOABI_debug}.so -%{dynload_dir}/_posixshmem.%{SOABI_debug}.so -%{dynload_dir}/pyexpat.%{SOABI_debug}.so -%{dynload_dir}/readline.%{SOABI_debug}.so -%{dynload_dir}/resource.%{SOABI_debug}.so -%{dynload_dir}/select.%{SOABI_debug}.so -%{dynload_dir}/spwd.%{SOABI_debug}.so -%{dynload_dir}/syslog.%{SOABI_debug}.so -%{dynload_dir}/termios.%{SOABI_debug}.so -%{dynload_dir}/unicodedata.%{SOABI_debug}.so -%{dynload_dir}/_uuid.%{SOABI_debug}.so -%{dynload_dir}/_xxsubinterpreters.%{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 -# do for the regular build above (bug 531901), since they're all in one package -# now; they're listed below, under "-devel": - -%{_libdir}/%{py_INSTSONAME_debug} - -# Analog of the -devel subpackage's files: -%{pylibdir}/config-%{LDVERSION_debug}-%{_arch}-linux%{_gnu} -%{_includedir}/python%{LDVERSION_debug} -%{_bindir}/python%{LDVERSION_debug}-config -%{_bindir}/python%{LDVERSION_debug}-*-config -%{_libdir}/libpython%{LDVERSION_debug}.so -%{_libdir}/libpython%{LDVERSION_debug}.so.1.0 -%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc -%{_libdir}/pkgconfig/python-%{LDVERSION_debug}-embed.pc - -# Analog of the -tools subpackage's files: -# None for now; we could build precanned versions that have the appropriate -# shebang if needed - -# Analog of the tkinter subpackage's files: -%{dynload_dir}/_tkinter.%{SOABI_debug}.so - -# Analog of the -test subpackage's files: -%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so -%{dynload_dir}/_testbuffer.%{SOABI_debug}.so -%{dynload_dir}/_testcapi.%{SOABI_debug}.so -%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so -%{dynload_dir}/_testinternalcapi.%{SOABI_debug}.so -%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so - -%endif # with debug_build - -# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from ldconfig -# See https://bugzilla.redhat.com/show_bug.cgi?id=562980 -# -# The /usr/lib/rpm/redhat/macros defines %%__debug_package to use -# debugfiles.list, and it appears that everything below /usr/lib/debug and -# (/usr/src/debug) gets added to this file (via LISTFILES) in -# /usr/lib/rpm/find-debuginfo.sh -# -# Hence by installing it below /usr/lib/debug we ensure it is added to the -# -debuginfo subpackage -# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py -# payload file would be unpackaged) - -# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1476593 -%undefine _debuginfo_subpackages - -# ====================================================== -# Finally, the changelog: -# ====================================================== - -%changelog -* Mon Oct 14 2019 Miro Hrončok - 3.8.0-1 -- Update to Python 3.8.0 final - -* Tue Oct 01 2019 Miro Hrončok - 3.8.0~rc1-1 -- Rebased to Python 3.8.0rc1 - -* Sat Aug 31 2019 Miro Hrončok - 3.8.0~b4-1 -- Rebased to Python 3.8.0b4 -- Enable Profile-guided optimization for all arches, not just x86 (#1741015) - -* Mon Jul 29 2019 Miro Hrončok - 3.8.0~b3-1 -- Update to 3.8.0b3 - -* Fri Jul 26 2019 Fedora Release Engineering - 3.8.0~b2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Jul 05 2019 Miro Hrončok - 3.8.0~b2-1 -- Update to 3.8.0b2 - -* Wed Jun 05 2019 Miro Hrončok - 3.8.0~b1-1 -- Update to 3.8.0b1 - -* Fri May 17 2019 Miro Hrončok - 3.8.0~a4-2 -- Remove a faulty patch that resulted in invalid value of - distutils.sysconfig.get_config_var('LIBPL') (#1710767) - -* Tue May 07 2019 Miro Hrončok - 3.8.0~a4-1 -- Update to 3.8.0a4 - -* Tue Mar 26 2019 Miro Hrončok - 3.8.0~a3-1 -- Update to 3.8.0a3 - -* Mon Feb 25 2019 Miro Hrončok - 3.8.0~a2-1 -- Update to 3.8.0a2 - -* Mon Feb 18 2019 Miro Hrončok - 3.8.0~a1-3 -- Reduced default build flags used to build extension modules - https://fedoraproject.org/wiki/Changes/Python_Extension_Flags - -* Sun Feb 17 2019 Igor Gnatenko - 3.8.0~a1-2 -- Rebuild for readline 8.0 - -* Tue Feb 05 2019 Miro Hrončok - 3.8.0~a1-1 -- Update to 3.8.0a1 diff --git a/python39.rpmlintrc b/python39.rpmlintrc new file mode 100644 index 0000000..1314d45 --- /dev/null +++ b/python39.rpmlintrc @@ -0,0 +1,80 @@ +# KNOWN BUGS: +# https://bugzilla.redhat.com/show_bug.cgi?id=1489816 +addFilter(r'crypto-policy-non-compliance-openssl') + + +# TESTS: +addFilter(r'(zero-length|pem-certificate|uncompressed-zip) /usr/lib(64)?/python3.\d/test') + + +# OTHER DELIBERATES: +# chroot function +addFilter(r'missing-call-to-chdir-with-chroot') + +# intentionally unversioned and selfobsoleted +addFilter(r'unversioned-explicit-obsoletes python') +addFilter(r'self-obsoletion python3\d obsoletes python3\d') + +# intentionally hardcoded +addFilter(r'hardcoded-library-path in %{_prefix}/lib/(debug/%{_libdir}|python%{pybasever})') + +# intentional for our pythonXY package +addFilter(r'python3\d\.[^:]+: (E|W): devel-file-in-non-devel-package') + +# we have non binary stuff, python files +addFilter(r'only-non-binary-in-usr-lib') + +# some devel files that are deliberately needed +addFilter(r'devel-file-in-non-devel-package /usr/include/python3\.\dm/pyconfig-(32|64)\.h') +addFilter(r'devel-file-in-non-devel-package /usr/lib(64)?/python3\.\d/distutils/tests/xxmodule\.c') + + +# SORRY, NOT SORRY: +# manual pages +addFilter(r'no-manual-page-for-binary (idle|pydoc|pyvenv|2to3|python3-debug|pathfix|msgfmt|pygettext)') +addFilter(r'no-manual-page-for-binary python3.*-config$') +addFilter(r'no-manual-page-for-binary python3.\dd?m$') + +# missing documentation from subpackages +addFilter(r'^python3\d?-(debug|tkinter|test|idle)\.[^:]+: (E|W): no-documentation') + +# platform python is obsoleted, but not provided +addFilter(r'obsolete-not-provided platform-python') + + +# RPMLINT IMPERFECTIONS +# https://github.com/rpm-software-management/rpmlint/issues/123 +addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3393') +# https://github.com/rpm-software-management/rpmlint/pull/133 +addFilter(r'python-bytecode-wrong-magic-value .* expected 33\d\d \(3\.7\), found 3394') + +# https://bugzilla.redhat.com/show_bug.cgi?id=1550562 +# https://github.com/rpm-software-management/rpmlint/issues/128 +addFilter(r'python-bytecode-inconsistent-mtime .* 1970') + +# debugsource +addFilter(r'^python3\d?-debugsource\.[^:]+: (E|W): no-documentation') + +# debuginfo +addFilter(r'^python3\d?-debuginfo\.[^:]+: (E|W): useless-provides debuginfo\(build-id\)') + +# this is OK for F28+ +addFilter(r'library-without-ldconfig-post') + +# debug package contains devel and non-devel files +addFilter(r'python3\d?-debug.[^:]+: (E|W): (non-)?devel-file-in-(non-)?devel-package') + +# this goes to other subpackage, hence not actually dangling, the read error is bogus +addFilter(r'dangling-relative-symlink /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc python-3\.\d\.pc') +addFilter(r'read-error /usr/lib(64)?/pkgconfig/python-3\.\ddm\.pc \[Errno 2\]') + +# we need this macro to evaluate, even if the line starts with # +addFilter(r'macro-in-comment %\{_pyconfig(32|64)_h\}') + +# Python modules don't need to be linked against libc +# Since 3.8 they are no longer linked against libpython3.8.so.1.0 +addFilter(r'E: library-not-linked-against-libc /usr/lib(64)?/python3.\d/lib-dynload/') +addFilter(r'E: shared-lib-without-dependency-information /usr/lib(64)?/python3.\d/lib-dynload/') + +# SPELLING ERRORS +addFilter(r'spelling-error .* en_US (bytecode|pyc|filename|tkinter|namespaces|pytest) ') diff --git a/python39.spec b/python39.spec new file mode 100644 index 0000000..d0c08aa --- /dev/null +++ b/python39.spec @@ -0,0 +1,1578 @@ +# ================== +# Top-level metadata +# ================== + +%global pybasever 3.9 + +# pybasever without the dot: +%global pyshortver 39 + +Name: python%{pyshortver} +Summary: Version %{pybasever} of the Python interpreter +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}.0 +%global prerel a1 +%global upstream_version %{general_version}%{?prerel} +Version: %{general_version}%{?prerel:~%{prerel}} +Release: 1%{?dist} +License: Python + + +# ================================== +# Conditionals controlling the build +# ================================== + +# Note that the bcond macros are named for the CLI option they create. +# "%%bcond_without" means "ENABLE by default and create a --without option" + + +# Flat package, i.e. python36, python37, python38 for tox etc. +# warning: changes some other defaults +# in Fedora, never turn this on for the python3 package +# and always keep it on for python37 etc. +# WARNING: This does not change the package name and summary above +%bcond_without flatpackage + +# When bootstrapping python3, we need to build setuptools. +# but setuptools BR python3-devel and that brings in python3-rpm-generators; +# python3-rpm-generators needs python3-setuptools, so we cannot have it yet. +# +# Procedure: https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython +# +# IMPORTANT: When bootstrapping, it's very likely the wheels for pip and +# setuptools are not available. Turn off the rpmwheels bcond until +# the two packages are built with wheels to get around the issue. +%bcond_with bootstrap + +# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package +# Uses upstream bundled prebuilt wheels otherwise +%bcond_without rpmwheels + +# Expensive optimizations (mainly, profile-guided optimizations) +%bcond_without optimizations + +# Run the test suite in %%check +%bcond_without tests + +# Extra build for debugging the interpreter or C-API extensions +# (the -debug subpackages) +%if %{with flatpackage} +%bcond_with debug_build +%else +%bcond_without debug_build +%endif + +# Support for the GDB debugger +%bcond_without gdb_hooks + +# The dbm.gnu module (key-value database) +%bcond_without gdbm + +# Main interpreter loop optimization +%bcond_without computed_gotos + +# Support for the Valgrind debugger/profiler +%ifarch %{valgrind_arches} +%bcond_without valgrind +%else +%bcond_with valgrind +%endif + + +# ===================== +# General global macros +# ===================== + +%global pylibdir %{_libdir}/python%{pybasever} +%global dynload_dir %{pylibdir}/lib-dynload + +# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac +# See PEP 3149 for some background: http://www.python.org/dev/peps/pep-3149/ +%global ABIFLAGS_optimized %{nil} +%global ABIFLAGS_debug d + +%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized} +%global LDVERSION_debug %{pybasever}%{ABIFLAGS_debug} + +%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu} +%global SOABI_debug cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu} + +# All bytecode files are in a __pycache__ subdirectory, with a name +# reflecting the version of the bytecode. +# See PEP 3147: http://www.python.org/dev/peps/pep-3147/ +# For example, +# foo/bar.py +# has bytecode at: +# foo/__pycache__/bar.cpython-%%{pyshortver}.pyc +# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc +# foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc +%global bytecode_suffixes .cpython-%{pyshortver}*.pyc + +# Python's configure script defines SOVERSION, and this is used in the Makefile +# to determine INSTSONAME, the name of the libpython DSO: +# LDLIBRARY='libpython$(VERSION).so' +# INSTSONAME="$LDLIBRARY".$SOVERSION +# We mirror this here in order to make it easier to add the -gdb.py hooks. +# (if these get out of sync, the payload of the libs subpackage will fail +# and halt the build) +%global py_SOVERSION 1.0 +%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION} +%global py_INSTSONAME_debug libpython%{LDVERSION_debug}.so.%{py_SOVERSION} + +# Disable automatic bytecompilation. The python3 binary is not yet be +# available in /usr/bin when Python is built. Also, the bytecompilation fails +# 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 +# ======================= + +# (keep this list alphabetized) + +BuildRequires: autoconf +BuildRequires: bluez-libs-devel +BuildRequires: bzip2 +BuildRequires: bzip2-devel +BuildRequires: desktop-file-utils +BuildRequires: expat-devel + +BuildRequires: findutils +BuildRequires: gcc-c++ +%if %{with gdbm} +BuildRequires: gdbm-devel +%endif +BuildRequires: glibc-all-langpacks +BuildRequires: glibc-devel +BuildRequires: gmp-devel +BuildRequires: gnupg2 +BuildRequires: libappstream-glib +BuildRequires: libffi-devel +BuildRequires: libnsl2-devel +BuildRequires: libtirpc-devel +BuildRequires: libGL-devel +BuildRequires: libuuid-devel +BuildRequires: libX11-devel +BuildRequires: ncurses-devel + +BuildRequires: openssl-devel +BuildRequires: pkgconfig +BuildRequires: readline-devel +BuildRequires: redhat-rpm-config >= 127 +BuildRequires: sqlite-devel +BuildRequires: gdb + +BuildRequires: tar +BuildRequires: tcl-devel +BuildRequires: tix-devel +BuildRequires: tk-devel + +%if %{with valgrind} +BuildRequires: valgrind-devel +%endif + +BuildRequires: xz-devel +BuildRequires: zlib-devel + +BuildRequires: /usr/bin/dtrace + +# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig) +BuildRequires: /usr/sbin/ifconfig + +# For %%python_provide +BuildRequires: python-rpm-macros + +%if %{with rpmwheels} +BuildRequires: python-setuptools-wheel +BuildRequires: python-pip-wheel +%endif + +%if %{without bootstrap} +# for make regen-all and distutils.tests.test_bdist_rpm +BuildRequires: python%{pyshortver} +%endif + +# ======================= +# Source code and patches +# ======================= + +Source0: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz +Source1: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz.asc +Source2: %{url}static/files/pubkeys.txt + +# A simple script to check timestamps of bytecode files +# Run in check section with Python that is currently being built +# Originally written by bkabrda +Source8: check-pyc-timestamps.py + +# Desktop menu entry for idle3 +Source10: idle3.desktop + +# AppData file for idle3 +Source11: idle3.appdata.xml + +# 00001 # +# Fixup distutils/unixccompiler.py to remove standard library path from rpath: +# Was Patch0 in ivazquez' python3000 specfile: +Patch1: 00001-rpath.patch + +# 00102 # +# Change the various install paths to use /usr/lib64/ instead or /usr/lib +# Only used when "%%{_lib}" == "lib64" +# Not yet sent upstream. +Patch102: 00102-lib64.patch + +# 00111 # +# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build +# a libpythonMAJOR.MINOR.a +# See https://bugzilla.redhat.com/show_bug.cgi?id=556092 +# Downstream only: not appropriate for upstream +Patch111: 00111-no-static-lib.patch + +# 00189 # +# Instead of bundled wheels, use our RPM packaged wheels from +# /usr/share/python-wheels +# Downstream only: upstream bundles +# We might eventually pursuit upstream support, but it's low prio +Patch189: 00189-use-rpm-wheels.patch + +# 00251 +# Set values of prefix and exec_prefix in distutils install command +# to /usr/local if executable is /usr/bin/python* and RPM build +# is not detected to make pip and distutils install into separate location +# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe +# Downstream only: Awaiting resources to work on upstream PEP +Patch251: 00251-change-user-install-location.patch + +# 00274 # +# Upstream uses Debian-style architecture naming. Change to match Fedora. +Patch274: 00274-fix-arch-names.patch + +# 00328 # +# Restore pyc to TIMESTAMP invalidation mode as default in rpmbubild +# See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426 +# Downstream only: only used when building RPM packages +# Ideally, we should talk to upstream and explain why we don't want this +Patch328: 00328-pyc-timestamp-invalidation-mode.patch + +# (New patches go here ^^^) +# +# When adding new patches to "python" and "python3" in Fedora, EL, etc., +# please try to keep the patch numbers in-sync between all specfiles. +# +# More information, and a patch number catalog, is at: +# +# https://fedoraproject.org/wiki/SIGs/Python/PythonPatches +# +# The patches are stored and rebased at: +# +# https://github.com/fedora-python/cpython + + +# ========================================== +# Descriptions, and metadata for subpackages +# ========================================== + +# People might want to dnf install pythonX.Y instead of pythonXY; +# we enable this in both flat and nonflat package. +Provides: python%{pybasever} = %{version}-%{release} + +%if %{without flatpackage} + +# Packages with Python modules in standard locations automatically +# depend on python(abi). Provide that here. +Provides: python(abi) = %{pybasever} + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +# In order to support multiple Python interpreters for development purposes, +# packages with the naming scheme flatpackage (e.g. python35) exist for +# non-default versions of Python 3. +# For consistency, and to keep the upgrade path clean, we Provide/Obsolete +# these names here. +Provides: python%{pyshortver} = %{version}-%{release} +# Note that using Obsoletes without package version is not standard practice. +# Here we assert that *any* version of the system's default interpreter is +# preferable to an "extra" interpreter. For example, python3-3.6.1 will +# replace python36-3.6.2. +Obsoletes: python%{pyshortver} + +# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package +# https://fedoraproject.org/wiki/Changes/Python_means_Python3 +# We recommend /usr/bin/python so users get it by default +# Versioned recommends are problematic, and we know that the package requires +# python3 back with fixed version, so we just use the path here: +Recommends: %{_bindir}/python + +# In Fedora 31, /usr/bin/pydoc was moved here from Python 2. +# Ideally we'd have an explicit conflict with "/usr/bin/pydoc < 3", +# but file provides aren't versioned and the file moved across packages. +# Instead, we rely on the conflict in python3-libs. + +# Previously, this was required for our rewheel patch to work. +# This is technically no longer needed, but we keep it recommended +# for the developer experience. +Recommends: python3-setuptools +Recommends: python3-pip + +# This prevents ALL subpackages built from this spec to require +# /usr/bin/python3*. Granularity per subpackage is impossible. +# It's intended for the libs package not to drag in the interpreter, see +# https://bugzilla.redhat.com/show_bug.cgi?id=1547131 +# All others require %%{name} anyway. +%global __requires_exclude ^/usr/bin/python3 + + +# The description used both for the SRPM and the main `python3` subpackage: +%description +Python is an accessible, high-level, dynamically typed, interpreted programming +language, designed with an emphasis on code readability. +It includes an extensive standard library, and has a vast ecosystem of +third-party libraries. + +The %{name} package provides the "python3" executable: the reference +interpreter for the Python language, version 3. +The majority of its standard library is provided in the %{name}-libs package, +which should be installed automatically along with %{name}. +The remaining parts of the Python standard library are broken out into the +%{name}-tkinter and %{name}-test packages, which may need to be installed +separately. + +Documentation for Python is provided in the %{name}-docs package. + +Packages containing additional libraries for Python are generally named with +the "%{name}-" prefix. + + +# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package +# https://fedoraproject.org/wiki/Changes/Python_means_Python3 +%package -n python-unversioned-command +Summary: The "python" command that runs Python 3 +BuildArch: noarch + +# In theory this could require any python3 version +Requires: python3 == %{version}-%{release} +# But since we want to provide versioned python, we require exact version +Provides: python = %{version}-%{release} +# This also save us an explicit conflict for older python3 builds + +%description -n python-unversioned-command +This package contains /usr/bin/python - the "python" command that runs Python 3. + + +%package libs +Summary: Python runtime libraries + +%if %{with rpmwheels} +Requires: python-setuptools-wheel +Requires: python-pip-wheel +%else +Provides: bundled(python3-pip) = 19.2.3 +Provides: bundled(python3-setuptools) = 41.2.0 +%endif + +%{?python_provide:%python_provide python3-libs} + +# There are files in the standard library that have python shebang. +# We've filtered the automatic requirement out so libs are installable without +# the main package. This however makes it pulled in by default. +# See https://bugzilla.redhat.com/show_bug.cgi?id=1547131 +Recommends: %{name}%{?_isa} = %{version}-%{release} + +# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package +# In Fedora 31, several "unversioned" files like /usr/bin/pydoc and all the +# "unversioned" provides were moved from python2 to python3. +# So, newer python3 packages need to conflict with old Python 2 builds that +# still provided unversioned Python. +# Since all python packages, new and old, have versioned requires on +# python?-libs, we do it here: +Conflicts: python-libs < 3 +# (We explicitly conflict with python-libs and not python2-libs, so only the +# old Python 2 builds that still provided unversioned Python are handled.) + + +%description libs +This package contains runtime libraries for use by Python: +- the majority of the Python standard library +- a dynamically linked library for use by applications that embed Python as + a scripting language, and by the main "python3" executable + + +%package devel +Summary: Libraries and header files needed for Python development +Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +BuildRequires: python-rpm-macros +# The RPM related dependencies bring nothing to a non-RPM Python developer +# But we want them when packages BuildRequire python3-devel +Requires: (python-rpm-macros if rpm-build) +Requires: (python3-rpm-macros if rpm-build) + +%if %{without bootstrap} +# This is not "API" (packages that need setuptools should still BuildRequire it) +# However some packages apparently can build both with and without setuptools +# producing egg-info as file or directory (depending on setuptools presence). +# Directory-to-file updates are problematic in RPM, so we ensure setuptools is +# installed when -devel is required. +# See https://bugzilla.redhat.com/show_bug.cgi?id=1623914 +# See https://fedoraproject.org/wiki/Packaging:Directory_Replacement +Requires: (python3-setuptools if rpm-build) + +Requires: (python3-rpm-generators if rpm-build) +%endif + +%{?python_provide:%python_provide python3-devel} + +Provides: %{name}-2to3 = %{version}-%{release} +Provides: 2to3 = %{version}-%{release} + +Conflicts: %{name} < %{version}-%{release} + +# In Fedora 31, several "unversioned" files were moved here from Python 2: +# pygettext.py, msgfmt.py, python-config, python.pc +Conflicts: python-devel < 3 + +%description devel +This package contains the header files and configuration needed to compile +Python extension modules (typically written in C or C++), to embed Python +into other programs, and to make binary distributions for Python libraries. + +It also contains the necessary macros to build RPM packages with Python modules +and 2to3 tool, an automatic source converter from Python 2.X. + + +%package idle +Summary: A basic graphical development environment for Python +Requires: %{name} = %{version}-%{release} +Requires: %{name}-tkinter = %{version}-%{release} + +Provides: idle3 = %{version}-%{release} +Provides: idle = %{version}-%{release} + +Provides: %{name}-tools = %{version}-%{release} +Provides: %{name}-tools%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-tools < %{version}-%{release} + +# In Fedora 31, /usr/bin/idle was moved here from Python 2. +Conflicts: python-tools < 3 + +%{?python_provide:%python_provide python3-idle} + +%description idle +IDLE is Python’s Integrated Development and Learning Environment. + +IDLE has the following features: Python shell window (interactive +interpreter) with colorizing of code input, output, and error messages; +multi-window text editor with multiple undo, Python colorizing, +smart indent, call tips, auto completion, and other features; +search within any window, replace within editor windows, and +search through multiple files (grep); debugger with persistent +breakpoints, stepping, and viewing of global and local namespaces; +configuration, browsers, and other dialogs. + + +%package tkinter +Summary: A GUI toolkit for Python +Requires: %{name} = %{version}-%{release} + +%{?python_provide:%python_provide python3-tkinter} + +%description tkinter +The Tkinter (Tk interface) library is a graphical user interface toolkit for +the Python programming language. + + +%package test +Summary: The self-test suite for the main python3 package +Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%{?python_provide:%python_provide python3-test} + +%description test +The self-test suite for the Python interpreter. + +This is only useful to test Python itself. For testing general Python code, +you should use the unittest module from %{name}-libs, or a library such as +%{name}-pytest or %{name}-nose. + + +%if %{with debug_build} +%package debug +Summary: Debug version of the Python runtime + +# The debug build is an all-in-one package version of the regular build, and +# shares the same .py/.pyc files and directories as the regular build. Hence +# we depend on all of the subpackages of the regular build: +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: %{name}-test%{?_isa} = %{version}-%{release} +Requires: %{name}-tkinter%{?_isa} = %{version}-%{release} +Requires: %{name}-idle%{?_isa} = %{version}-%{release} + +# In Fedora 31, /usr/bin/python-debug was moved here from Python 2. +Conflicts: python-debug < 3 + +%{?python_provide:%python_provide python3-debug} + +%description debug +python3-debug provides a version of the Python runtime with numerous debugging +features enabled, aimed at advanced Python users such as developers of Python +extension modules. + +This version uses more memory and will be slower than the regular Python build, +but is useful for tracking down reference-counting issues and other bugs. + +The debug build shares installation directories with the standard Python +runtime. Python modules -- source (.py), bytecode (.pyc), and C-API extensions +(.cpython*.so) -- are compatible between this and the standard version +of Python. + +The debug runtime additionally supports debug builds of C-API extensions +(with the "d" ABI flag) for debugging issues in those extensions. +%endif # with debug_build + +%else # with flatpackage + +# We'll not provide this, on purpose +# No package in Fedora shall ever depend on flatpackage via this +%global __requires_exclude ^python\\(abi\\) = 3\\..$ +%global __provides_exclude ^python\\(abi\\) = 3\\..$ + +%if %{with rpmwheels} +Requires: python-setuptools-wheel +Requires: python-pip-wheel +%else +Provides: bundled(python3-pip) = 19.2.3 +Provides: bundled(python3-setuptools) = 41.2.0 +%endif + +# The description for the flat package +%description +Python %{pybasever} package for developers. + +This package exists to allow developers to test their code against a newer +version of Python. This is not a full Python stack and if you wish to run +your applications with Python %{pybasever}, update your Fedora to a newer +version once Python %{pybasever} is stable. + +%endif # with flatpackage + +# ====================================================== +# The prep phase of the build: +# ====================================================== + +%prep +%gpgverify -k2 -s1 -d0 +%setup -q -n Python-%{upstream_version} +# Remove all exe files to ensure we are not shipping prebuilt binaries +# note that those are only used to create Microsoft Windows installers +# and that functionality is broken on Linux anyway +find -name '*.exe' -print -delete + +# Remove bundled libraries to ensure that we're using the system copy. +rm -r Modules/expat + +# +# Apply patches: +# +%patch1 -p1 + +%if "%{_lib}" == "lib64" +%patch102 -p1 +%endif +%patch111 -p1 + +%if %{with rpmwheels} +%patch189 -p1 +rm Lib/ensurepip/_bundled/*.whl +%endif + +%patch251 -p1 +%patch274 -p1 +%patch328 -p1 + + +# Remove files that should be generated by the build +# (This is after patching, so that we can use patches directly from upstream) +rm configure pyconfig.h.in + + +# ====================================================== +# Configuring and building the code: +# ====================================================== + +%build + +# Regenerate the configure script and pyconfig.h.in +autoconf +autoheader + +# Remember the current directory (which has sources and the configure script), +# so we can refer to it after we "cd" elsewhere. +topdir=$(pwd) + +# Get proper option names from bconds +%if %{with computed_gotos} +%global computed_gotos_flag yes +%else +%global computed_gotos_flag no +%endif + +%if %{with optimizations} +%global optimizations_flag "--enable-optimizations" +%else +%global optimizations_flag "--disable-optimizations" +%endif + +# Set common compiler/linker flags +# We utilize the %%extension_...flags macros here so users building C/C++ +# extensions with our python won't get all the compiler/linker flags used +# in Fedora RPMs. +# Standard library built here will still use the %%build_...flags, +# 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" +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} -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: +BuildPython() { + ConfName=$1 + ExtraConfigArgs=$2 + MoreCFlags=$3 + + # Each build is done in its own directory + ConfDir=build/$ConfName + echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName + mkdir -p $ConfDir + pushd $ConfDir + + # Normally, %%configure looks for the "configure" script in the current + # directory. + # Since we changed directories, we need to tell %%configure where to look. + %global _configure $topdir/configure + +%configure \ + --enable-ipv6 \ + --enable-shared \ + --with-computed-gotos=%{computed_gotos_flag} \ + --with-dbmliborder=gdbm:ndbm:bdb \ + --with-system-expat \ + --with-system-ffi \ + --enable-loadable-sqlite-extensions \ + --with-dtrace \ + --with-lto \ + --with-ssl-default-suites=openssl \ +%if %{with valgrind} + --with-valgrind \ +%endif + $ExtraConfigArgs \ + %{nil} + +%global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags" + +%if %{without bootstrap} + # Regenerate generated files (needs python3) + %make_build %{flags_override} regen-all PYTHON_FOR_REGEN="python%{pybasever}" +%endif + + # Invoke the build + %make_build %{flags_override} + + popd + echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfName +} + +# Call the above to build each configuration. + +%if %{with debug_build} +BuildPython debug \ + "--without-ensurepip --with-pydebug" \ + "-Og" +%endif # with debug_build + +BuildPython optimized \ + "--without-ensurepip %{optimizations_flag}" \ + "" + +# ====================================================== +# Installing the built code: +# ====================================================== + +%install + +# As in %%build, remember the current directory +topdir=$(pwd) + +# We install a collection of hooks for gdb that make it easier to debug +# executables linked against libpython3* (such as /usr/bin/python3 itself) +# +# These hooks are implemented in Python itself (though they are for the version +# of python that gdb is linked with) +# +# gdb-archer looks for them in the same path as the ELF file or its .debug +# file, with a -gdb.py suffix. +# We put them next to the debug file, because ldconfig would complain if +# it found non-library files directly in /usr/lib/ +# (see https://bugzilla.redhat.com/show_bug.cgi?id=562980) +# +# We'll put these files in the debuginfo package by installing them to e.g.: +# /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py +# (note that the debug path is /usr/lib/debug for both 32/64 bit) +# +# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more +# information + +%if %{with gdb_hooks} +DirHoldingGdbPy=%{_usr}/lib/debug/%{_libdir} +mkdir -p %{buildroot}$DirHoldingGdbPy +%endif # with gdb_hooks + +# Multilib support for pyconfig.h +# 32- and 64-bit versions of pyconfig.h are different. For multilib support +# (making it possible to install 32- and 64-bit versions simultaneously), +# we need to install them under different filenames, and to make the common +# "pyconfig.h" include the right file based on architecture. +# See https://bugzilla.redhat.com/show_bug.cgi?id=192747 +# Filanames are defined here: +%global _pyconfig32_h pyconfig-32.h +%global _pyconfig64_h pyconfig-64.h +%global _pyconfig_h pyconfig-%{wordsize}.h + +# Use a common function to do an install for all our configurations: +InstallPython() { + + ConfName=$1 + PyInstSoName=$2 + MoreCFlags=$3 + LDVersion=$4 + + # Switch to the directory with this configuration's built files + ConfDir=build/$ConfName + echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName + mkdir -p $ConfDir + pushd $ConfDir + + make \ + DESTDIR=%{buildroot} \ + INSTALL="install -p" \ + EXTRA_CFLAGS="$MoreCFlags" \ + install + + popd + +%if %{with gdb_hooks} + # See comment on $DirHoldingGdbPy above + PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName-%{version}-%{release}.%{_arch}.debug-gdb.py + cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy +%endif # with gdb_hooks + + # Rename the -devel script that differs on different arches to arch specific name + mv %{buildroot}%{_bindir}/python${LDVersion}-{,`uname -m`-}config + echo -e '#!/bin/sh\nexec `dirname $0`/python'${LDVersion}'-`uname -m`-config "$@"' > \ + %{buildroot}%{_bindir}/python${LDVersion}-config + echo '[ $? -eq 127 ] && echo "Could not find python'${LDVersion}'-`uname -m`-config. Look around to see available arches." >&2' >> \ + %{buildroot}%{_bindir}/python${LDVersion}-config + chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config + + # Make python3-devel multilib-ready + mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \ + %{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h} + cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF +#include + +#if __WORDSIZE == 32 +#include "%{_pyconfig32_h}" +#elif __WORDSIZE == 64 +#include "%{_pyconfig64_h}" +#else +#error "Unknown word size" +#endif +EOF + + echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName +} + +# Install the "debug" build first; any common files will be overridden with +# later builds +%if %{with debug_build} +InstallPython debug \ + %{py_INSTSONAME_debug} \ + -O0 \ + %{LDVERSION_debug} +%endif # with debug_build + +# Now the optimized build: +InstallPython optimized \ + %{py_INSTSONAME_optimized} \ + "" \ + %{LDVERSION_optimized} + +# Install directories for additional packages +install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__ +%if "%{_lib}" == "lib64" +# The 64-bit version needs to create "site-packages" in /usr/lib/ (for +# pure-Python modules) as well as in /usr/lib64/ (for packages with extension +# modules). +# Note that rpmlint will complain about hardcoded library path; +# this is intentional. +install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__ +%endif + +%if %{without flatpackage} +# add idle3 to menu +install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle3.png +install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle3.png +install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle3.png +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10} + +# Install and validate appdata file +mkdir -p %{buildroot}%{_metainfodir} +cp -a %{SOURCE11} %{buildroot}%{_metainfodir} +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/idle3.appdata.xml +%endif + +# Make sure distutils looks at the right pyconfig.h file +# See https://bugzilla.redhat.com/show_bug.cgi?id=201434 +# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate +# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py +# when python starts up (see https://bugzilla.redhat.com/show_bug.cgi?id=653058) +# +# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h +# variants: +sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \ + %{buildroot}%{pylibdir}/distutils/sysconfig.py \ + %{buildroot}%{pylibdir}/sysconfig.py + +# Install pathfix.py to bindir +# See https://github.com/fedora-python/python-rpm-porting/issues/24 +cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/ + +# Install i18n tools to bindir +# They are also in python2, so we version them +# https://bugzilla.redhat.com/show_bug.cgi?id=1571474 +for tool in pygettext msgfmt; do + cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{pybasever}.py + ln -s ${tool}%{pybasever}.py %{buildroot}%{_bindir}/${tool}3.py +done + +# Switch all shebangs to refer to the specific Python version. +# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$, +# so handle files named using other naming scheme separately. +LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \ + Tools/scripts/pathfix.py \ + -i "%{_bindir}/python%{pybasever}" -pn \ + %{buildroot} \ + %{buildroot}%{_bindir}/*%{pybasever}.py \ + %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py} + +# Remove tests for python3-tools which was removed in +# https://bugzilla.redhat.com/show_bug.cgi?id=1312030 +rm -rf %{buildroot}%{pylibdir}/test/test_tools + +# Remove shebang lines from .py files that aren't executable, and +# remove executability from .py files that don't have a shebang line: +find %{buildroot} -name \*.py \ + \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ + -print -exec sed -i '1d' {} \; \) -o \( \ + -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ + -exec chmod a-x {} \; \) \) + +# Get rid of DOS batch files: +find %{buildroot} -name \*.bat -exec rm {} \; + +# Get rid of backup files: +find %{buildroot}/ -name "*~" -exec rm -f {} \; +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:]]' || : + +# Since we have pathfix.py in bindir, this is created, but we don't want it +rm -rf %{buildroot}%{_bindir}/__pycache__ + +# Fixup permissions for shared libraries from non-standard 555 to standard 755: +find %{buildroot} -perm 555 -exec chmod 755 {} \; + +# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to +# avoid the user having to know the precise version and ABI flags. +# See e.g. https://bugzilla.redhat.com/show_bug.cgi?id=676748 +%if %{with debug_build} && %{without flatpackage} +ln -s \ + %{_bindir}/python%{LDVERSION_debug} \ + %{buildroot}%{_bindir}/python3-debug +%endif + +# There's 2to3-X.X executable and 2to3 soft link to it. +# No reason to have both, so keep only 2to3 as an executable. +# See https://bugzilla.redhat.com/show_bug.cgi?id=1111275 +mv %{buildroot}%{_bindir}/2to3-%{pybasever} %{buildroot}%{_bindir}/2to3 + +%if %{with flatpackage} +# Remove stuff that would conflict with python3 package +rm %{buildroot}%{_bindir}/python3 +rm %{buildroot}%{_bindir}/pydoc3 +rm %{buildroot}%{_bindir}/pathfix.py +rm %{buildroot}%{_bindir}/pygettext3.py +rm %{buildroot}%{_bindir}/msgfmt3.py +rm %{buildroot}%{_bindir}/idle3 +rm %{buildroot}%{_bindir}/python3-* +rm %{buildroot}%{_bindir}/2to3 +rm %{buildroot}%{_libdir}/libpython3.so +rm %{buildroot}%{_mandir}/man1/python3.1* +rm %{buildroot}%{_libdir}/pkgconfig/python3.pc +rm %{buildroot}%{_libdir}/pkgconfig/python3-embed.pc +%else +# Link the unversioned stuff +# https://fedoraproject.org/wiki/Changes/Python_means_Python3 +ln -s ./python3 %{buildroot}%{_bindir}/python +ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc +ln -s ./pygettext3.py %{buildroot}%{_bindir}/pygettext.py +ln -s ./msgfmt3.py %{buildroot}%{_bindir}/msgfmt.py +ln -s ./idle3 %{buildroot}%{_bindir}/idle +ln -s ./python3-config %{buildroot}%{_bindir}/python-config +ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1 +ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc +%if %{with debug_build} +ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug +%endif +%endif + + +# ====================================================== +# Checks for packaging issues +# ====================================================== + +%check + +# first of all, check timestamps of bytecode files +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} %{SOURCE8} + +# Ensure that the curses module was linked against libncursesw.so, rather than +# libncurses.so +# See https://bugzilla.redhat.com/show_bug.cgi?id=539917 +ldd %{buildroot}/%{dynload_dir}/_curses*.so \ + | grep curses \ + | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1) + +# Ensure that the debug modules are linked against the debug libpython, and +# likewise for the optimized modules and libpython: +for Module in %{buildroot}/%{dynload_dir}/*.so ; do + case $Module in + *.%{SOABI_debug}) + ldd $Module | grep %{py_INSTSONAME_optimized} && + (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1) + + ;; + *.%{SOABI_optimized}) + ldd $Module | grep %{py_INSTSONAME_debug} && + (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1) + ;; + esac +done + + +# ====================================================== +# Running the upstream test suite +# ====================================================== + +topdir=$(pwd) +CheckPython() { + ConfName=$1 + ConfDir=$(pwd)/build/$ConfName + + echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName + + # Note that we're running the tests using the version of the code in the + # builddir, not in the buildroot. + + # Show some info, helpful for debugging test failures + LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.pythoninfo + + # Run the upstream test suite + # test_gdb skipped on s390x: + # https://bugzilla.redhat.com/show_bug.cgi?id=1678277 + # test_gdb skipped everywhere: + # https://bugzilla.redhat.com/show_bug.cgi?id=1734327 + # test_distutils + # 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 \ + %if %{with bootstrap} + -x test_distutils \ + %endif + -x test_gdb \ + %ifarch %{mips64} + -x test_ctypes \ + %endif + + echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName + +} + +%if %{with tests} + +# Check each of the configurations: +%if %{with debug_build} +CheckPython debug +%endif # with debug_build +CheckPython optimized + +%endif # with tests + + +%files +%doc README.rst + +%if %{without flatpackage} +%{_bindir}/pydoc* +%{_bindir}/python3 +%else +%{_bindir}/pydoc%{pybasever} +%endif + +%{_bindir}/python%{pybasever} +%{_bindir}/python%{LDVERSION_optimized} +%{_mandir}/*/*3* + + +%if %{without flatpackage} +%files -n python-unversioned-command +%{_bindir}/python +%{_mandir}/*/python.1* + +%files libs +%doc README.rst +%endif + +%dir %{pylibdir} +%dir %{dynload_dir} + +%license %{pylibdir}/LICENSE.txt + +%{pylibdir}/lib2to3 +%if %{without flatpackage} +%exclude %{pylibdir}/lib2to3/tests +%endif + +%dir %{pylibdir}/unittest/ +%dir %{pylibdir}/unittest/__pycache__/ +%{pylibdir}/unittest/*.py +%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/asyncio/ +%dir %{pylibdir}/asyncio/__pycache__/ +%{pylibdir}/asyncio/*.py +%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/venv/ +%dir %{pylibdir}/venv/__pycache__/ +%{pylibdir}/venv/*.py +%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/venv/scripts + +%{pylibdir}/wsgiref +%{pylibdir}/xmlrpc + +%dir %{pylibdir}/ensurepip/ +%dir %{pylibdir}/ensurepip/__pycache__/ +%{pylibdir}/ensurepip/*.py +%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes} + +%if %{with rpmwheels} +%exclude %{pylibdir}/ensurepip/_bundled +%else +%dir %{pylibdir}/ensurepip/_bundled +%{pylibdir}/ensurepip/_bundled/*.whl +%endif + +%dir %{pylibdir}/concurrent/ +%dir %{pylibdir}/concurrent/__pycache__/ +%{pylibdir}/concurrent/*.py +%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/concurrent/futures/ +%dir %{pylibdir}/concurrent/futures/__pycache__/ +%{pylibdir}/concurrent/futures/*.py +%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes} + +%{pylibdir}/pydoc_data + +%{dynload_dir}/_blake2.%{SOABI_optimized}.so +%{dynload_dir}/_md5.%{SOABI_optimized}.so +%{dynload_dir}/_sha1.%{SOABI_optimized}.so +%{dynload_dir}/_sha256.%{SOABI_optimized}.so +%{dynload_dir}/_sha3.%{SOABI_optimized}.so +%{dynload_dir}/_sha512.%{SOABI_optimized}.so + +%{dynload_dir}/_asyncio.%{SOABI_optimized}.so +%{dynload_dir}/_bisect.%{SOABI_optimized}.so +%{dynload_dir}/_bz2.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so +%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so +%{dynload_dir}/_contextvars.%{SOABI_optimized}.so +%{dynload_dir}/_crypt.%{SOABI_optimized}.so +%{dynload_dir}/_csv.%{SOABI_optimized}.so +%{dynload_dir}/_ctypes.%{SOABI_optimized}.so +%{dynload_dir}/_curses.%{SOABI_optimized}.so +%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so +%{dynload_dir}/_dbm.%{SOABI_optimized}.so +%{dynload_dir}/_decimal.%{SOABI_optimized}.so +%{dynload_dir}/_elementtree.%{SOABI_optimized}.so +%if %{with gdbm} +%{dynload_dir}/_gdbm.%{SOABI_optimized}.so +%endif +%{dynload_dir}/_hashlib.%{SOABI_optimized}.so +%{dynload_dir}/_heapq.%{SOABI_optimized}.so +%{dynload_dir}/_json.%{SOABI_optimized}.so +%{dynload_dir}/_lsprof.%{SOABI_optimized}.so +%{dynload_dir}/_lzma.%{SOABI_optimized}.so +%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so +%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so +%{dynload_dir}/_opcode.%{SOABI_optimized}.so +%{dynload_dir}/_pickle.%{SOABI_optimized}.so +%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so +%{dynload_dir}/_queue.%{SOABI_optimized}.so +%{dynload_dir}/_random.%{SOABI_optimized}.so +%{dynload_dir}/_socket.%{SOABI_optimized}.so +%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so +%{dynload_dir}/_ssl.%{SOABI_optimized}.so +%{dynload_dir}/_statistics.%{SOABI_optimized}.so +%{dynload_dir}/_struct.%{SOABI_optimized}.so +%{dynload_dir}/array.%{SOABI_optimized}.so +%{dynload_dir}/audioop.%{SOABI_optimized}.so +%{dynload_dir}/binascii.%{SOABI_optimized}.so +%{dynload_dir}/cmath.%{SOABI_optimized}.so +%{dynload_dir}/_datetime.%{SOABI_optimized}.so +%{dynload_dir}/fcntl.%{SOABI_optimized}.so +%{dynload_dir}/grp.%{SOABI_optimized}.so +%{dynload_dir}/math.%{SOABI_optimized}.so +%{dynload_dir}/mmap.%{SOABI_optimized}.so +%{dynload_dir}/nis.%{SOABI_optimized}.so +%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so +%{dynload_dir}/parser.%{SOABI_optimized}.so +%{dynload_dir}/_posixshmem.%{SOABI_optimized}.so +%{dynload_dir}/pyexpat.%{SOABI_optimized}.so +%{dynload_dir}/readline.%{SOABI_optimized}.so +%{dynload_dir}/resource.%{SOABI_optimized}.so +%{dynload_dir}/select.%{SOABI_optimized}.so +%{dynload_dir}/spwd.%{SOABI_optimized}.so +%{dynload_dir}/syslog.%{SOABI_optimized}.so +%{dynload_dir}/termios.%{SOABI_optimized}.so +%{dynload_dir}/unicodedata.%{SOABI_optimized}.so +%{dynload_dir}/_uuid.%{SOABI_optimized}.so +%{dynload_dir}/xxlimited.%{SOABI_optimized}.so +%{dynload_dir}/_xxsubinterpreters.%{SOABI_optimized}.so +%{dynload_dir}/zlib.%{SOABI_optimized}.so + +%dir %{pylibdir}/site-packages/ +%dir %{pylibdir}/site-packages/__pycache__/ +%{pylibdir}/site-packages/README.txt +%{pylibdir}/*.py +%dir %{pylibdir}/__pycache__/ +%{pylibdir}/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/collections/ +%dir %{pylibdir}/collections/__pycache__/ +%{pylibdir}/collections/*.py +%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/ctypes/ +%dir %{pylibdir}/ctypes/__pycache__/ +%{pylibdir}/ctypes/*.py +%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/ctypes/macholib + +%{pylibdir}/curses + +%dir %{pylibdir}/dbm/ +%dir %{pylibdir}/dbm/__pycache__/ +%{pylibdir}/dbm/*.py +%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/distutils/ +%dir %{pylibdir}/distutils/__pycache__/ +%{pylibdir}/distutils/*.py +%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/distutils/README +%{pylibdir}/distutils/command + +%dir %{pylibdir}/email/ +%dir %{pylibdir}/email/__pycache__/ +%{pylibdir}/email/*.py +%{pylibdir}/email/__pycache__/*%{bytecode_suffixes} +%{pylibdir}/email/mime +%doc %{pylibdir}/email/architecture.rst + +%{pylibdir}/encodings + +%{pylibdir}/html +%{pylibdir}/http + +%dir %{pylibdir}/importlib/ +%dir %{pylibdir}/importlib/__pycache__/ +%{pylibdir}/importlib/*.py +%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes} + +%dir %{pylibdir}/json/ +%dir %{pylibdir}/json/__pycache__/ +%{pylibdir}/json/*.py +%{pylibdir}/json/__pycache__/*%{bytecode_suffixes} + +%{pylibdir}/logging +%{pylibdir}/multiprocessing + +%dir %{pylibdir}/sqlite3/ +%dir %{pylibdir}/sqlite3/__pycache__/ +%{pylibdir}/sqlite3/*.py +%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes} + +%if %{without flatpackage} +%exclude %{pylibdir}/turtle.py +%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} +%endif + +%{pylibdir}/urllib +%{pylibdir}/xml + +%if "%{_lib}" == "lib64" +%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever} +%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages +%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/ +%endif + +# "Makefile" and the config-32/64.h file are needed by +# distutils/sysconfig.py:_init_posix(), so we include them in the core +# package, along with their parent directories (bug 531901): +%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/ +%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile +%dir %{_includedir}/python%{LDVERSION_optimized}/ +%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} + +%{_libdir}/%{py_INSTSONAME_optimized} +%if %{without flatpackage} +%{_libdir}/libpython3.so +%endif + + +%if %{without flatpackage} +%files devel +%{_bindir}/2to3 +%endif + +%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/* +%if %{without flatpackage} +%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile +%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h} +%endif +%{_includedir}/python%{LDVERSION_optimized}/*.h +%{_includedir}/python%{LDVERSION_optimized}/internal/ +%{_includedir}/python%{LDVERSION_optimized}/cpython/ +%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit + +%if %{without flatpackage} +%{_bindir}/python3-config +%{_bindir}/python-config +%{_libdir}/pkgconfig/python3.pc +%{_libdir}/pkgconfig/python.pc +%{_libdir}/pkgconfig/python3-embed.pc +%{_bindir}/pathfix.py +%{_bindir}/pygettext3.py +%{_bindir}/pygettext.py +%{_bindir}/msgfmt3.py +%{_bindir}/msgfmt.py +%endif + +%{_bindir}/pygettext%{pybasever}.py +%{_bindir}/msgfmt%{pybasever}.py + +%{_bindir}/python%{pybasever}-config +%{_bindir}/python%{LDVERSION_optimized}-config +%{_bindir}/python%{LDVERSION_optimized}-*-config +%{_libdir}/libpython%{LDVERSION_optimized}.so +%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc +%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}-embed.pc +%{_libdir}/pkgconfig/python-%{pybasever}.pc +%{_libdir}/pkgconfig/python-%{pybasever}-embed.pc + + +%if %{without flatpackage} +%files idle + +%{_bindir}/idle* +%else +%{_bindir}/idle%{pybasever} +%endif + +%{pylibdir}/idlelib + +%if %{without flatpackage} +%{_metainfodir}/idle3.appdata.xml +%{_datadir}/applications/idle3.desktop +%{_datadir}/icons/hicolor/*/apps/idle3.* +%endif + +%if %{without flatpackage} +%files tkinter +%endif + +%{pylibdir}/tkinter +%if %{without flatpackage} +%exclude %{pylibdir}/tkinter/test +%endif +%{dynload_dir}/_tkinter.%{SOABI_optimized}.so +%{pylibdir}/turtle.py +%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes} +%dir %{pylibdir}/turtledemo +%{pylibdir}/turtledemo/*.py +%{pylibdir}/turtledemo/*.cfg +%dir %{pylibdir}/turtledemo/__pycache__/ +%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes} + + +%if %{without flatpackage} +%files test +%endif + +%{pylibdir}/ctypes/test +%{pylibdir}/distutils/tests +%{pylibdir}/sqlite3/test +%{pylibdir}/test +%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so +%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so +%{dynload_dir}/_testcapi.%{SOABI_optimized}.so +%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so +%{dynload_dir}/_testinternalcapi.%{SOABI_optimized}.so +%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so +%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so +%{pylibdir}/lib2to3/tests +%{pylibdir}/tkinter/test +%{pylibdir}/unittest/test + +# We don't bother splitting the debug build out into further subpackages: +# if you need it, you're probably a developer. + +# Hence the manifest is the combination of analogous files in the manifests of +# all of the other subpackages + +%if %{with debug_build} +%if %{without flatpackage} +%files debug +%{_bindir}/python3-debug +%{_bindir}/python-debug +%endif + +# Analog of the core subpackage's files: +%{_bindir}/python%{LDVERSION_debug} + +# Analog of the -libs subpackage's files: +# ...with debug builds of the built-in "extension" modules: + +%{dynload_dir}/_blake2.%{SOABI_debug}.so +%{dynload_dir}/_md5.%{SOABI_debug}.so +%{dynload_dir}/_sha1.%{SOABI_debug}.so +%{dynload_dir}/_sha256.%{SOABI_debug}.so +%{dynload_dir}/_sha3.%{SOABI_debug}.so +%{dynload_dir}/_sha512.%{SOABI_debug}.so + +%{dynload_dir}/_asyncio.%{SOABI_debug}.so +%{dynload_dir}/_bisect.%{SOABI_debug}.so +%{dynload_dir}/_bz2.%{SOABI_debug}.so +%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so +%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so +%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so +%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so +%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so +%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so +%{dynload_dir}/_contextvars.%{SOABI_debug}.so +%{dynload_dir}/_crypt.%{SOABI_debug}.so +%{dynload_dir}/_csv.%{SOABI_debug}.so +%{dynload_dir}/_ctypes.%{SOABI_debug}.so +%{dynload_dir}/_curses.%{SOABI_debug}.so +%{dynload_dir}/_curses_panel.%{SOABI_debug}.so +%{dynload_dir}/_dbm.%{SOABI_debug}.so +%{dynload_dir}/_decimal.%{SOABI_debug}.so +%{dynload_dir}/_elementtree.%{SOABI_debug}.so +%if %{with gdbm} +%{dynload_dir}/_gdbm.%{SOABI_debug}.so +%endif +%{dynload_dir}/_hashlib.%{SOABI_debug}.so +%{dynload_dir}/_heapq.%{SOABI_debug}.so +%{dynload_dir}/_json.%{SOABI_debug}.so +%{dynload_dir}/_lsprof.%{SOABI_debug}.so +%{dynload_dir}/_lzma.%{SOABI_debug}.so +%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so +%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so +%{dynload_dir}/_opcode.%{SOABI_debug}.so +%{dynload_dir}/_pickle.%{SOABI_debug}.so +%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so +%{dynload_dir}/_queue.%{SOABI_debug}.so +%{dynload_dir}/_random.%{SOABI_debug}.so +%{dynload_dir}/_socket.%{SOABI_debug}.so +%{dynload_dir}/_sqlite3.%{SOABI_debug}.so +%{dynload_dir}/_ssl.%{SOABI_debug}.so +%{dynload_dir}/_statistics.%{SOABI_debug}.so +%{dynload_dir}/_struct.%{SOABI_debug}.so +%{dynload_dir}/array.%{SOABI_debug}.so +%{dynload_dir}/audioop.%{SOABI_debug}.so +%{dynload_dir}/binascii.%{SOABI_debug}.so +%{dynload_dir}/cmath.%{SOABI_debug}.so +%{dynload_dir}/_datetime.%{SOABI_debug}.so +%{dynload_dir}/fcntl.%{SOABI_debug}.so +%{dynload_dir}/grp.%{SOABI_debug}.so +%{dynload_dir}/math.%{SOABI_debug}.so +%{dynload_dir}/mmap.%{SOABI_debug}.so +%{dynload_dir}/nis.%{SOABI_debug}.so +%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so +%{dynload_dir}/parser.%{SOABI_debug}.so +%{dynload_dir}/_posixshmem.%{SOABI_debug}.so +%{dynload_dir}/pyexpat.%{SOABI_debug}.so +%{dynload_dir}/readline.%{SOABI_debug}.so +%{dynload_dir}/resource.%{SOABI_debug}.so +%{dynload_dir}/select.%{SOABI_debug}.so +%{dynload_dir}/spwd.%{SOABI_debug}.so +%{dynload_dir}/syslog.%{SOABI_debug}.so +%{dynload_dir}/termios.%{SOABI_debug}.so +%{dynload_dir}/unicodedata.%{SOABI_debug}.so +%{dynload_dir}/_uuid.%{SOABI_debug}.so +%{dynload_dir}/_xxsubinterpreters.%{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 +# do for the regular build above (bug 531901), since they're all in one package +# now; they're listed below, under "-devel": + +%{_libdir}/%{py_INSTSONAME_debug} + +# Analog of the -devel subpackage's files: +%{pylibdir}/config-%{LDVERSION_debug}-%{_arch}-linux%{_gnu} +%{_includedir}/python%{LDVERSION_debug} +%{_bindir}/python%{LDVERSION_debug}-config +%{_bindir}/python%{LDVERSION_debug}-*-config +%{_libdir}/libpython%{LDVERSION_debug}.so +%{_libdir}/libpython%{LDVERSION_debug}.so.1.0 +%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc +%{_libdir}/pkgconfig/python-%{LDVERSION_debug}-embed.pc + +# Analog of the -tools subpackage's files: +# None for now; we could build precanned versions that have the appropriate +# shebang if needed + +# Analog of the tkinter subpackage's files: +%{dynload_dir}/_tkinter.%{SOABI_debug}.so + +# Analog of the -test subpackage's files: +%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so +%{dynload_dir}/_testbuffer.%{SOABI_debug}.so +%{dynload_dir}/_testcapi.%{SOABI_debug}.so +%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so +%{dynload_dir}/_testinternalcapi.%{SOABI_debug}.so +%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so + +%endif # with debug_build + +# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from ldconfig +# See https://bugzilla.redhat.com/show_bug.cgi?id=562980 +# +# The /usr/lib/rpm/redhat/macros defines %%__debug_package to use +# debugfiles.list, and it appears that everything below /usr/lib/debug and +# (/usr/src/debug) gets added to this file (via LISTFILES) in +# /usr/lib/rpm/find-debuginfo.sh +# +# Hence by installing it below /usr/lib/debug we ensure it is added to the +# -debuginfo subpackage +# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py +# payload file would be unpackaged) + +# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1476593 +%undefine _debuginfo_subpackages + +# ====================================================== +# Finally, the changelog: +# ====================================================== + +%changelog +* Wed Nov 20 2019 Miro Hrončok - 3.9.0~a1-1 +- Rebased to Python 3.9.0a1 + +* Mon Oct 14 2019 Miro Hrončok - 3.8.0-1 +- Update to Python 3.8.0 final + +* Tue Oct 01 2019 Miro Hrončok - 3.8.0~rc1-1 +- Rebased to Python 3.8.0rc1 + +* Sat Aug 31 2019 Miro Hrončok - 3.8.0~b4-1 +- Rebased to Python 3.8.0b4 +- Enable Profile-guided optimization for all arches, not just x86 (#1741015) + +* Mon Jul 29 2019 Miro Hrončok - 3.8.0~b3-1 +- Update to 3.8.0b3 + +* Fri Jul 26 2019 Fedora Release Engineering - 3.8.0~b2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Jul 05 2019 Miro Hrončok - 3.8.0~b2-1 +- Update to 3.8.0b2 + +* Wed Jun 05 2019 Miro Hrončok - 3.8.0~b1-1 +- Update to 3.8.0b1 + +* Fri May 17 2019 Miro Hrončok - 3.8.0~a4-2 +- Remove a faulty patch that resulted in invalid value of + distutils.sysconfig.get_config_var('LIBPL') (#1710767) + +* Tue May 07 2019 Miro Hrončok - 3.8.0~a4-1 +- Update to 3.8.0a4 + +* Tue Mar 26 2019 Miro Hrončok - 3.8.0~a3-1 +- Update to 3.8.0a3 + +* Mon Feb 25 2019 Miro Hrončok - 3.8.0~a2-1 +- Update to 3.8.0a2 + +* Mon Feb 18 2019 Miro Hrončok - 3.8.0~a1-3 +- Reduced default build flags used to build extension modules + https://fedoraproject.org/wiki/Changes/Python_Extension_Flags + +* Sun Feb 17 2019 Igor Gnatenko - 3.8.0~a1-2 +- Rebuild for readline 8.0 + +* Tue Feb 05 2019 Miro Hrončok - 3.8.0~a1-1 +- Update to 3.8.0a1 diff --git a/sources b/sources index dcd0d93..49e0291 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (Python-3.8.0.tar.xz) = 5f9bfcb3acdf592770a9d5abd2c32c68c55a49b92f958ded069e3ef31cf2d415e67112b4f6738fab237dc29e5c622298719946d2e9471e7e78e3a6bdf2fac1d1 -SHA512 (Python-3.8.0.tar.xz.asc) = 4741bcb9b79019f190fded565dd9851158911f1b0ba71f5972906c267ca6576ebfae7c1e649f8bd9fee6ce2cabb325ef1d85a28ab5962fc9275072d35229d06d +SHA512 (Python-3.9.0a1.tar.xz) = 5880ba1707718dbd21926956faebef3e454b7dae15c880f96140deaff571765a760baa17ca109949b7f70f12c999660ab0071f231f58727e232739d026895e91 +SHA512 (Python-3.9.0a1.tar.xz.asc) = 5c4f31abca1c20be4b7592c97c1fe99ccc3ce494d8905a4aa6d2c96d59207ce7dd6630364a2fe03c9f37c755279c5e3078cba587ccebe165924d2456015d686c diff --git a/tests/tests.yml b/tests/tests.yml index 6d53a9c..eb39252 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,13 +10,13 @@ tests: - smoke: dir: python/smoke - run: VERSION=3.8 ./venv.sh + run: VERSION=3.9 ./venv.sh - selftest: dir: python/selftest - run: VERSION=3.8 X="-x test_wsgiref" ./parallel.sh + run: VERSION=3.9 X="-x test_wsgiref" ./parallel.sh required_packages: - gcc # for extension building in venv and selftest - gdb # for test_gdb - - python38 # the test subject + - python39 # the test subject - python3-tox # for venv tests - glibc-all-langpacks # for locale tests