Blame SPECS/python39.spec

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