Blame SPECS/python3.9.spec

a08450
# ==================
a08450
# Top-level metadata
a08450
# ==================
a08450
a08450
%global pybasever 3.9
a08450
a08450
# pybasever without the dot:
a08450
%global pyshortver 39
a08450
a08450
Name: python%{pybasever}
a08450
Summary: Version %{pybasever} of the Python interpreter
a08450
URL: https://www.python.org/
a08450
a08450
#  WARNING  When rebasing to a new Python version,
a08450
#           remember to update the python3-docs package as well
e8a926
%global general_version %{pybasever}.14
a08450
#global prerel ...
a08450
%global upstream_version %{general_version}%{?prerel}
a08450
Version: %{general_version}%{?prerel:~%{prerel}}
6bc0c3
Release: 1%{?dist}.2
a08450
License: Python
a08450
a08450
a08450
# ==================================
a08450
# Conditionals controlling the build
a08450
# ==================================
a08450
a08450
# Note that the bcond macros are named for the CLI option they create.
a08450
# "%%bcond_without" means "ENABLE by default and create a --without option"
a08450
a08450
# Main Python, i.e. whether this is the main Python version in the distribution
a08450
# that owns /usr/bin/python3 and other unique paths
a08450
# This also means the built subpackages are called python3 rather than python3X
a08450
# WARNING: This also influences the flatpackage bcond below.
a08450
# By default, this is determined by the %%__default_python3_pkgversion value
a08450
%if "%{?__default_python3_pkgversion}" == "%{pybasever}"
a08450
%bcond_without main_python
a08450
%else
a08450
%bcond_with main_python
a08450
%endif
a08450
a08450
# Flat package, i.e. no separate subpackages
a08450
# Default (in Fedora): if this is a main Python, it is not a flatpackage
a08450
# Not supported: Combination of flatpackage enabled and main_python enabled
a08450
%if %{with main_python}
a08450
%bcond_with flatpackage
a08450
%else
a08450
%bcond_without flatpackage
a08450
%endif
a08450
a08450
# When bootstrapping python3, we need to build setuptools.
a08450
# but setuptools BR python3-devel and that brings in python3-rpm-generators;
a08450
# python3-rpm-generators needs python3-setuptools, so we cannot have it yet.
a08450
#
a08450
# We also use the previous build of Python in "make regen-all"
a08450
# and in "distutils.tests.test_bdist_rpm".
a08450
#
a08450
# Procedure: https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython
a08450
#
a08450
#   IMPORTANT: When bootstrapping, it's very likely the wheels for pip and
a08450
#   setuptools are not available. Turn off the rpmwheels bcond until
a08450
#   the two packages are built with wheels to get around the issue.
a08450
%bcond_with bootstrap
a08450
a08450
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
a08450
# Uses upstream bundled prebuilt wheels otherwise
a08450
%bcond_without rpmwheels
a08450
a08450
# Expensive optimizations (mainly, profile-guided optimizations)
a08450
%bcond_without optimizations
a08450
a08450
# https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
a08450
%bcond_without no_semantic_interposition
a08450
a08450
# Run the test suite in %%check
a08450
%bcond_without tests
a08450
a08450
# Extra build for debugging the interpreter or C-API extensions
a08450
# (the -debug subpackages)
a08450
%if %{with flatpackage}
a08450
%bcond_with debug_build
a08450
%else
a08450
%bcond_without debug_build
a08450
%endif
a08450
a08450
# Support for the GDB debugger
a08450
%bcond_without gdb_hooks
a08450
a08450
# The dbm.gnu module (key-value database)
a08450
%bcond_without gdbm
a08450
a08450
# Main interpreter loop optimization
a08450
%bcond_without computed_gotos
a08450
a08450
# Support for the Valgrind debugger/profiler
a08450
%ifarch %{valgrind_arches}
a08450
%bcond_without valgrind
a08450
%else
a08450
%bcond_with valgrind
a08450
%endif
a08450
a08450
# https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
a08450
# For a very long time we have converted "upstream architecture names" to "Fedora names".
a08450
# This made sense at the time, see https://github.com/pypa/manylinux/issues/687#issuecomment-666362947
a08450
# However, with manylinux wheels popularity growth, this is now a problem.
a08450
# Wheels built on a Linux that doesn't do this were not compatible with ours and vice versa.
a08450
# We now have a compatibility layer to workaround a problem,
a08450
# but we also no longer use the legacy arch names in Fedora 34+.
a08450
# This bcond controls the behavior. The defaults should be good for anybody.
a08450
%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9
a08450
%bcond_with legacy_archnames
a08450
%else
a08450
%bcond_without legacy_archnames
a08450
%endif
a08450
a08450
# In RHEL 9+, we obsolete/provide Platform Python from regular Python
a08450
# This is only appropriate for the main Python build
a08450
%if 0%{?rhel} >= 9 && %{with main_python}
a08450
%bcond_without rhel8_compat_shims
a08450
%else
a08450
%bcond_with rhel8_compat_shims
a08450
%endif
a08450
a08450
# On RHEL 9+, build without the legacy nis module
a08450
%if 0%{?rhel} >= 9
a08450
%bcond_with nis
a08450
%else
a08450
%bcond_without nis
a08450
%endif
a08450
a08450
a08450
# =====================
a08450
# General global macros
a08450
# =====================
a08450
%if %{with main_python}
a08450
%global pkgname python3
a08450
%global exename python3
a08450
%else
a08450
%global pkgname python%{pybasever}
a08450
%global exename python%{pybasever}
a08450
%endif
a08450
a08450
%global pylibdir %{_libdir}/python%{pybasever}
a08450
%global dynload_dir %{pylibdir}/lib-dynload
a08450
a08450
# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac
a08450
# See PEP 3149 for some background: http://www.python.org/dev/peps/pep-3149/
a08450
%global ABIFLAGS_optimized %{nil}
a08450
%global ABIFLAGS_debug     d
a08450
a08450
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
a08450
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
a08450
a08450
# When we use the upstream arch triplets, we convert them from the legacy ones
a08450
# This is reversed in prep when %%with legacy_archnames, so we keep both macros
a08450
%global platform_triplet_legacy %{_arch}-linux%{_gnu}
a08450
%global platform_triplet_upstream %{expand:%(echo %{platform_triplet_legacy} | sed -E \\
a08450
    -e 's/^arm(eb)?-linux-gnueabi$/arm\\1-linux-gnueabihf/' \\
a08450
    -e 's/^mips64(el)?-linux-gnu$/mips64\\1-linux-gnuabi64/' \\
a08450
    -e 's/^ppc(64)?(le)?-linux-gnu$/powerpc\\1\\2-linux-gnu/')}
a08450
%if %{with legacy_archnames}
a08450
%global platform_triplet %{platform_triplet_legacy}
a08450
%else
a08450
%global platform_triplet %{platform_triplet_upstream}
a08450
%endif
a08450
a08450
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{platform_triplet}
a08450
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{platform_triplet}
a08450
a08450
# All bytecode files are in a __pycache__ subdirectory, with a name
a08450
# reflecting the version of the bytecode.
a08450
# See PEP 3147: http://www.python.org/dev/peps/pep-3147/
a08450
# For example,
a08450
#   foo/bar.py
a08450
# has bytecode at:
a08450
#   foo/__pycache__/bar.cpython-%%{pyshortver}.pyc
a08450
#   foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc
a08450
#   foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc
a08450
%global bytecode_suffixes .cpython-%{pyshortver}*.pyc
a08450
a08450
# libmpdec (mpdecimal package) is not availble in RHEL so we keep
a08450
# the bundled version.
a08450
# The version information can be found at Modules/_decimal/libmpdec/mpdecimal.h
a08450
# defined as MPD_VERSION.
a08450
%global libmpdec_version 2.5.0
a08450
a08450
# Python's configure script defines SOVERSION, and this is used in the Makefile
a08450
# to determine INSTSONAME, the name of the libpython DSO:
a08450
#   LDLIBRARY='libpython$(VERSION).so'
a08450
#   INSTSONAME="$LDLIBRARY".$SOVERSION
a08450
# We mirror this here in order to make it easier to add the -gdb.py hooks.
a08450
# (if these get out of sync, the payload of the libs subpackage will fail
a08450
# and halt the build)
a08450
%global py_SOVERSION 1.0
a08450
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
a08450
%global py_INSTSONAME_debug     libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
a08450
a08450
# Disable automatic bytecompilation. The python3 binary is not yet be
a08450
# available in /usr/bin when Python is built. Also, the bytecompilation fails
a08450
# on files that test invalid syntax.
a08450
%undefine py_auto_byte_compile
a08450
a08450
# When a main_python build is attempted despite the %%__default_python3_pkgversion value
a08450
# We undefine magic macros so the python3-... package does not provide wrong python3X-...
a08450
%if %{with main_python} && ("%{?__default_python3_pkgversion}" != "%{pybasever}")
a08450
%undefine __pythonname_provides
a08450
%{warn:Doing a main_python build with wrong %%__default_python3_pkgversion (0%{?__default_python3_pkgversion}, but this is %pyshortver)}
a08450
%endif
a08450
a08450
# =======================
a08450
# Build-time requirements
a08450
# =======================
a08450
a08450
# (keep this list alphabetized)
a08450
a08450
BuildRequires: autoconf
a08450
BuildRequires: bluez-libs-devel
a08450
BuildRequires: bzip2
a08450
BuildRequires: bzip2-devel
a08450
BuildRequires: desktop-file-utils
a08450
BuildRequires: expat-devel
a08450
a08450
BuildRequires: findutils
a08450
BuildRequires: gcc-c++
a08450
%if %{with gdbm}
a08450
BuildRequires: gdbm-devel
a08450
%endif
a08450
BuildRequires: git-core
a08450
BuildRequires: glibc-all-langpacks
a08450
BuildRequires: glibc-devel
a08450
BuildRequires: gmp-devel
a08450
BuildRequires: gnupg2
a08450
BuildRequires: libappstream-glib
a08450
BuildRequires: libffi-devel
a08450
%if %{with nis}
a08450
BuildRequires: libnsl2-devel
a08450
BuildRequires: libtirpc-devel
a08450
%endif
a08450
BuildRequires: libGL-devel
a08450
BuildRequires: libuuid-devel
a08450
BuildRequires: libX11-devel
a08450
BuildRequires: make
a08450
BuildRequires: ncurses-devel
a08450
a08450
BuildRequires: openssl-devel
a08450
BuildRequires: pkgconfig
a08450
BuildRequires: readline-devel
a08450
BuildRequires: redhat-rpm-config >= 127
a08450
BuildRequires: sqlite-devel
a08450
BuildRequires: gdb
a08450
a08450
BuildRequires: tar
a08450
BuildRequires: tcl-devel
a08450
BuildRequires: tix-devel
a08450
BuildRequires: tk-devel
a08450
BuildRequires: tzdata
a08450
a08450
%if %{with valgrind}
a08450
BuildRequires: valgrind-devel
a08450
%endif
a08450
a08450
BuildRequires: xz-devel
a08450
BuildRequires: zlib-devel
a08450
a08450
BuildRequires: /usr/bin/dtrace
a08450
a08450
# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig)
a08450
BuildRequires: /usr/sbin/ifconfig
a08450
a08450
%if %{with rpmwheels}
a08450
BuildRequires: %{python_wheel_pkg_prefix}-setuptools-wheel >= 53.0.0-7
a08450
BuildRequires: %{python_wheel_pkg_prefix}-pip-wheel >= 21.2.3-4
a08450
%endif
a08450
a08450
%if %{without bootstrap}
a08450
# for make regen-all and distutils.tests.test_bdist_rpm
a08450
BuildRequires: python%{pybasever}
a08450
# for proper automatic provides
a08450
BuildRequires: python3-rpm-generators
a08450
%endif
a08450
a08450
# =======================
a08450
# Source code and patches
a08450
# =======================
a08450
a08450
Source0: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz
a08450
Source1: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz.asc
a08450
Source2: %{url}static/files/pubkeys.txt
a08450
a08450
# A simple script to check timestamps of bytecode files
a08450
# Run in check section with Python that is currently being built
a08450
# Originally written by bkabrda
a08450
Source8: check-pyc-timestamps.py
a08450
a08450
# Desktop menu entry for idle3
a08450
Source10: idle3.desktop
a08450
a08450
# AppData file for idle3
a08450
Source11: idle3.appdata.xml
a08450
a08450
# (Patches taken from github.com/fedora-python/cpython)
a08450
a08450
# 00001 # d06a8853cf4bae9e115f45e1d531d2dc152c5cc8
a08450
# Fixup distutils/unixccompiler.py to remove standard library path from rpath
a08450
# Was Patch0 in ivazquez' python3000 specfile
a08450
Patch1: 00001-rpath.patch
a08450
a08450
# 00111 # 93b40d73360053ca68b0aeec33b6a8ca167e33e2
a08450
# Don't try to build a libpythonMAJOR.MINOR.a
a08450
#
a08450
# Downstream only: not appropriate for upstream.
a08450
#
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=556092
a08450
Patch111: 00111-no-static-lib.patch
a08450
a08450
# 00189 # d06cf137c00fd3907b436fdb92a8f007a7f2fb50
a08450
# Instead of bundled wheels, use our RPM packaged wheels
a08450
#
a08450
# We keep them in /usr/share/python-wheels
a08450
#
a08450
# Downstream only: upstream bundles
a08450
# We might eventually pursuit upstream support, but it's low prio
a08450
Patch189: 00189-use-rpm-wheels.patch
a08450
# The following versions of setuptools/pip are bundled when this patch is not applied.
a08450
# The versions are written in Lib/ensurepip/__init__.py, this patch removes them.
a08450
# When the bundled setuptools/pip wheel is updated, the patch no longer applies cleanly.
a08450
# In such cases, the patch needs to be amended and the versions updated here:
e8a926
%global pip_version 22.0.4
a08450
%global setuptools_version 58.1.0
a08450
a08450
# 00251 # 1b1047c14ff98eae6d355b4aac4df3e388813f62
a08450
# Change user install location
a08450
#
a08450
# Set values of prefix and exec_prefix in distutils install command
a08450
# to /usr/local if executable is /usr/bin/python* and RPM build
a08450
# is not detected to make pip and distutils install into separate location.
a08450
#
a08450
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
a08450
# Downstream only: Reworked in Fedora 36+/Python 3.10+ to follow https://bugs.python.org/issue43976
a08450
#
a08450
# pypa/distutils integration: https://github.com/pypa/distutils/pull/70
a08450
#
a08450
# Also set sysconfig._PIP_USE_SYSCONFIG = False, to force pip-upgraded-pip
a08450
# to respect this patched distutils install command.
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=2014513
a08450
Patch251: 00251-change-user-install-location.patch
a08450
a08450
# 00328 # 367fdcb5a075f083aea83ac174999272a8faf75c
a08450
# Restore pyc to TIMESTAMP invalidation mode as default in rpmbuild
a08450
#
a08450
# Since Fedora 31, the $SOURCE_DATE_EPOCH is set in rpmbuild to the latest
a08450
# %%changelog date. This makes Python default to the CHECKED_HASH pyc
a08450
# invalidation mode, bringing more reproducible builds traded for an import
a08450
# performance decrease. To avoid that, we don't default to CHECKED_HASH
a08450
# when $RPM_BUILD_ROOT is set (i.e. when we are building RPM packages).
a08450
#
a08450
# See https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/57#comment-27426
a08450
# Downstream only: only used when building RPM packages
a08450
# Ideally, we should talk to upstream and explain why we don't want this
a08450
Patch328: 00328-pyc-timestamp-invalidation-mode.patch
a08450
a08450
# 00329 #
a08450
# Support OpenSSL FIPS mode
a08450
# - In FIPS mode, OpenSSL wrappers are always used in hashlib
a08450
# - The "usedforsecurity" keyword argument can be used to the various digest
a08450
#   algorithms in hashlib so that you can whitelist a callsite with
a08450
#   "usedforsecurity=False"
a08450
# - OpenSSL wrappers for the hashes blake2{b512,s256},
a08450
# - In FIPS mode, the blake2 hashes use OpenSSL wrappers
a08450
#   and do not offer extended functionality (keys, tree hashing, custom digest size)
a08450
#
a08450
# - In FIPS mode, hmac.HMAC can only be instantiated with an OpenSSL wrapper
a08450
#   or a string with OpenSSL hash name as the "digestmod" argument.
a08450
#   The argument must be specified (instead of defaulting to ‘md5’).
a08450
Patch329: 00329-fips.patch
a08450
a08450
# 00353 # ab4cc97b643cfe99f567e3a03e5617b507183771
a08450
# Original names for architectures with different names downstream
a08450
#
a08450
# https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
a08450
#
a08450
# Pythons in RHEL/Fedora used different names for some architectures
a08450
# than upstream and other distros (for example ppc64 vs. powerpc64).
a08450
# This was patched in patch 274, now it is sedded if %%with legacy_archnames.
a08450
#
a08450
# That meant that an extension built with the default upstream settings
a08450
# (on other distro or as an manylinux wheel) could not been found by Python
a08450
# on RHEL/Fedora because it had a different suffix.
a08450
# This patch adds the legacy names to importlib so Python is able
a08450
# to import extensions with a legacy architecture name in its
a08450
# file name.
a08450
# It work both ways, so it support both %%with and %%without legacy_archnames.
a08450
#
a08450
# WARNING: This patch has no effect on Python built with bootstrap
a08450
# enabled because Python/importlib_external.h is not regenerated
a08450
# and therefore Python during bootstrap contains importlib from
a08450
# upstream without this feature. It's possible to include
a08450
# Python/importlib_external.h to this patch but it'd make rebasing
a08450
# a nightmare because it's basically a binary file.
a08450
Patch353: 00353-architecture-names-upstream-downstream.patch
a08450
e8a926
# 00382 # 9e275dcdf3934b827994ecc3247d583d5bab7985
e8a926
# CVE-2015-20107
bb807a
#
e8a926
# Make mailcap refuse to match unsafe filenames/types/params (GH-91993)
bb807a
#
e8a926
# Upstream: https://github.com/python/cpython/issues/68966
bb807a
#
e8a926
# Tracker bug: https://bugzilla.redhat.com/show_bug.cgi?id=2075390
e8a926
Patch382: 00382-cve-2015-20107.patch
bb807a
bbebd1
# 00391 #
bbebd1
# CVE-2022-42919
bbebd1
#
bbebd1
# Local privilege escalation via the multiprocessing forkserver start method.
bbebd1
#
bbebd1
# Upstream: https://github.com/python/cpython/issues/97514
bbebd1
#
bbebd1
# Tracker bug: https://bugzilla.redhat.com/show_bug.cgi?id=2138705
bbebd1
Patch391: 00391-cve-2022-42919.patch
bbebd1
6bc0c3
# 00394 #
6bc0c3
# CVE-2022-45061: CPU denial of service via inefficient IDNA decoder
6bc0c3
#
6bc0c3
# gh-98433: Fix quadratic time idna decoding.
6bc0c3
#
6bc0c3
# There was an unnecessary quadratic loop in idna decoding. This restores
6bc0c3
# the behavior to linear.
6bc0c3
Patch394: 00394-cve-2022-45061-cpu-denial-of-service-via-inefficient-idna-decoder.patch
6bc0c3
a08450
# (New patches go here ^^^)
a08450
#
a08450
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
a08450
# please try to keep the patch numbers in-sync between all specfiles.
a08450
#
a08450
# More information, and a patch number catalog, is at:
a08450
#
a08450
#     https://fedoraproject.org/wiki/SIGs/Python/PythonPatches
a08450
#
a08450
# The patches are stored and rebased at:
a08450
#
a08450
#     https://github.com/fedora-python/cpython
a08450
a08450
a08450
# ==========================================
a08450
# Descriptions, and metadata for subpackages
a08450
# ==========================================
a08450
a08450
# this if branch is ~300 lines long and contains subpackages' definitions
a08450
%if %{without flatpackage}
a08450
%if %{with main_python}
a08450
# Description for the python3X SRPM only:
a08450
%description
a08450
Python %{pybasever} is an accessible, high-level, dynamically typed, interpreted
a08450
programming language, designed with an emphasis on code readability.
a08450
It includes an extensive standard library, and has a vast ecosystem of
a08450
third-party libraries.
a08450
a08450
%package -n %{pkgname}
a08450
Summary: Python %{pybasever} interpreter
a08450
a08450
# In order to support multiple Python interpreters for development purposes,
a08450
# packages with the naming scheme flatpackage (e.g. python3.5) exist for
a08450
# non-default versions of Python 3.
a08450
# For consistency, we provide python3.X from python3 as well.
a08450
Provides: python%{pybasever} = %{version}-%{release}
a08450
Provides: python%{pybasever}%{?_isa} = %{version}-%{release}
a08450
# To keep the upgrade path clean, we Obsolete python3.X.
a08450
# Note that using Obsoletes without package version is not standard practice.
a08450
# Here we assert that *any* version of the system's default interpreter is
a08450
# preferable to an "extra" interpreter. For example, python3-3.6.1 will
a08450
# replace python3.6-3.6.2.
a08450
Obsoletes: python%{pybasever}
a08450
a08450
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
a08450
# https://fedoraproject.org/wiki/Changes/Python_means_Python3
a08450
# We recommend /usr/bin/python so users get it by default
a08450
# Versioned recommends are problematic, and we know that the package requires
a08450
# python3 back with fixed version, so we just use the path here:
a08450
Recommends: %{_bindir}/python
a08450
%endif
a08450
a08450
%if %{with rhel8_compat_shims}
a08450
Provides:  platform-python = %{version}-%{release}
a08450
Provides:  platform-python%{?_isa} = %{version}-%{release}
a08450
Obsoletes: platform-python < %{pybasever}
a08450
%endif
a08450
a08450
# Python interpreter packages used to be named (or provide) name pythonXY (e.g.
a08450
# python39). However, to align it with the executable names and to prepare for
a08450
# Python 3.10, they were renamed to pythonX.Y (e.g. python3.9, python3.10). We
a08450
# provide and obsolete the previous names.
a08450
# - Here are the tags for the nonflat package, regardless if main_python (e.g.
a08450
#   python3) or not (e.g. python39). For the flat package, the provide is
a08450
#   repeated many lines later.
a08450
Provides: python%{pyshortver} = %{version}-%{release}
a08450
Obsoletes: python%{pyshortver} < %{version}-%{release}
a08450
a08450
# Packages with Python modules in standard locations automatically
a08450
# depend on python(abi). Provide that here.
a08450
Provides: python(abi) = %{pybasever}
a08450
a08450
Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
a08450
a08450
# In Fedora 31, /usr/bin/pydoc was moved here from Python 2.
a08450
# Ideally we'd have an explicit conflict with "/usr/bin/pydoc < 3",
a08450
# but file provides aren't versioned and the file moved across packages.
a08450
# Instead, we rely on the conflict in python3-libs.
a08450
a08450
# This prevents ALL subpackages built from this spec to require
a08450
# /usr/bin/python3* or python(abi). Granularity per subpackage is impossible.
a08450
# It's intended for the libs package not to drag in the interpreter, see
a08450
# https://bugzilla.redhat.com/show_bug.cgi?id=1547131
a08450
# https://bugzilla.redhat.com/show_bug.cgi?id=1862082
a08450
# All other packages require %%{pkgname} explicitly.
a08450
%global __requires_exclude ^(/usr/bin/python3|python\\(abi\\))
a08450
a08450
%description -n %{pkgname}
a08450
Python %{pybasever} is an accessible, high-level, dynamically typed, interpreted
a08450
programming language, designed with an emphasis on code readability.
a08450
It includes an extensive standard library, and has a vast ecosystem of
a08450
third-party libraries.
a08450
a08450
The %{pkgname} package provides the "%{exename}" executable: the reference
a08450
interpreter for the Python language, version 3.
a08450
The majority of its standard library is provided in the %{pkgname}-libs package,
a08450
which should be installed automatically along with %{pkgname}.
a08450
The remaining parts of the Python standard library are broken out into the
a08450
%{pkgname}-tkinter and %{pkgname}-test packages, which may need to be installed
a08450
separately.
a08450
a08450
Documentation for Python is provided in the %{pkgname}-docs package.
a08450
a08450
Packages containing additional libraries for Python are generally named with
a08450
the "%{pkgname}-" prefix.
a08450
a08450
a08450
%if %{with main_python}
a08450
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
a08450
# https://fedoraproject.org/wiki/Changes/Python_means_Python3
a08450
%package -n python-unversioned-command
a08450
Summary: The "python" command that runs Python 3
a08450
BuildArch: noarch
a08450
a08450
# In theory this could require any python3 version
a08450
Requires: python3 == %{version}-%{release}
a08450
# But since we want to provide versioned python, we require exact version
a08450
Provides: python = %{version}-%{release}
a08450
# This also save us an explicit conflict for older python3 builds
a08450
a08450
%description -n python-unversioned-command
a08450
This package contains /usr/bin/python - the "python" command that runs Python 3.
a08450
a08450
%endif # with main_python
a08450
a08450
a08450
%package -n %{pkgname}-libs
a08450
Summary:        Python runtime libraries
a08450
a08450
%if %{with rpmwheels}
a08450
Requires: %{python_wheel_pkg_prefix}-setuptools-wheel >= 53.0.0-7
a08450
Requires: %{python_wheel_pkg_prefix}-pip-wheel >= 21.2.3-4
a08450
%else
a08450
Provides: bundled(python3dist(pip)) = %{pip_version}
a08450
Provides: bundled(python3dist(setuptools)) = %{setuptools_version}
a08450
%endif
a08450
a08450
# Provides for the bundled libmpdec
a08450
Provides: bundled(mpdecimal) = %{libmpdec_version}
a08450
Provides: bundled(libmpdec) = %{libmpdec_version}
a08450
a08450
# There are files in the standard library that have python shebang.
a08450
# We've filtered the automatic requirement out so libs are installable without
a08450
# the main package. This however makes it pulled in by default.
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=1547131
a08450
Recommends: %{pkgname}%{?_isa} = %{version}-%{release}
a08450
a08450
# tkinter is part of the standard library,
a08450
# but it is torn out to save an unwanted dependency on tk and X11.
a08450
# we recommend it when tk is already installed (for better UX)
a08450
Recommends: (%{pkgname}-tkinter%{?_isa} = %{version}-%{release} if tk%{?_isa})
a08450
a08450
# The zoneinfo module needs tzdata
a08450
Requires: tzdata
a08450
a08450
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
a08450
# In Fedora 31, several "unversioned" files like /usr/bin/pydoc and all the
a08450
# "unversioned" provides were moved from python2 to python3.
a08450
# So, newer python3 packages need to conflict with old Python 2 builds that
a08450
# still provided unversioned Python.
a08450
# Since all python packages, new and old, have versioned requires on
a08450
# python?-libs, we do it here:
a08450
Conflicts: python-libs < 3
a08450
# (We explicitly conflict with python-libs and not python2-libs, so only the
a08450
# old Python 2 builds that still provided unversioned Python are handled.)
a08450
a08450
%if %{with rhel8_compat_shims}
a08450
# In RHEL 8 platform-python-setuptools/pip were always installed due to dnf,
a08450
# but did not provide user-facing binaries, which were in the
a08450
# python3-setuptools/pip packages. We Provide the platform-python-* names from
a08450
# the python3- packages in RHEL 9, but Obsolete them here to have a clean
a08450
# upgrade path.
a08450
Obsoletes: platform-python-setuptools < 1:0
a08450
Obsoletes: platform-python-pip < 1:0
a08450
%endif
a08450
a08450
%description -n %{pkgname}-libs
a08450
This package contains runtime libraries for use by Python:
a08450
- the majority of the Python standard library
a08450
- a dynamically linked library for use by applications that embed Python as
a08450
  a scripting language, and by the main "%{exename}" executable
a08450
a08450
a08450
%package -n %{pkgname}-devel
a08450
Summary: Libraries and header files needed for Python development
a08450
Requires: %{pkgname} = %{version}-%{release}
a08450
Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
a08450
# The RPM related dependencies bring nothing to a non-RPM Python developer
a08450
# But we want them when packages BuildRequire python3-devel
a08450
Requires: (python-rpm-macros if rpm-build)
a08450
Requires: (python3-rpm-macros if rpm-build)
a08450
a08450
# Python developers are very likely to need pip
a08450
Recommends: %{pkgname}-pip
a08450
a08450
%if %{without bootstrap}
a08450
# This is not "API" (packages that need setuptools should still BuildRequire it)
a08450
# However some packages apparently can build both with and without setuptools
a08450
# producing egg-info as file or directory (depending on setuptools presence).
a08450
# Directory-to-file updates are problematic in RPM, so we ensure setuptools is
a08450
# installed when -devel is required.
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=1623914
a08450
# See https://fedoraproject.org/wiki/Packaging:Directory_Replacement
a08450
Requires: (%{pkgname}-setuptools if rpm-build)
a08450
a08450
Requires: (python3-rpm-generators if rpm-build)
a08450
%endif
a08450
a08450
Provides: %{pkgname}-2to3 = %{version}-%{release}
a08450
Provides: 2to3 = %{version}-%{release}
a08450
a08450
Conflicts: %{pkgname} < %{version}-%{release}
a08450
a08450
# In Fedora 31, several "unversioned" files were moved here from Python 2:
a08450
# pygettext.py, msgfmt.py, python-config, python.pc
a08450
Conflicts: python-devel < 3
a08450
a08450
%if %{with rhel8_compat_shims}
a08450
Provides:  platform-python-devel = %{version}-%{release}
a08450
Provides:  platform-python-devel%{?_isa} = %{version}-%{release}
a08450
Obsoletes: platform-python-devel < %{pybasever}
a08450
%endif
a08450
a08450
%description -n %{pkgname}-devel
a08450
This package contains the header files and configuration needed to compile
a08450
Python extension modules (typically written in C or C++), to embed Python
a08450
into other programs, and to make binary distributions for Python libraries.
a08450
a08450
It also contains the necessary macros to build RPM packages with Python modules
a08450
and 2to3 tool, an automatic source converter from Python 2.X.
a08450
a08450
a08450
%package -n %{pkgname}-idle
a08450
Summary: A basic graphical development environment for Python
a08450
Requires: %{pkgname} = %{version}-%{release}
a08450
Requires: %{pkgname}-tkinter = %{version}-%{release}
a08450
a08450
Provides: idle3 = %{version}-%{release}
a08450
Provides: idle = %{version}-%{release}
a08450
a08450
Provides: %{pkgname}-tools = %{version}-%{release}
a08450
Provides: %{pkgname}-tools%{?_isa} = %{version}-%{release}
a08450
Obsoletes: %{pkgname}-tools < %{version}-%{release}
a08450
a08450
# In Fedora 31, /usr/bin/idle was moved here from Python 2.
a08450
Conflicts: python-tools < 3
a08450
a08450
%description -n %{pkgname}-idle
a08450
IDLE is Python’s Integrated Development and Learning Environment.
a08450
a08450
IDLE has the following features: Python shell window (interactive
a08450
interpreter) with colorizing of code input, output, and error messages;
a08450
multi-window text editor with multiple undo, Python colorizing,
a08450
smart indent, call tips, auto completion, and other features;
a08450
search within any window, replace within editor windows, and
a08450
search through multiple files (grep); debugger with persistent
a08450
breakpoints, stepping, and viewing of global and local namespaces;
a08450
configuration, browsers, and other dialogs.
a08450
a08450
a08450
%package -n %{pkgname}-tkinter
a08450
Summary: A GUI toolkit for Python
a08450
Requires: %{pkgname} = %{version}-%{release}
a08450
a08450
%description -n %{pkgname}-tkinter
a08450
The Tkinter (Tk interface) library is a graphical user interface toolkit for
a08450
the Python programming language.
a08450
a08450
a08450
%package -n %{pkgname}-test
a08450
Summary: The self-test suite for the main python3 package
a08450
Requires: %{pkgname} = %{version}-%{release}
a08450
Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
a08450
a08450
%description -n %{pkgname}-test
a08450
The self-test suite for the Python interpreter.
a08450
a08450
This is only useful to test Python itself. For testing general Python code,
a08450
you should use the unittest module from %{pkgname}-libs, or a library such as
a08450
%{pkgname}-pytest.
a08450
a08450
a08450
%if %{with debug_build}
a08450
%package -n %{pkgname}-debug
a08450
Summary: Debug version of the Python runtime
a08450
a08450
# The debug build is an all-in-one package version of the regular build, and
a08450
# shares the same .py/.pyc files and directories as the regular build. Hence
a08450
# we depend on all of the subpackages of the regular build:
a08450
Requires: %{pkgname}%{?_isa} = %{version}-%{release}
a08450
Requires: %{pkgname}-libs%{?_isa} = %{version}-%{release}
a08450
Requires: %{pkgname}-devel%{?_isa} = %{version}-%{release}
a08450
Requires: %{pkgname}-test%{?_isa} = %{version}-%{release}
a08450
Requires: %{pkgname}-tkinter%{?_isa} = %{version}-%{release}
a08450
Requires: %{pkgname}-idle%{?_isa} = %{version}-%{release}
a08450
a08450
# In Fedora 31, /usr/bin/python-debug was moved here from Python 2.
a08450
Conflicts: python-debug < 3
a08450
a08450
%if %{with rhel8_compat_shims}
a08450
Provides:  platform-python-debug = %{version}-%{release}
a08450
Provides:  platform-python-debug%{?_isa} = %{version}-%{release}
a08450
Obsoletes: platform-python-debug < %{pybasever}
a08450
%endif
a08450
a08450
%description -n %{pkgname}-debug
a08450
python3-debug provides a version of the Python runtime with numerous debugging
a08450
features enabled, aimed at advanced Python users such as developers of Python
a08450
extension modules.
a08450
a08450
This version uses more memory and will be slower than the regular Python build,
a08450
but is useful for tracking down reference-counting issues and other bugs.
a08450
a08450
The debug build shares installation directories with the standard Python
a08450
runtime. Python modules -- source (.py), bytecode (.pyc), and C-API extensions
a08450
(.cpython*.so) -- are compatible between this and the standard version
a08450
of Python.
a08450
a08450
The debug runtime additionally supports debug builds of C-API extensions
a08450
(with the "d" ABI flag) for debugging issues in those extensions.
a08450
%endif # with debug_build
a08450
a08450
%else  # with flatpackage
a08450
a08450
# We'll not provide this, on purpose
a08450
# No package in Fedora shall ever depend on flatpackage via this
a08450
%global __requires_exclude ^python\\(abi\\) = 3\\..$
a08450
%global __provides_exclude ^python\\(abi\\) = 3\\..$
a08450
a08450
# Python interpreter packages used to be named (or provide) name pythonXY (e.g.
a08450
# python39). However, to align it with the executable names and to prepare for
a08450
# Python 3.10, they were renamed to pythonX.Y (e.g. python3.9, python3.10). We
a08450
# provide and obsolete the previous names.
a08450
# - Here are the tags for the flat package. For the nonflat package, the
a08450
#   provide is repeated many lines above.
a08450
Provides: python%{pyshortver} = %{version}-%{release}
a08450
Obsoletes: python%{pyshortver} < %{version}-%{release}
a08450
a08450
%if %{with rpmwheels}
a08450
Requires: %{python_wheel_pkg_prefix}-setuptools-wheel >= 53.0.0-7
a08450
Requires: %{python_wheel_pkg_prefix}-pip-wheel >= 21.2.3-4
a08450
%else
a08450
Provides: bundled(python3dist(pip)) = %{pip_version}
a08450
Provides: bundled(python3dist(setuptools)) = %{setuptools_version}
a08450
%endif
a08450
a08450
# Provides for the bundled libmpdec
a08450
Provides: bundled(mpdecimal) = %{libmpdec_version}
a08450
Provides: bundled(libmpdec) = %{libmpdec_version}
a08450
a08450
# The zoneinfo module needs tzdata
a08450
Requires: tzdata
a08450
a08450
# The description for the flat package (SRPM and built)
a08450
%description
a08450
Python %{pybasever} package for developers.
a08450
a08450
This package exists to allow developers to test their code against a newer
a08450
version of Python. This is not a full Python stack and if you wish to run
a08450
your applications with Python %{pybasever}, update your Fedora to a newer
a08450
version once Python %{pybasever} is stable.
a08450
a08450
%endif # with flatpackage
a08450
a08450
# ======================================================
a08450
# The prep phase of the build:
a08450
# ======================================================
a08450
a08450
%prep
a08450
%gpgverify -k2 -s1 -d0
a08450
%autosetup -S git_am -N -n Python-%{upstream_version}
a08450
a08450
# Apply patches up to 188
a08450
%autopatch -M 188
a08450
a08450
%if %{with rpmwheels}
a08450
# Temporary workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1954999
a08450
%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}}
a08450
a08450
%apply_patch -q %{PATCH189}
a08450
rm Lib/ensurepip/_bundled/*.whl
a08450
%endif
a08450
a08450
# Apply the remaining patches
a08450
%autopatch -m 190
a08450
a08450
# Remove all exe files to ensure we are not shipping prebuilt binaries
a08450
# note that those are only used to create Microsoft Windows installers
a08450
# and that functionality is broken on Linux anyway
a08450
find -name '*.exe' -print -delete
a08450
a08450
# Remove bundled libraries to ensure that we're using the system copy.
a08450
rm -r Modules/expat
a08450
a08450
# Remove files that should be generated by the build
a08450
# (This is after patching, so that we can use patches directly from upstream)
a08450
rm configure pyconfig.h.in
a08450
a08450
# When we use the legacy arch names, we need to change them in configure.ac
a08450
%if %{with legacy_archnames}
a08450
sed -i configure.ac \
a08450
    -e 's/\b%{platform_triplet_upstream}\b/%{platform_triplet_legacy}/'
a08450
%endif
a08450
a08450
# Modify ensurepip, patched by `00189-use-rpm-wheels.patch`, to insert the
a08450
# actual %%python_wheel_dir location
a08450
sed -i Lib/ensurepip/__init__.py -e 's|_WHEEL_DIR = "/usr/share/python-wheels/"|_WHEEL_DIR = "%{python_wheel_dir}/"|'
a08450
a08450
a08450
# ======================================================
a08450
# Configuring and building the code:
a08450
# ======================================================
a08450
a08450
%build
a08450
a08450
# The build process embeds version info extracted from the Git repository
a08450
# into the Py_GetBuildInfo and sys.version strings.
a08450
# Our Git repository is artificial, so we don't want that.
a08450
# Tell configure to not use git.
a08450
export HAS_GIT=not-found
a08450
a08450
# Regenerate the configure script and pyconfig.h.in
a08450
autoconf
a08450
autoheader
a08450
a08450
# Remember the current directory (which has sources and the configure script),
a08450
# so we can refer to it after we "cd" elsewhere.
a08450
topdir=$(pwd)
a08450
a08450
# Get proper option names from bconds
a08450
%if %{with computed_gotos}
a08450
%global computed_gotos_flag yes
a08450
%else
a08450
%global computed_gotos_flag no
a08450
%endif
a08450
a08450
%if %{with optimizations}
a08450
%global optimizations_flag "--enable-optimizations"
a08450
%else
a08450
%global optimizations_flag "--disable-optimizations"
a08450
%endif
a08450
a08450
# Set common compiler/linker flags
a08450
# We utilize the %%extension_...flags macros here so users building C/C++
a08450
# extensions with our python won't get all the compiler/linker flags used
a08450
# in Fedora RPMs.
a08450
# Standard library built here will still use the %%build_...flags,
a08450
# Fedora packages utilizing %%py3_build will use them as well
a08450
# https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
a08450
export CFLAGS="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
a08450
export CFLAGS_NODIST="%{build_cflags} -D_GNU_SOURCE -fPIC -fwrapv%{?with_no_semantic_interposition: -fno-semantic-interposition}"
a08450
export CXXFLAGS="%{extension_cxxflags} -D_GNU_SOURCE -fPIC -fwrapv"
a08450
export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
a08450
export OPT="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
a08450
export LINKCC="gcc"
a08450
export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
a08450
export LDFLAGS="%{extension_ldflags} -g $(pkg-config --libs-only-L openssl)"
a08450
export LDFLAGS_NODIST="%{build_ldflags}%{?with_no_semantic_interposition: -fno-semantic-interposition} -g $(pkg-config --libs-only-L openssl)"
a08450
a08450
# We can build several different configurations of Python: regular and debug.
a08450
# Define a common function that does one build:
a08450
BuildPython() {
a08450
  ConfName=$1
a08450
  ExtraConfigArgs=$2
a08450
  MoreCFlags=$3
a08450
a08450
  # Each build is done in its own directory
a08450
  ConfDir=build/$ConfName
a08450
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName
a08450
  mkdir -p $ConfDir
a08450
  pushd $ConfDir
a08450
a08450
  # Normally, %%configure looks for the "configure" script in the current
a08450
  # directory.
a08450
  # Since we changed directories, we need to tell %%configure where to look.
a08450
  %global _configure $topdir/configure
a08450
a08450
  # A workaround for https://bugs.python.org/issue39761
a08450
  export DFLAGS=" "
a08450
a08450
%configure \
a08450
  --with-platlibdir=%{_lib} \
a08450
  --enable-ipv6 \
a08450
  --enable-shared \
a08450
  --with-computed-gotos=%{computed_gotos_flag} \
a08450
  --with-dbmliborder=gdbm:ndbm:bdb \
a08450
  --with-system-expat \
a08450
  --with-system-ffi \
a08450
  --enable-loadable-sqlite-extensions \
a08450
  --with-dtrace \
a08450
  --with-lto \
a08450
  --with-ssl-default-suites=openssl \
a08450
  --with-builtin-hashlib-hashes=blake2 \
a08450
%if %{with valgrind}
a08450
  --with-valgrind \
a08450
%endif
a08450
  $ExtraConfigArgs \
a08450
  %{nil}
a08450
a08450
%global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags"
a08450
a08450
%if %{without bootstrap}
a08450
  # Regenerate generated files (needs python3)
a08450
  %make_build %{flags_override} regen-all PYTHON_FOR_REGEN="python%{pybasever}"
a08450
%endif
a08450
a08450
  # Invoke the build
a08450
  %make_build %{flags_override}
a08450
a08450
  popd
a08450
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfName
a08450
}
a08450
a08450
# Call the above to build each configuration.
a08450
a08450
%if %{with debug_build}
a08450
# The debug build is compiled with the lowest level of optimizations as to not optimize
a08450
# out frames. We also suppress the warnings as the default distro value of the FORTIFY_SOURCE
a08450
# option produces too many warnings when compiling at the O0 optimization level.
a08450
# See also: https://bugzilla.redhat.com/show_bug.cgi?id=1818857
a08450
BuildPython debug \
a08450
  "--without-ensurepip --with-pydebug" \
a08450
  "-O0 -Wno-cpp"
a08450
%endif # with debug_build
a08450
a08450
BuildPython optimized \
a08450
  "--without-ensurepip %{optimizations_flag}" \
a08450
  ""
a08450
a08450
# ======================================================
a08450
# Installing the built code:
a08450
# ======================================================
a08450
a08450
%install
a08450
a08450
# As in %%build, remember the current directory
a08450
topdir=$(pwd)
a08450
a08450
# We install a collection of hooks for gdb that make it easier to debug
a08450
# executables linked against libpython3* (such as /usr/bin/python3 itself)
a08450
#
a08450
# These hooks are implemented in Python itself (though they are for the version
a08450
# of python that gdb is linked with)
a08450
#
a08450
# gdb-archer looks for them in the same path as the ELF file or its .debug
a08450
# file, with a -gdb.py suffix.
a08450
# We put them next to the debug file, because ldconfig would complain if
a08450
# it found non-library files directly in /usr/lib/
a08450
# (see https://bugzilla.redhat.com/show_bug.cgi?id=562980)
a08450
#
a08450
# We'll put these files in the debuginfo package by installing them to e.g.:
a08450
#  /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
a08450
# (note that the debug path is /usr/lib/debug for both 32/64 bit)
a08450
#
a08450
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
a08450
# information
a08450
a08450
%if %{with gdb_hooks}
a08450
DirHoldingGdbPy=%{_usr}/lib/debug/%{_libdir}
a08450
mkdir -p %{buildroot}$DirHoldingGdbPy
a08450
%endif # with gdb_hooks
a08450
a08450
# Multilib support for pyconfig.h
a08450
# 32- and 64-bit versions of pyconfig.h are different. For multilib support
a08450
# (making it possible to install 32- and 64-bit versions simultaneously),
a08450
# we need to install them under different filenames, and to make the common
a08450
# "pyconfig.h" include the right file based on architecture.
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=192747
a08450
# Filanames are defined here:
a08450
%global _pyconfig32_h pyconfig-32.h
a08450
%global _pyconfig64_h pyconfig-64.h
a08450
%global _pyconfig_h pyconfig-%{__isa_bits}.h
a08450
a08450
# Use a common function to do an install for all our configurations:
a08450
InstallPython() {
a08450
a08450
  ConfName=$1
a08450
  PyInstSoName=$2
a08450
  MoreCFlags=$3
a08450
  LDVersion=$4
a08450
a08450
  # Switch to the directory with this configuration's built files
a08450
  ConfDir=build/$ConfName
a08450
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
a08450
  mkdir -p $ConfDir
a08450
  pushd $ConfDir
a08450
a08450
  %make_install EXTRA_CFLAGS="$MoreCFlags"
a08450
a08450
  popd
a08450
a08450
%if %{with gdb_hooks}
a08450
  # See comment on $DirHoldingGdbPy above
a08450
  PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName-%{version}-%{release}.%{_arch}.debug-gdb.py
a08450
  cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
a08450
%endif # with gdb_hooks
a08450
a08450
  # Rename the -devel script that differs on different arches to arch specific name
a08450
  mv %{buildroot}%{_bindir}/python${LDVersion}-{,`uname -m`-}config
a08450
  echo -e '#!/bin/sh\nexec %{_bindir}/python'${LDVersion}'-`uname -m`-config "$@"' > \
a08450
    %{buildroot}%{_bindir}/python${LDVersion}-config
a08450
    chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config
a08450
a08450
  # Make python3-devel multilib-ready
a08450
  mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \
a08450
     %{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h}
a08450
  cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF
a08450
#include <bits/wordsize.h>
a08450
a08450
#if __WORDSIZE == 32
a08450
#include "%{_pyconfig32_h}"
a08450
#elif __WORDSIZE == 64
a08450
#include "%{_pyconfig64_h}"
a08450
#else
a08450
#error "Unknown word size"
a08450
#endif
a08450
EOF
a08450
a08450
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
a08450
}
a08450
a08450
# Install the "debug" build first; any common files will be overridden with
a08450
# later builds
a08450
%if %{with debug_build}
a08450
InstallPython debug \
a08450
  %{py_INSTSONAME_debug} \
a08450
  -O0 \
a08450
  %{LDVERSION_debug}
a08450
%endif # with debug_build
a08450
a08450
# Now the optimized build:
a08450
InstallPython optimized \
a08450
  %{py_INSTSONAME_optimized} \
a08450
  "" \
a08450
  %{LDVERSION_optimized}
a08450
a08450
# Install directories for additional packages
a08450
install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__
a08450
%if "%{_lib}" == "lib64"
a08450
# The 64-bit version needs to create "site-packages" in /usr/lib/ (for
a08450
# pure-Python modules) as well as in /usr/lib64/ (for packages with extension
a08450
# modules).
a08450
# Note that rpmlint will complain about hardcoded library path;
a08450
# this is intentional.
a08450
install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
a08450
%endif
a08450
a08450
%if %{with main_python}
a08450
# add idle3 to menu
a08450
install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle3.png
a08450
install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle3.png
a08450
install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle3.png
a08450
install -D -m 0644 Lib/idlelib/Icons/idle_256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/idle3.png
a08450
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10}
a08450
a08450
# Install and validate appdata file
a08450
mkdir -p %{buildroot}%{_metainfodir}
a08450
cp -a %{SOURCE11} %{buildroot}%{_metainfodir}
a08450
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/idle3.appdata.xml
a08450
%endif
a08450
a08450
# Make sure distutils looks at the right pyconfig.h file
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=201434
a08450
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
a08450
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
a08450
# when python starts up (see https://bugzilla.redhat.com/show_bug.cgi?id=653058)
a08450
#
a08450
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
a08450
# variants:
a08450
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
a08450
  %{buildroot}%{pylibdir}/distutils/sysconfig.py \
a08450
  %{buildroot}%{pylibdir}/sysconfig.py
a08450
a08450
# Install pathfix.py to bindir
a08450
# See https://github.com/fedora-python/python-rpm-porting/issues/24
a08450
cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/pathfix%{pybasever}.py
a08450
a08450
# Install i18n tools to bindir
a08450
# They are also in python2, so we version them
a08450
# https://bugzilla.redhat.com/show_bug.cgi?id=1571474
a08450
for tool in pygettext msgfmt; do
a08450
  cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{pybasever}.py
a08450
  ln -s ${tool}%{pybasever}.py %{buildroot}%{_bindir}/${tool}3.py
a08450
done
a08450
a08450
# Switch all shebangs to refer to the specific Python version.
a08450
# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$,
a08450
# so handle files named using other naming scheme separately.
a08450
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
a08450
  Tools/scripts/pathfix.py \
a08450
  -i "%{_bindir}/python%{pybasever}" -pn \
a08450
  %{buildroot} \
a08450
  %{buildroot}%{_bindir}/*%{pybasever}.py \
a08450
  %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py}
a08450
a08450
# Remove shebang lines from .py files that aren't executable, and
a08450
# remove executability from .py files that don't have a shebang line:
a08450
find %{buildroot} -name \*.py \
a08450
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
a08450
  -print -exec sed -i '1d' {} \; \) -o \( \
a08450
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
a08450
  -exec chmod a-x {} \; \) \)
a08450
a08450
# Get rid of DOS batch files:
a08450
find %{buildroot} -name \*.bat -exec rm {} \;
a08450
a08450
# Get rid of backup files:
a08450
find %{buildroot}/ -name "*~" -exec rm -f {} \;
a08450
find . -name "*~" -exec rm -f {} \;
a08450
a08450
# Do bytecompilation with the newly installed interpreter.
a08450
# This is similar to the script in macros.pybytecompile
a08450
# compile *.pyc
a08450
# Python CMD line options:
a08450
# -s - don't add user site directory to sys.path
a08450
# -B - don't write .pyc files on import
a08450
# compileall CMD line options:
a08450
# -f - force rebuild even if timestamps are up to date
a08450
# -o - optimization levels to run compilation with
a08450
# -s - part of path to left-strip from path to source file (buildroot)
a08450
# -p - path to add as prefix to path to source file (/ to make it absolute)
a08450
# --hardlink-dupes - hardlink different optimization level pycs together if identical (saves space)
a08450
LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
a08450
%{buildroot}%{_bindir}/python%{pybasever} -s -B -m compileall \
a08450
-f %{_smp_mflags} -o 0 -o 1 -o 2 -s %{buildroot} -p / %{buildroot} --hardlink-dupes || :
a08450
a08450
# Turn this BRP off, it is done by compileall2 --hardlink-dupes above
a08450
%global __brp_python_hardlink %{nil}
a08450
a08450
# Since we have pathfix.py in bindir, this is created, but we don't want it
a08450
rm -rf %{buildroot}%{_bindir}/__pycache__
a08450
a08450
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
a08450
find %{buildroot} -perm 555 -exec chmod 755 {} \;
a08450
a08450
# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
a08450
# avoid the user having to know the precise version and ABI flags.
a08450
# See e.g. https://bugzilla.redhat.com/show_bug.cgi?id=676748
a08450
%if %{with debug_build} && %{with main_python}
a08450
ln -s \
a08450
  %{_bindir}/python%{LDVERSION_debug} \
a08450
  %{buildroot}%{_bindir}/python3-debug
a08450
%endif
a08450
a08450
# There's 2to3-X.X executable and 2to3 soft link to it.
a08450
# No reason to have both, so keep only 2to3 as an executable.
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=1111275
a08450
mv %{buildroot}%{_bindir}/2to3-%{pybasever} %{buildroot}%{_bindir}/2to3
a08450
a08450
%if %{without main_python}
a08450
# Remove stuff that would conflict with python3 package
a08450
rm %{buildroot}%{_bindir}/python3
a08450
rm %{buildroot}%{_bindir}/pydoc3
a08450
rm %{buildroot}%{_bindir}/pygettext3.py
a08450
rm %{buildroot}%{_bindir}/msgfmt3.py
a08450
rm %{buildroot}%{_bindir}/idle3
a08450
rm %{buildroot}%{_bindir}/python3-*
a08450
rm %{buildroot}%{_bindir}/2to3
a08450
rm %{buildroot}%{_libdir}/libpython3.so
a08450
rm %{buildroot}%{_mandir}/man1/python3.1*
a08450
rm %{buildroot}%{_libdir}/pkgconfig/python3.pc
a08450
rm %{buildroot}%{_libdir}/pkgconfig/python3-embed.pc
a08450
%else
a08450
# Link the unversioned stuff
a08450
# https://fedoraproject.org/wiki/Changes/Python_means_Python3
a08450
ln -s ./python3 %{buildroot}%{_bindir}/python
a08450
ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc
a08450
ln -s ./pygettext3.py %{buildroot}%{_bindir}/pygettext.py
a08450
ln -s ./msgfmt3.py %{buildroot}%{_bindir}/msgfmt.py
a08450
ln -s ./idle3 %{buildroot}%{_bindir}/idle
a08450
ln -s ./python3-config %{buildroot}%{_bindir}/python-config
a08450
ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1
a08450
ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc
a08450
ln -s ./pathfix%{pybasever}.py %{buildroot}%{_bindir}/pathfix.py
a08450
%if %{with debug_build}
a08450
ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug
a08450
%endif
a08450
%endif
a08450
a08450
%if %{with rhel8_compat_shims}
a08450
# Provide RHEL8 backwards compatible symbolic links in %%_libexecdir
a08450
mkdir -p %{buildroot}%{_libexecdir}
a08450
ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python
a08450
ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/platform-python%{pybasever}
a08450
ln -s %{_bindir}/python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python-config
a08450
ln -s %{_bindir}/python%{pybasever}-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-config
a08450
ln -s %{_bindir}/python%{pybasever}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python%{pybasever}-`uname -m`-config
a08450
# There were also executables with %%{LDVERSION_optimized} in RHEL 8,
a08450
# but since Python 3.8 %%{LDVERSION_optimized} == %%{pybasever}.
a08450
# We list both in the %%files section to assert this.
a08450
%if %{with debug_build}
a08450
ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_libexecdir}/platform-python-debug
a08450
ln -s %{_bindir}/python%{LDVERSION_debug} %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}
a08450
ln -s %{_bindir}/python%{LDVERSION_debug}-config %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}-config
a08450
ln -s %{_bindir}/python%{LDVERSION_debug}-`uname -m`-config %{buildroot}%{_libexecdir}/platform-python%{LDVERSION_debug}-`uname -m`-config
a08450
%endif
a08450
%endif
a08450
a08450
# Remove large, autogenerated sources and keep only the non-optimized pycache
a08450
for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py' -lr %{buildroot}%{pylibdir}/encodings -e 'Python Character Mapping Codec .* from .* with gencodec.py'); do
a08450
    directory=$(dirname ${file})
a08450
    module=$(basename ${file%%.py})
a08450
    mv ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.pyc,${module}.pyc}
a08450
    rm ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.opt-?.pyc,${module}.py}
a08450
done
a08450
a08450
# ======================================================
a08450
# Checks for packaging issues
a08450
# ======================================================
a08450
a08450
%check
a08450
a08450
# first of all, check timestamps of bytecode files
a08450
find %{buildroot} -type f -a -name "*.py" -print0 | \
a08450
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
a08450
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
a08450
    xargs -0 %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE8}
a08450
a08450
# Ensure that the curses module was linked against libncursesw.so, rather than
a08450
# libncurses.so
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=539917
a08450
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
a08450
    | grep curses \
a08450
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
a08450
a08450
# Ensure that the debug modules are linked against the debug libpython, and
a08450
# likewise for the optimized modules and libpython:
a08450
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
a08450
    case $Module in
a08450
    *.%{SOABI_debug})
a08450
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
a08450
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
a08450
a08450
        ;;
a08450
    *.%{SOABI_optimized})
a08450
        ldd $Module | grep %{py_INSTSONAME_debug} &&
a08450
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1)
a08450
        ;;
a08450
    esac
a08450
done
a08450
a08450
# Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual
a08450
# provides for in the SPEC.
a08450
test "$(LD_LIBRARY_PATH=$(pwd)/build/optimized $(pwd)/build/optimized/python -c 'import decimal; print(decimal.__libmpdec_version__)')" = \
a08450
     "%{libmpdec_version}"
a08450
a08450
a08450
# ======================================================
a08450
# Running the upstream test suite
a08450
# ======================================================
a08450
a08450
topdir=$(pwd)
a08450
CheckPython() {
a08450
  ConfName=$1
a08450
  ConfDir=$(pwd)/build/$ConfName
a08450
a08450
  echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
a08450
a08450
  # Note that we're running the tests using the version of the code in the
a08450
  # builddir, not in the buildroot.
a08450
a08450
  # Show some info, helpful for debugging test failures
a08450
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.pythoninfo
a08450
a08450
  # Run the upstream test suite
a08450
  # --timeout=1800: kill test running for longer than 30 minutes
a08450
  # test_distutils
a08450
  #   distutils.tests.test_bdist_rpm tests fail when bootstraping the Python
a08450
  #   package: rpmbuild requires /usr/bin/pythonX.Y to be installed
a08450
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
a08450
    -wW --slowest -j0 --timeout=1800 \
a08450
    %if %{with bootstrap}
a08450
    -x test_distutils \
a08450
    %endif
a08450
    %ifarch %{mips64}
a08450
    -x test_ctypes \
a08450
    %endif
a08450
a08450
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
a08450
a08450
}
a08450
a08450
%if %{with tests}
a08450
a08450
# Check each of the configurations:
a08450
%if %{with debug_build}
a08450
CheckPython debug
a08450
%endif # with debug_build
a08450
CheckPython optimized
a08450
a08450
%endif # with tests
a08450
a08450
a08450
%files -n %{pkgname}
a08450
%doc README.rst
a08450
a08450
%if %{with main_python}
a08450
%{_bindir}/pydoc*
a08450
%{_bindir}/python3
a08450
%else
a08450
%{_bindir}/pydoc%{pybasever}
a08450
%endif
a08450
a08450
%{_bindir}/python%{pybasever}
a08450
%{_bindir}/python%{LDVERSION_optimized}
a08450
%{_mandir}/*/*3*
a08450
a08450
%if %{with rhel8_compat_shims}
a08450
%{_libexecdir}/platform-python
a08450
%{_libexecdir}/platform-python%{pybasever}
a08450
%{_libexecdir}/platform-python%{LDVERSION_optimized}
a08450
%endif
a08450
a08450
%if %{with main_python}
a08450
%if %{without flatpackage}
a08450
%files -n python-unversioned-command
a08450
%endif
a08450
%{_bindir}/python
a08450
%{_mandir}/*/python.1*
a08450
%endif
a08450
a08450
%if %{without flatpackage}
a08450
%files -n %{pkgname}-libs
a08450
%doc README.rst
a08450
%endif
a08450
a08450
%dir %{pylibdir}
a08450
%dir %{dynload_dir}
a08450
a08450
%license %{pylibdir}/LICENSE.txt
a08450
a08450
%{pylibdir}/lib2to3
a08450
%if %{without flatpackage}
a08450
%exclude %{pylibdir}/lib2to3/tests
a08450
%endif
a08450
a08450
%dir %{pylibdir}/unittest/
a08450
%dir %{pylibdir}/unittest/__pycache__/
a08450
%{pylibdir}/unittest/*.py
a08450
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%dir %{pylibdir}/asyncio/
a08450
%dir %{pylibdir}/asyncio/__pycache__/
a08450
%{pylibdir}/asyncio/*.py
a08450
%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%dir %{pylibdir}/venv/
a08450
%dir %{pylibdir}/venv/__pycache__/
a08450
%{pylibdir}/venv/*.py
a08450
%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes}
a08450
%{pylibdir}/venv/scripts
a08450
a08450
%{pylibdir}/wsgiref
a08450
%{pylibdir}/xmlrpc
a08450
a08450
%dir %{pylibdir}/ensurepip/
a08450
%dir %{pylibdir}/ensurepip/__pycache__/
a08450
%{pylibdir}/ensurepip/*.py
a08450
%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%if %{with rpmwheels}
a08450
%exclude %{pylibdir}/ensurepip/_bundled
a08450
%else
a08450
%dir %{pylibdir}/ensurepip/_bundled
a08450
%{pylibdir}/ensurepip/_bundled/*.whl
a08450
%{pylibdir}/ensurepip/_bundled/__init__.py
a08450
%{pylibdir}/ensurepip/_bundled/__pycache__/*%{bytecode_suffixes}
a08450
%endif
a08450
a08450
%dir %{pylibdir}/concurrent/
a08450
%dir %{pylibdir}/concurrent/__pycache__/
a08450
%{pylibdir}/concurrent/*.py
a08450
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%dir %{pylibdir}/concurrent/futures/
a08450
%dir %{pylibdir}/concurrent/futures/__pycache__/
a08450
%{pylibdir}/concurrent/futures/*.py
a08450
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%{pylibdir}/pydoc_data
a08450
a08450
%{dynload_dir}/_blake2.%{SOABI_optimized}.so
a08450
a08450
%{dynload_dir}/_asyncio.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_bisect.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_bz2.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_contextvars.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_crypt.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_csv.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_curses.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_dbm.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_decimal.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so
a08450
%if %{with gdbm}
a08450
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
a08450
%endif
a08450
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_heapq.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_json.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_lzma.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_opcode.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_pickle.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_queue.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_random.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_socket.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_statistics.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_struct.%{SOABI_optimized}.so
a08450
%{dynload_dir}/array.%{SOABI_optimized}.so
a08450
%{dynload_dir}/audioop.%{SOABI_optimized}.so
a08450
%{dynload_dir}/binascii.%{SOABI_optimized}.so
a08450
%{dynload_dir}/cmath.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_datetime.%{SOABI_optimized}.so
a08450
%{dynload_dir}/fcntl.%{SOABI_optimized}.so
a08450
%{dynload_dir}/grp.%{SOABI_optimized}.so
a08450
%{dynload_dir}/math.%{SOABI_optimized}.so
a08450
%{dynload_dir}/mmap.%{SOABI_optimized}.so
a08450
%if %{with nis}
a08450
%{dynload_dir}/nis.%{SOABI_optimized}.so
a08450
%endif
a08450
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
a08450
%{dynload_dir}/parser.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_posixshmem.%{SOABI_optimized}.so
a08450
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so
a08450
%{dynload_dir}/readline.%{SOABI_optimized}.so
a08450
%{dynload_dir}/resource.%{SOABI_optimized}.so
a08450
%{dynload_dir}/select.%{SOABI_optimized}.so
a08450
%{dynload_dir}/spwd.%{SOABI_optimized}.so
a08450
%{dynload_dir}/syslog.%{SOABI_optimized}.so
a08450
%{dynload_dir}/termios.%{SOABI_optimized}.so
a08450
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_uuid.%{SOABI_optimized}.so
a08450
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_xxsubinterpreters.%{SOABI_optimized}.so
a08450
%{dynload_dir}/zlib.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_zoneinfo.%{SOABI_optimized}.so
a08450
a08450
%dir %{pylibdir}/site-packages/
a08450
%dir %{pylibdir}/site-packages/__pycache__/
a08450
%{pylibdir}/site-packages/README.txt
a08450
%{pylibdir}/*.py
a08450
%dir %{pylibdir}/__pycache__/
a08450
%{pylibdir}/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%dir %{pylibdir}/collections/
a08450
%dir %{pylibdir}/collections/__pycache__/
a08450
%{pylibdir}/collections/*.py
a08450
%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%dir %{pylibdir}/ctypes/
a08450
%dir %{pylibdir}/ctypes/__pycache__/
a08450
%{pylibdir}/ctypes/*.py
a08450
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes}
a08450
%{pylibdir}/ctypes/macholib
a08450
a08450
%{pylibdir}/curses
a08450
a08450
%dir %{pylibdir}/dbm/
a08450
%dir %{pylibdir}/dbm/__pycache__/
a08450
%{pylibdir}/dbm/*.py
a08450
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%dir %{pylibdir}/distutils/
a08450
%dir %{pylibdir}/distutils/__pycache__/
a08450
%{pylibdir}/distutils/*.py
a08450
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
a08450
%{pylibdir}/distutils/README
a08450
%{pylibdir}/distutils/command
a08450
a08450
%dir %{pylibdir}/email/
a08450
%dir %{pylibdir}/email/__pycache__/
a08450
%{pylibdir}/email/*.py
a08450
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes}
a08450
%{pylibdir}/email/mime
a08450
%doc %{pylibdir}/email/architecture.rst
a08450
a08450
%{pylibdir}/encodings
a08450
a08450
%{pylibdir}/html
a08450
%{pylibdir}/http
a08450
a08450
%dir %{pylibdir}/importlib/
a08450
%dir %{pylibdir}/importlib/__pycache__/
a08450
%{pylibdir}/importlib/*.py
a08450
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%dir %{pylibdir}/json/
a08450
%dir %{pylibdir}/json/__pycache__/
a08450
%{pylibdir}/json/*.py
a08450
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%{pylibdir}/logging
a08450
%{pylibdir}/multiprocessing
a08450
a08450
%dir %{pylibdir}/sqlite3/
a08450
%dir %{pylibdir}/sqlite3/__pycache__/
a08450
%{pylibdir}/sqlite3/*.py
a08450
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
a08450
a08450
%if %{without flatpackage}
a08450
%exclude %{pylibdir}/turtle.py
a08450
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
a08450
%endif
a08450
a08450
%{pylibdir}/urllib
a08450
%{pylibdir}/xml
a08450
%{pylibdir}/zoneinfo
a08450
a08450
%if "%{_lib}" == "lib64"
a08450
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
a08450
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
a08450
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
a08450
%endif
a08450
a08450
# "Makefile" and the config-32/64.h file are needed by
a08450
# distutils/sysconfig.py:_init_posix(), so we include them in the core
a08450
# package, along with their parent directories (bug 531901):
a08450
%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/
a08450
%{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile
a08450
%dir %{_includedir}/python%{LDVERSION_optimized}/
a08450
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a08450
a08450
%{_libdir}/%{py_INSTSONAME_optimized}
a08450
%if %{with main_python}
a08450
%{_libdir}/libpython3.so
a08450
%endif
a08450
a08450
a08450
%if %{without flatpackage}
a08450
%files -n %{pkgname}-devel
a08450
%endif
a08450
a08450
%if %{with main_python}
a08450
%{_bindir}/2to3
a08450
%endif
a08450
a08450
%{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/*
a08450
%if %{without flatpackage}
a08450
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile
a08450
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a08450
%endif
a08450
%{_includedir}/python%{LDVERSION_optimized}/*.h
a08450
%{_includedir}/python%{LDVERSION_optimized}/internal/
a08450
%{_includedir}/python%{LDVERSION_optimized}/cpython/
a08450
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
a08450
a08450
%if %{with main_python}
a08450
%{_bindir}/python3-config
a08450
%{_bindir}/python-config
a08450
%{_libdir}/pkgconfig/python3.pc
a08450
%{_libdir}/pkgconfig/python.pc
a08450
%{_libdir}/pkgconfig/python3-embed.pc
a08450
%{_bindir}/pathfix.py
a08450
%{_bindir}/pygettext3.py
a08450
%{_bindir}/pygettext.py
a08450
%{_bindir}/msgfmt3.py
a08450
%{_bindir}/msgfmt.py
a08450
%endif
a08450
a08450
%{_bindir}/pathfix%{pybasever}.py
a08450
%{_bindir}/pygettext%{pybasever}.py
a08450
%{_bindir}/msgfmt%{pybasever}.py
a08450
a08450
%{_bindir}/python%{pybasever}-config
a08450
%{_bindir}/python%{LDVERSION_optimized}-config
a08450
%{_bindir}/python%{LDVERSION_optimized}-*-config
a08450
%{_libdir}/libpython%{LDVERSION_optimized}.so
a08450
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
a08450
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}-embed.pc
a08450
%{_libdir}/pkgconfig/python-%{pybasever}.pc
a08450
%{_libdir}/pkgconfig/python-%{pybasever}-embed.pc
a08450
a08450
%if %{with rhel8_compat_shims}
a08450
%{_libexecdir}/platform-python-config
a08450
%{_libexecdir}/platform-python%{pybasever}-config
a08450
%{_libexecdir}/platform-python%{LDVERSION_optimized}-config
a08450
%{_libexecdir}/platform-python%{pybasever}-*-config
a08450
%{_libexecdir}/platform-python%{LDVERSION_optimized}-*-config
a08450
%endif
a08450
a08450
a08450
%if %{without flatpackage}
a08450
%files -n %{pkgname}-idle
a08450
%endif
a08450
a08450
%if %{with main_python}
a08450
%{_bindir}/idle*
a08450
%else
a08450
%{_bindir}/idle%{pybasever}
a08450
%endif
a08450
a08450
%{pylibdir}/idlelib
a08450
a08450
%if %{with main_python}
a08450
%{_metainfodir}/idle3.appdata.xml
a08450
%{_datadir}/applications/idle3.desktop
a08450
%{_datadir}/icons/hicolor/*/apps/idle3.*
a08450
%endif
a08450
a08450
%if %{without flatpackage}
a08450
%files -n %{pkgname}-tkinter
a08450
%endif
a08450
a08450
%{pylibdir}/tkinter
a08450
%if %{without flatpackage}
a08450
%exclude %{pylibdir}/tkinter/test
a08450
%endif
a08450
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
a08450
%{pylibdir}/turtle.py
a08450
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
a08450
%dir %{pylibdir}/turtledemo
a08450
%{pylibdir}/turtledemo/*.py
a08450
%{pylibdir}/turtledemo/*.cfg
a08450
%dir %{pylibdir}/turtledemo/__pycache__/
a08450
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}
a08450
a08450
a08450
%if %{without flatpackage}
a08450
%files -n %{pkgname}-test
a08450
%endif
a08450
a08450
%{pylibdir}/ctypes/test
a08450
%{pylibdir}/distutils/tests
a08450
%{pylibdir}/sqlite3/test
a08450
%{pylibdir}/test
a08450
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_testinternalcapi.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
a08450
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so
a08450
%{pylibdir}/lib2to3/tests
a08450
%{pylibdir}/tkinter/test
a08450
%{pylibdir}/unittest/test
a08450
a08450
# We don't bother splitting the debug build out into further subpackages:
a08450
# if you need it, you're probably a developer.
a08450
a08450
# Hence the manifest is the combination of analogous files in the manifests of
a08450
# all of the other subpackages
a08450
a08450
%if %{with debug_build}
a08450
%if %{without flatpackage}
a08450
%files -n %{pkgname}-debug
a08450
%endif
a08450
a08450
%if %{with main_python}
a08450
%{_bindir}/python3-debug
a08450
%{_bindir}/python-debug
a08450
%endif
a08450
a08450
# Analog of the core subpackage's files:
a08450
%{_bindir}/python%{LDVERSION_debug}
a08450
a08450
# Analog of the -libs subpackage's files:
a08450
# ...with debug builds of the built-in "extension" modules:
a08450
a08450
%{dynload_dir}/_blake2.%{SOABI_debug}.so
a08450
a08450
%{dynload_dir}/_asyncio.%{SOABI_debug}.so
a08450
%{dynload_dir}/_bisect.%{SOABI_debug}.so
a08450
%{dynload_dir}/_bz2.%{SOABI_debug}.so
a08450
%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so
a08450
%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so
a08450
%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so
a08450
%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so
a08450
%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so
a08450
%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so
a08450
%{dynload_dir}/_contextvars.%{SOABI_debug}.so
a08450
%{dynload_dir}/_crypt.%{SOABI_debug}.so
a08450
%{dynload_dir}/_csv.%{SOABI_debug}.so
a08450
%{dynload_dir}/_ctypes.%{SOABI_debug}.so
a08450
%{dynload_dir}/_curses.%{SOABI_debug}.so
a08450
%{dynload_dir}/_curses_panel.%{SOABI_debug}.so
a08450
%{dynload_dir}/_dbm.%{SOABI_debug}.so
a08450
%{dynload_dir}/_decimal.%{SOABI_debug}.so
a08450
%{dynload_dir}/_elementtree.%{SOABI_debug}.so
a08450
%if %{with gdbm}
a08450
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
a08450
%endif
a08450
%{dynload_dir}/_hashlib.%{SOABI_debug}.so
a08450
%{dynload_dir}/_heapq.%{SOABI_debug}.so
a08450
%{dynload_dir}/_json.%{SOABI_debug}.so
a08450
%{dynload_dir}/_lsprof.%{SOABI_debug}.so
a08450
%{dynload_dir}/_lzma.%{SOABI_debug}.so
a08450
%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so
a08450
%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so
a08450
%{dynload_dir}/_opcode.%{SOABI_debug}.so
a08450
%{dynload_dir}/_pickle.%{SOABI_debug}.so
a08450
%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so
a08450
%{dynload_dir}/_queue.%{SOABI_debug}.so
a08450
%{dynload_dir}/_random.%{SOABI_debug}.so
a08450
%{dynload_dir}/_socket.%{SOABI_debug}.so
a08450
%{dynload_dir}/_sqlite3.%{SOABI_debug}.so
a08450
%{dynload_dir}/_ssl.%{SOABI_debug}.so
a08450
%{dynload_dir}/_statistics.%{SOABI_debug}.so
a08450
%{dynload_dir}/_struct.%{SOABI_debug}.so
a08450
%{dynload_dir}/array.%{SOABI_debug}.so
a08450
%{dynload_dir}/audioop.%{SOABI_debug}.so
a08450
%{dynload_dir}/binascii.%{SOABI_debug}.so
a08450
%{dynload_dir}/cmath.%{SOABI_debug}.so
a08450
%{dynload_dir}/_datetime.%{SOABI_debug}.so
a08450
%{dynload_dir}/fcntl.%{SOABI_debug}.so
a08450
%{dynload_dir}/grp.%{SOABI_debug}.so
a08450
%{dynload_dir}/math.%{SOABI_debug}.so
a08450
%{dynload_dir}/mmap.%{SOABI_debug}.so
a08450
%if %{with nis}
a08450
%{dynload_dir}/nis.%{SOABI_debug}.so
a08450
%endif
a08450
%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
a08450
%{dynload_dir}/parser.%{SOABI_debug}.so
a08450
%{dynload_dir}/_posixshmem.%{SOABI_debug}.so
a08450
%{dynload_dir}/pyexpat.%{SOABI_debug}.so
a08450
%{dynload_dir}/readline.%{SOABI_debug}.so
a08450
%{dynload_dir}/resource.%{SOABI_debug}.so
a08450
%{dynload_dir}/select.%{SOABI_debug}.so
a08450
%{dynload_dir}/spwd.%{SOABI_debug}.so
a08450
%{dynload_dir}/syslog.%{SOABI_debug}.so
a08450
%{dynload_dir}/termios.%{SOABI_debug}.so
a08450
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
a08450
%{dynload_dir}/_uuid.%{SOABI_debug}.so
a08450
%{dynload_dir}/_xxsubinterpreters.%{SOABI_debug}.so
a08450
%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so
a08450
%{dynload_dir}/zlib.%{SOABI_debug}.so
a08450
%{dynload_dir}/_zoneinfo.%{SOABI_debug}.so
a08450
a08450
# No need to split things out the "Makefile" and the config-32/64.h file as we
a08450
# do for the regular build above (bug 531901), since they're all in one package
a08450
# now; they're listed below, under "-devel":
a08450
a08450
%{_libdir}/%{py_INSTSONAME_debug}
a08450
a08450
# Analog of the -devel subpackage's files:
a08450
%{pylibdir}/config-%{LDVERSION_debug}-%{platform_triplet}
a08450
%{_includedir}/python%{LDVERSION_debug}
a08450
%{_bindir}/python%{LDVERSION_debug}-config
a08450
%{_bindir}/python%{LDVERSION_debug}-*-config
a08450
%{_libdir}/libpython%{LDVERSION_debug}.so
a08450
%{_libdir}/libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
a08450
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
a08450
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}-embed.pc
a08450
a08450
%if %{with rhel8_compat_shims}
a08450
%{_libexecdir}/platform-python-debug
a08450
%{_libexecdir}/platform-python%{LDVERSION_debug}
a08450
%{_libexecdir}/platform-python%{LDVERSION_debug}-config
a08450
%{_libexecdir}/platform-python%{LDVERSION_debug}-*-config
a08450
%endif
a08450
a08450
# Analog of the -tools subpackage's files:
a08450
#  None for now; we could build precanned versions that have the appropriate
a08450
# shebang if needed
a08450
a08450
# Analog  of the tkinter subpackage's files:
a08450
%{dynload_dir}/_tkinter.%{SOABI_debug}.so
a08450
a08450
# Analog  of the -test subpackage's files:
a08450
%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
a08450
%{dynload_dir}/_testbuffer.%{SOABI_debug}.so
a08450
%{dynload_dir}/_testcapi.%{SOABI_debug}.so
a08450
%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so
a08450
%{dynload_dir}/_testinternalcapi.%{SOABI_debug}.so
a08450
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
a08450
a08450
%endif # with debug_build
a08450
a08450
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from ldconfig
a08450
# See https://bugzilla.redhat.com/show_bug.cgi?id=562980
a08450
#
a08450
# The /usr/lib/rpm/redhat/macros defines %%__debug_package to use
a08450
# debugfiles.list, and it appears that everything below /usr/lib/debug and
a08450
# (/usr/src/debug) gets added to this file (via LISTFILES) in
a08450
# /usr/lib/rpm/find-debuginfo.sh
a08450
#
a08450
# Hence by installing it below /usr/lib/debug we ensure it is added to the
a08450
# -debuginfo subpackage
a08450
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py
a08450
# payload file would be unpackaged)
a08450
a08450
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1476593
a08450
%undefine _debuginfo_subpackages
a08450
a08450
# ======================================================
a08450
# Finally, the changelog:
a08450
# ======================================================
a08450
a08450
%changelog
6bc0c3
* Mon Jan 09 2023 Charalampos Stratakis <cstratak@redhat.com> - 3.9.14-1.2
6bc0c3
- Security fix for CVE-2022-45061
6bc0c3
Resolves: rhbz#2144072
6bc0c3
bbebd1
* Mon Nov 07 2022 Lumír Balhar <lbalhar@redhat.com> - 3.9.14-1.1
bbebd1
- Fix for CVE-2022-42919
bbebd1
Resolves: rhbz#2138705
bbebd1
e8a926
* Wed Sep 21 2022 Charalampos Stratakis <cstratak@redhat.com> - 3.9.14-1
e8a926
- Update to 3.9.14
e8a926
- Security fixes for CVE-2020-10735 and CVE-2021-28861
e8a926
Resolves: rhbz#2120642, rhbz#1834423, rhbz#2128249
e8a926
e8a926
* Mon Jul 25 2022 Lumír Balhar <lbalhar@redhat.com> - 3.9.13-3
e8a926
- Fix test_get_ciphers in test_ssl.py for FIPS mode
e8a926
Resolves: rhbz#2058233
e8a926
e8a926
* Thu Jun 09 2022 Charalampos Stratakis <cstratak@redhat.com> - 3.9.13-2
e8a926
- Security fix for CVE-2015-20107
e8a926
Resolves: rhbz#2075390
e8a926
e8a926
* Wed Jun 01 2022 Charalampos Stratakis <cstratak@redhat.com> - 3.9.13-1
e8a926
- Update to 3.9.13
e8a926
Resolves: rhbz#2054702, rhbz#2059951
bb807a
a08450
* Wed Feb 09 2022 Charalampos Stratakis <cstratak@redhat.com> - 3.9.10-2
a08450
- Fix undefined behavior in Modules/_hashopenssl.c
a08450
Resolves: rhbz#1942527
a08450
a08450
* Mon Jan 17 2022 Charalampos Stratakis <cstratak@redhat.com> - 3.9.10-1
a08450
- Update to 3.9.10
a08450
- Support OpenSSL FIPS mode
a08450
Resolves: rhbz#1942527, rhbz#1835169
a08450
a08450
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 3.9.9-4
a08450
- Instruct pip to use distutils
a08450
- Instruct pypa/distutils to add /local/ addition to prefix
a08450
a08450
* Mon Nov 22 2021 Tomas Orsava <torsava@redhat.com> - 3.9.9-2
a08450
- Read pre-packaged Python wheels from a newly versioned directory
a08450
  /usr/share/python3-wheels
a08450
- Resolves: rhbz#1982668
a08450
a08450
* Tue Nov 16 2021 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.9.9-1
a08450
- Update to 3.9.9
a08450
Resolves: rhbz#2024322
a08450
a08450
* Mon Nov 08 2021 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.9.8-1
a08450
- Update to 3.9.8
a08450
Resolves: rhbz#2003759
a08450
a08450
* Thu Sep 09 2021 Miro Hrončok <mhroncok@redhat.com> - 3.9.7-1
a08450
- Update to 3.9.7
a08450
Resolves: rhbz#1995162
a08450
a08450
* Fri Sep 03 2021 Charalampos Stratakis <cstratak@redhat.com> - 3.9.6-7
a08450
- Add preliminary FIPS mode patch
a08450
Related: rhbz#1942527
a08450
a08450
* Thu Aug 19 2021 DJ Delorie <dj@redhat.com> - 3.9.6-6
a08450
- Rebuilt for libffi 3.4.2 SONAME transition.
a08450
  Related: rhbz#1891914
a08450
a08450
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com>
a08450
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
a08450
  Related: rhbz#1991688
a08450
a08450
* Fri Aug  6 2021 Florian Weimer <fweimer@redhat.com> - 3.9.6-4
a08450
- Rebuild to pick up new build flags from redhat-rpm-config (#1984652)
a08450
a08450
* Thu Jul 29 2021 Charalampos Stratakis <cstratak@redhat.com> - 3.9.6-3
a08450
- Build only blake2 from the internal hash implementations and use md5,
a08450
  sha1, sha256, sha512 and sha3 from OpenSSL
a08450
Related: rhbz#1935437, rhbz#1942527
a08450
a08450
* Wed Jul 28 2021 Florian Weimer <fweimer@redhat.com> - 3.9.6-2
a08450
- Rebuild to pick up OpenSSL 3.0 Beta ABI (#1984097)
a08450
a08450
* Tue Jun 29 2021 Tomas Hrnciar <thrnciar@redhat.com> - 3.9.6-1
a08450
- Update to 3.9.6
a08450
Related: rhbz#1950291
a08450
a08450
* Tue Jun 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.9.5-6
a08450
- Rebuilt for RHEL 9 BETA for openssl 3.0
a08450
  Related: rhbz#1971065
a08450
a08450
* Wed Jun 09 2021 Charalampos Stratakis <cstratak@redhat.com> - 3.9.5-5
a08450
- Add virtual provides for the bundled libmpdec
a08450
a08450
* Thu Jun 03 2021 Charalampos Stratakis <cstratak@redhat.com> - 3.9.5-4
a08450
- Stop Recommending setuptools and move the pip Recommendation to python3-devel
a08450
Resolves: rhbz#1947857
a08450
a08450
* Tue May 04 2021 Tomas Hrnciar <thrnciar@redhat.com> - 3.9.5-1
a08450
- Update to 3.9.5
a08450
a08450
* Fri Apr 16 2021 Lumír Balhar <lbalhar@redhat.com> - 3.9.4-1
a08450
- Update to 3.9.4
a08450
  Related: rhbz#1950291
a08450
a08450
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com>
a08450
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
a08450
a08450
* Wed Apr 07 2021 Petr Viktorin <pviktori@redhat.com> - 3.9.2-2
a08450
- On RHEL 9+, build without the legacy nis module
a08450
  Resolves: RHBZ#1942376
a08450
a08450
* Sat Feb 20 2021 Miro Hrončok <mhroncok@redhat.com> - 3.9.2-1
a08450
- Update to 3.9.2
a08450
a08450
* Thu Feb 18 2021 Tomas Hrnciar <thrnciar@redhat.com> - 3.9.2~rc1-1
a08450
- Update to 3.9.2rc1
a08450
a08450
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.1-5
a08450
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a08450
a08450
* Mon Jan 25 2021 Miro Hrončok <mhroncok@redhat.com> - 3.9.1-4
a08450
- Rebuilt to be signed with Fedora 32 compatible signature,
a08450
  to fix mock bootstrap chroot on Fedora 32 (and possibly EPELs)
a08450
  https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/OBEFWGCFXHE4EDBXFBZWDUPAJJS7QZAR/
a08450
a08450
* Wed Jan 20 2021 Charalampos Stratakis <cstratak@redhat.com> - 3.9.1-3
a08450
- Compile the debug build with -O0 instead of -Og (rhbz#1818857)
a08450
a08450
* Wed Jan 20 2021 Miro Hrončok <mhroncok@redhat.com> - 3.9.1-2
a08450
- Security fix for CVE-2021-3177
a08450
a08450
* Tue Dec 08 2020 Tomas Hrnciar <thrnciar@redhat.com> - 3.9.1-1
a08450
- Update to 3.9.1
a08450
a08450
* Fri Nov 27 2020 Tomas Hrnciar <thrnciar@redhat.com> - 3.9.1~rc1-1
a08450
- Update to 3.9.1rc1
a08450
a08450
* Tue Oct 06 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0-1
a08450
- Update to 3.9.0 final
a08450
a08450
* Fri Sep 25 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~rc2-2
a08450
- Use upstream architecture names on Fedora 34+
a08450
- https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
a08450
a08450
* Thu Sep 17 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~rc2-1
a08450
- Update to 3.9.0rc2
a08450
a08450
* Wed Aug 12 2020 Petr Viktorin <pviktori@redhat.com> - 3.9.0~rc1-2
a08450
- In sys.version and initial REPL message, list the source commit as "default"
a08450
a08450
* Tue Aug 11 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~rc1-1
a08450
- Update to 3.9.0rc1
a08450
a08450
* Mon Aug 03 2020 Lumír Balhar <lbalhar@redhat.com> - 3.9.0~b5-5
a08450
- Add support for upstream architectures' names (patch 353)
a08450
a08450
* Thu Jul 30 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~b5-4
a08450
- Make python3-libs installable without python3
a08450
  Resolves: rhbz#1862082
a08450
a08450
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.0~b5-3
a08450
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a08450
a08450
* Fri Jul 24 2020 Lumír Balhar <lbalhar@redhat.com> - 3.9.0~b5-2
a08450
- Add versioned pathfix%%{pybasever}.py to main and non-main RPMs
a08450
a08450
* Mon Jul 20 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~b5-1
a08450
- Update to 3.9.0b5
a08450
a08450
* Thu Jul 16 2020 Marcel Plch <mplch@redhat.com> - 3.9.0~b4-2
a08450
- Remove large, autogenerated Python sources and redundant pycache levels to reduce filesystem footprint
a08450
a08450
* Sat Jul 04 2020 Tomas Hrnciar <thrnciar@redhat.com> - 3.9.0~b4-1
a08450
- Update to 3.9.0b4
a08450
a08450
* Wed Jun 10 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~b3-1
a08450
- Update to 3.9.0b3
a08450
a08450
* Tue Jun 09 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~b2-1
a08450
- Update to 3.9.0b2
a08450
a08450
* Fri May 29 2020 Petr Viktorin <pviktori@redhat.com> - 3.9.0~b1-4
a08450
- Add cherry-picks for bugs found in 3.9.0b1
a08450
a08450
* Thu May 21 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~b1-3
a08450
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python3.9
a08450
a08450
* Thu May 21 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~b1-2
a08450
- Bootstrap for https://fedoraproject.org/wiki/Changes/Python3.9
a08450
a08450
* Tue May 19 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~b1-1
a08450
- Update to Python 3.9.0b1
a08450
a08450
* Thu May 07 2020 Tomas Orsava <torsava@redhat.com> - 3.9.0~a6-2
a08450
- Rename from python39 to python3.9
a08450
a08450
* Tue Apr 28 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~a6-1
a08450
- Update to Python 3.9.0a6
a08450
a08450
* Tue Mar 24 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~a5-1
a08450
- Update to Python 3.9.0a5
a08450
a08450
* Thu Feb 27 2020 Marcel Plch <mplch@redhat.com> - 3.9.0~a4-1
a08450
- Update to Python 3.9.0a4
a08450
a08450
* Tue Feb 11 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~a3-2
a08450
- Update the ensurepip module to work with setuptools >= 45
a08450
a08450
* Mon Jan 27 2020 Victor Stinner <vstinner@python.org> - 3.9.0~a3-1
a08450
- Update to Python 3.9.0a3
a08450
a08450
* Thu Dec 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~a2-1
a08450
- Rebased to Python 3.9.0a2
a08450
a08450
* Wed Dec 04 2019 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~a1-3
a08450
- Build Python with -fno-semantic-interposition for better performance
a08450
- https://fedoraproject.org/wiki/Changes/PythonNoSemanticInterpositionSpeedup
a08450
a08450
* Thu Nov 28 2019 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~a1-2
a08450
- Don't remove the test.test_tools module
a08450
a08450
* Wed Nov 20 2019 Miro Hrončok <mhroncok@redhat.com> - 3.9.0~a1-1
a08450
- Rebased to Python 3.9.0a1
a08450
a08450
* Mon Oct 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0-1
a08450
- Update to Python 3.8.0 final
a08450
a08450
* Tue Oct 01 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~rc1-1
a08450
- Rebased to Python 3.8.0rc1
a08450
a08450
* Sat Aug 31 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~b4-1
a08450
- Rebased to Python 3.8.0b4
a08450
- Enable Profile-guided optimization for all arches, not just x86 (#1741015)
a08450
a08450
* Mon Jul 29 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~b3-1
a08450
- Update to 3.8.0b3
a08450
a08450
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.0~b2-2
a08450
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a08450
a08450
* Fri Jul 05 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~b2-1
a08450
- Update to 3.8.0b2
a08450
a08450
* Wed Jun 05 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~b1-1
a08450
- Update to 3.8.0b1
a08450
a08450
* Fri May 17 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~a4-2
a08450
- Remove a faulty patch that resulted in invalid value of
a08450
  distutils.sysconfig.get_config_var('LIBPL') (#1710767)
a08450
a08450
* Tue May 07 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~a4-1
a08450
- Update to 3.8.0a4
a08450
a08450
* Tue Mar 26 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~a3-1
a08450
- Update to 3.8.0a3
a08450
a08450
* Mon Feb 25 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~a2-1
a08450
- Update to 3.8.0a2
a08450
a08450
* Mon Feb 18 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~a1-3
a08450
- Reduced default build flags used to build extension modules
a08450
  https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
a08450
a08450
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.8.0~a1-2
a08450
- Rebuild for readline 8.0
a08450
a08450
* Tue Feb 05 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0~a1-1
a08450
- Update to 3.8.0a1