churchyard / rpms / python3

Forked from rpms/python3 3 years ago
Clone

Blame python3.spec

043c574
# ==================
043c574
# Top-level metadata
043c574
# ==================
043c574
d668c1e
%global pybasever 3.7
c769a6b
043c574
# pybasever without the dot:
d668c1e
%global pyshortver 37
043c574
8c67baf
Name: python3
8c67baf
Summary: Interpreter of the Python programming language
8c67baf
URL: https://www.python.org/
8c67baf
b7855d3
#  WARNING  When rebasing to a new Python version,
b7855d3
#           remember to update the python3-docs package as well
bc74407
%global general_version %{pybasever}.9
0e5699c
#global prerel rc1
45a4368
%global upstream_version %{general_version}%{?prerel}
45a4368
Version: %{general_version}%{?prerel:~%{prerel}}
704d298
Release: 3%{?dist}
043c574
License: Python
043c574
043c574
043c574
# ==================================
043c574
# Conditionals controlling the build
043c574
# ==================================
043c574
043c574
# Note that the bcond macros are named for the CLI option they create.
043c574
# "%%bcond_without" means "ENABLE by default and create a --without option"
043c574
63459d7
8c67baf
# Flat package, i.e. python36, python37, python38 for tox etc.
8c67baf
# warning: changes some other defaults
8c67baf
# in Fedora, never turn this on for the python3 package
63459d7
# and always keep it on for python37 etc.
8c67baf
# WARNING: This does not change the package name and summary above
8c67baf
%bcond_with flatpackage
8c67baf
0b241ab
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
0b241ab
# Uses upstream bundled prebuilt wheels otherwise
0b241ab
%bcond_without rpmwheels
8c67baf
f63e273
# Expensive optimizations (mainly, profile-guided optimizations)
a7a170b
%ifarch %{ix86} x86_64
3ba1d1a
%bcond_without optimizations
a7a170b
%else
f63e273
# On some architectures, the optimized build takes tens of hours, possibly
f63e273
# longer than Koji's 24-hour timeout. Disable optimizations here.
a7a170b
%bcond_with optimizations
a7a170b
%endif
a7a170b
f63e273
# Run the test suite in %%check
3ba1d1a
%bcond_without tests
f63e273
f63e273
# Extra build for debugging the interpreter or C-API extensions
f63e273
# (the -debug subpackages)
8c67baf
%if %{with flatpackage}
8c67baf
%bcond_with debug_build
8c67baf
%else
043c574
%bcond_without debug_build
8c67baf
%endif
f63e273
f63e273
# Support for the GDB debugger
043c574
%bcond_without gdb_hooks
f63e273
f63e273
# The dbm.gnu module (key-value database)
043c574
%bcond_without gdbm
f63e273
f63e273
# Main interpreter loop optimization
043c574
%bcond_without computed_gotos
043c574
f63e273
# Support for the Valgrind debugger/profiler
a64e7f7
%ifarch %{valgrind_arches}
043c574
%bcond_without valgrind
043c574
%else
043c574
%bcond_with valgrind
043c574
%endif
043c574
704d298
# https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
704d298
# For a very long time we have converted "upstream architecture names" to "Fedora names".
704d298
# This made sense at the time, see https://github.com/pypa/manylinux/issues/687#issuecomment-666362947
704d298
# However, with manylinux wheels popularity growth, this is now a problem.
704d298
# Wheels built on a Linux that doesn't do this were not compatible with ours and vice versa.
704d298
# We now have a compatibility layer to workaround a problem,
704d298
# but we also no longer use the legacy arch names in Fedora 34+.
704d298
# This bcond controls the behavior. The defaults should be good for anybody.
704d298
%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9
704d298
%bcond_with legacy_archnames
704d298
%else
704d298
%bcond_without legacy_archnames
704d298
%endif
043c574
d90f987
# Notes from bootstraping Python 3.7:
d90f987
# https://fedoraproject.org/wiki/SIGs/Python/UpgradingPython
Matej Stuchlik 95668bd
Matej Stuchlik 11fb599
043c574
# =====================
043c574
# General global macros
043c574
# =====================
5080ffc
a3483f9
%global pylibdir %{_libdir}/python%{pybasever}
4aab458
%global dynload_dir %{pylibdir}/lib-dynload
a3483f9
0c74e11
# ABIFLAGS, LDVERSION and SOABI are in the upstream configure.ac
0c74e11
# See PEP 3149 for some background: http://www.python.org/dev/peps/pep-3149/
1c94c1a
%global ABIFLAGS_optimized m
1c94c1a
%global ABIFLAGS_debug     dm
5080ffc
5080ffc
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
5080ffc
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
5080ffc
704d298
# When we use the upstream arch triplets, we convert them from the legacy ones
704d298
# This is reversed in prep when %%with legacy_archnames, so we keep both macros
704d298
%global platform_triplet_legacy %{_arch}-linux%{_gnu}
704d298
%global platform_triplet_upstream %{expand:%(echo %{platform_triplet_legacy} | sed -E \\
704d298
    -e 's/^arm(eb)?-linux-gnueabi$/arm\\1-linux-gnueabihf/' \\
704d298
    -e 's/^mips64(el)?-linux-gnu$/mips64\\1-linux-gnuabi64/' \\
704d298
    -e 's/^ppc(64)?(le)?-linux-gnu$/powerpc\\1\\2-linux-gnu/')}
704d298
%if %{with legacy_archnames}
704d298
%global platform_triplet %{platform_triplet_legacy}
704d298
%else
704d298
%global platform_triplet %{platform_triplet_upstream}
704d298
%endif
704d298
704d298
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{platform_triplet}
704d298
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{platform_triplet}
5080ffc
0c74e11
# All bytecode files are in a __pycache__ subdirectory, with a name
0c74e11
# reflecting the version of the bytecode.
0c74e11
# See PEP 3147: http://www.python.org/dev/peps/pep-3147/
7eb10c8
# For example,
7eb10c8
#   foo/bar.py
0c74e11
# has bytecode at:
043c574
#   foo/__pycache__/bar.cpython-%%{pyshortver}.pyc
043c574
#   foo/__pycache__/bar.cpython-%%{pyshortver}.opt-1.pyc
3bbc2a0
#   foo/__pycache__/bar.cpython-%%{pyshortver}.opt-2.pyc
043c574
%global bytecode_suffixes .cpython-%{pyshortver}*.pyc
7eb10c8
d5a5bf3
# Python's configure script defines SOVERSION, and this is used in the Makefile
d5a5bf3
# to determine INSTSONAME, the name of the libpython DSO:
d5a5bf3
#   LDLIBRARY='libpython$(VERSION).so'
d5a5bf3
#   INSTSONAME="$LDLIBRARY".$SOVERSION
d5a5bf3
# We mirror this here in order to make it easier to add the -gdb.py hooks.
d5a5bf3
# (if these get out of sync, the payload of the libs subpackage will fail
d5a5bf3
# and halt the build)
d5a5bf3
%global py_SOVERSION 1.0
5080ffc
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
5080ffc
%global py_INSTSONAME_debug     libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
d5a5bf3
1824b3e
# Disable automatic bytecompilation. The python3 binary is not yet be
1824b3e
# available in /usr/bin when Python is built. Also, the bytecompilation fails
1824b3e
# on files that test invalid syntax.
1824b3e
%undefine py_auto_byte_compile
7eb10c8
9f5808c
# Don't let RPM set SOURCE_DATE_EPOCH based on the latest %%changelog date
9f5808c
# It breaks tests with: can't find '__main__' module in .../test_zip.zip
9f5808c
# Reported at https://bugs.python.org/issue34022
9f5808c
# Tracked at https://bugzilla.redhat.com/show_bug.cgi?id=1724753
9f5808c
%global source_date_epoch_from_changelog 0
9f5808c
64593af
c769a6b
# =======================
c769a6b
# Build-time requirements
c769a6b
# =======================
c769a6b
c769a6b
# (keep this list alphabetized)
c769a6b
c769a6b
BuildRequires: autoconf
81ac8c8
BuildRequires: bluez-libs-devel
c769a6b
BuildRequires: bzip2
c769a6b
BuildRequires: bzip2-devel
66c621f
BuildRequires: desktop-file-utils
33e1101
BuildRequires: expat-devel
5974f19
c769a6b
BuildRequires: findutils
c769a6b
BuildRequires: gcc-c++
043c574
%if %{with gdbm}
75005c2
BuildRequires: gdbm-devel
5fe31d8
%endif
4d8d4c0
BuildRequires: git-core
7be8eeb
BuildRequires: glibc-all-langpacks
c769a6b
BuildRequires: glibc-devel
c769a6b
BuildRequires: gmp-devel
2ef8434
BuildRequires: gnupg2
66c621f
BuildRequires: libappstream-glib
c769a6b
BuildRequires: libffi-devel
6ff303e
BuildRequires: libnsl2-devel
6ff303e
BuildRequires: libtirpc-devel
c769a6b
BuildRequires: libGL-devel
d668c1e
BuildRequires: libuuid-devel
c769a6b
BuildRequires: libX11-devel
c769a6b
BuildRequires: ncurses-devel
66c621f
c769a6b
BuildRequires: openssl-devel
c769a6b
BuildRequires: pkgconfig
c769a6b
BuildRequires: readline-devel
8927d3f
BuildRequires: redhat-rpm-config >= 127
c769a6b
BuildRequires: sqlite-devel
47069ff
BuildRequires: gdb
c769a6b
c769a6b
BuildRequires: tar
c769a6b
BuildRequires: tcl-devel
c769a6b
BuildRequires: tix-devel
c769a6b
BuildRequires: tk-devel
c769a6b
043c574
%if %{with valgrind}
c769a6b
BuildRequires: valgrind-devel
c769a6b
%endif
c769a6b
f2b86e2
BuildRequires: xz-devel
c769a6b
BuildRequires: zlib-devel
c769a6b
51501f9
BuildRequires: /usr/bin/dtrace
51501f9
5f24f39
# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig)
5f24f39
BuildRequires: /usr/sbin/ifconfig
5f24f39
f7475de
# For %%python_provide
f7475de
BuildRequires: python-rpm-macros
f7475de
0b241ab
%if %{with rpmwheels}
0b241ab
BuildRequires: python-setuptools-wheel
0b241ab
BuildRequires: python-pip-wheel
Matej Stuchlik 11fb599
%endif
Matej Stuchlik 11fb599
c769a6b
c769a6b
# =======================
c769a6b
# Source code and patches
c769a6b
# =======================
c769a6b
2ef8434
Source0: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz
2ef8434
Source1: %{url}ftp/python/%{general_version}/Python-%{upstream_version}.tar.xz.asc
2ef8434
Source2: %{url}static/files/pubkeys.txt
4aab458
3dbbc14
# A simple script to check timestamps of bytecode files
3dbbc14
# Run in check section with Python that is currently being built
37056bc
# Originally written by bkabrda
37056bc
Source8: check-pyc-timestamps.py
71040c9
860f392
# Desktop menu entry for idle3
860f392
Source10: idle3.desktop
860f392
860f392
# AppData file for idle3
860f392
Source11: idle3.appdata.xml
860f392
bae5e50
# (Patches taken from github.com/fedora-python/cpython)
bae5e50
bae5e50
# 00001 # d06a8853cf4bae9e115f45e1d531d2dc152c5cc8
bae5e50
# Fixup distutils/unixccompiler.py to remove standard library path from rpath
bae5e50
# Was Patch0 in ivazquez' python3000 specfile
bae5e50
Patch1: 00001-rpath.patch
bae5e50
bae5e50
# 00102 # f6d9f3a37ec3401472cb317d1e6cf3433c6016e2
bae5e50
# Change the various install paths to use /usr/lib64/ instead or /usr/lib/
bae5e50
#
bae5e50
# Only used when "%%{_lib}" == "lib64".
2c6abcc
Patch102: 00102-lib64.patch
c923b51
bae5e50
# 00111 # 8a4a8dc638552be9ef2732dbc08b59b19c72ce05
bae5e50
# Don't try to build a libpythonMAJOR.MINOR.a
bae5e50
#
bae5e50
# Downstream only: not appropriate for upstream.
bae5e50
#
c4a5733
# See https://bugzilla.redhat.com/show_bug.cgi?id=556092
c923b51
Patch111: 00111-no-static-lib.patch
c923b51
bae5e50
# 00155 # 0ef7ae83073c1bbe610d4678ed56ae775fd6e174
bae5e50
# avoid allocating thunks in ctypes unless absolutely necessary
bae5e50
#
8a28107
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
8a28107
# generating SELinux denials on "import ctypes" and "import uuid" when
c4a5733
# embedding Python within httpd
c4a5733
# See https://bugzilla.redhat.com/show_bug.cgi?id=814391
8a28107
Patch155: 00155-avoid-ctypes-thunks.patch
8a28107
bae5e50
# 00170 # f9c8195c1902ea9a05a40bbdc64dd307fb2dc893
bae5e50
# In debug builds, try to print repr() when a C-level assert fails
bae5e50
#
Robert Kuska a0e3ab8
# In debug builds, try to print repr() when a C-level assert fails in the
Robert Kuska a0e3ab8
# garbage collector (typically indicating a reference-counting error
Robert Kuska a0e3ab8
# somewhere else e.g in an extension module)
720c2ad
# The new macros/functions within gcmodule.c are hidden to avoid exposing
Robert Kuska a0e3ab8
# them within the extension API.
720c2ad
# Sent upstream: http://bugs.python.org/issue9263
720c2ad
# See https://bugzilla.redhat.com/show_bug.cgi?id=614680
Robert Kuska 86a9a20
Patch170: 00170-gc-assertions.patch
260ceea
bae5e50
# 00189 # 61e5557061c11cbae30cbd9114bd551a339f7a43
bae5e50
# Instead of bundled wheels, use our RPM packaged wheels
bae5e50
#
bae5e50
# We keep them in /usr/share/python-wheels
0b241ab
Patch189: 00189-use-rpm-wheels.patch
194da16
# The following versions of setuptools/pip are bundled when this patch is not applied.
194da16
# The versions are written in Lib/ensurepip/__init__.py, this patch removes them.
194da16
# When the bundled setuptools/pip wheel is updated, the patch no longer applies cleanly.
194da16
# In such cases, the patch needs to be amended and the versions updated here:
194da16
%global pip_version 20.1.1
194da16
%global setuptools_version 47.1.0
486eb43
bae5e50
# 00251 # 2eabd04356402d488060bc8fe316ad13fc8a3356
bae5e50
# Change user install location
bae5e50
#
332b947
# Set values of prefix and exec_prefix in distutils install command
332b947
# to /usr/local if executable is /usr/bin/python* and RPM build
bae5e50
# is not detected to make pip and distutils install into separate location.
bae5e50
#
46034c8
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
332b947
Patch251: 00251-change-user-install-location.patch
332b947
bae5e50
# 00316 # 4fd732b55b7d8a38c25aef566884665ce925eacb
bae5e50
# Mark bdist_wininst unsupported
bae5e50
#
15d5b5c
# We remove the exe files from distutil's bdist_wininst
15d5b5c
# So we mark the command as unsupported - and the tests are skipped
15d5b5c
Patch316: 00316-mark-bdist_wininst-unsupported.patch
15d5b5c
bae5e50
# 00328 # 367fdcb5a075f083aea83ac174999272a8faf75c
bae5e50
# Restore pyc to TIMESTAMP invalidation mode as default in rpmbuild
bae5e50
#
bae5e50
# Since Fedora 31, the $SOURCE_DATE_EPOCH is set in rpmbuild to the latest
bae5e50
# %%changelog date. This makes Python default to the CHECKED_HASH pyc
bae5e50
# invalidation mode, bringing more reproducible builds traded for an import
bae5e50
# performance decrease. To avoid that, we don't default to CHECKED_HASH
bae5e50
# when $RPM_BUILD_ROOT is set (i.e. when we are building RPM packages).
ec995d8
Patch328: 00328-pyc-timestamp-invalidation-mode.patch
ec995d8
bae5e50
# 00335 # 781e29b0cd6f3527afe7c6aee19672f1f1292121
bae5e50
# Backport pathfix change
bae5e50
#
9cf4138
# Tools/scripts/pathfix.py backports
9cf4138
# Add -k and -a command line options to preserve and add shebang flags
9cf4138
# In upstream since 3.8: https://bugs.python.org/issue37064
9cf4138
# Assume all .py files are Python scripts when working recursively:
9cf4138
# In upstream since 3.8: https://bugs.python.org/issue38347
9cf4138
Patch335: 00335-backport-pathfix-change.patch
9cf4138
704d298
# 00353 # ab4cc97b643cfe99f567e3a03e5617b507183771
3a42baf
# Original names for architectures with different names downstream
3a42baf
#
704d298
# https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
704d298
#
704d298
# Pythons in RHEL/Fedora used different names for some architectures
3a42baf
# than upstream and other distros (for example ppc64 vs. powerpc64).
704d298
# This was patched in patch 274, now it is sedded if %%with legacy_archnames.
704d298
#
704d298
# That meant that an extension built with the default upstream settings
704d298
# (on other distro or as an manylinux wheel) could not been found by Python
704d298
# on RHEL/Fedora because it had a different suffix.
704d298
# This patch adds the legacy names to importlib so Python is able
704d298
# to import extensions with a legacy architecture name in its
3a42baf
# file name.
704d298
# It work both ways, so it support both %%with and %%without legacy_archnames.
3a42baf
#
3a42baf
# WARNING: This patch has no effect on Python built with bootstrap
3a42baf
# enabled because Python/importlib_external.h is not regenerated
3a42baf
# and therefore Python during bootstrap contains importlib from
3a42baf
# upstream without this feature. It's possible to include
3a42baf
# Python/importlib_external.h to this patch but it'd make rebasing
3a42baf
# a nightmare because it's basically a binary file.
704d298
Patch353: 00353-architecture-names-upstream-downstream.patch
3a42baf
99ac2fc
# (New patches go here ^^^)
99ac2fc
#
77a5f91
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
77a5f91
# please try to keep the patch numbers in-sync between all specfiles.
99ac2fc
#
77a5f91
# More information, and a patch number catalog, is at:
99ac2fc
#
77a5f91
#     https://fedoraproject.org/wiki/SIGs/Python/PythonPatches
77a5f91
c969609
094ccc0
# ==========================================
094ccc0
# Descriptions, and metadata for subpackages
094ccc0
# ==========================================
a3483f9
75005c2
# People might want to dnf install pythonX.Y instead of pythonXY;
75005c2
# we enable this in both flat and nonflat package.
75005c2
Provides: python%{pybasever} = %{version}-%{release}
75005c2
8c67baf
%if %{without flatpackage}
8c67baf
094ccc0
# Packages with Python modules in standard locations automatically
094ccc0
# depend on python(abi). Provide that here.
a3483f9
Provides: python(abi) = %{pybasever}
a3483f9
26c1be5
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
26c1be5
f50a7d3
# In order to support multiple Python interpreters for development purposes,
8c67baf
# packages with the naming scheme flatpackage (e.g. python35) exist for
f50a7d3
# non-default versions of Python 3.
f50a7d3
# For consistency, and to keep the upgrade path clean, we Provide/Obsolete
f50a7d3
# these names here.
1768987
Provides: python%{pyshortver} = %{version}-%{release}
f50a7d3
# Note that using Obsoletes without package version is not standard practice.
f50a7d3
# Here we assert that *any* version of the system's default interpreter is
f50a7d3
# preferable to an "extra" interpreter. For example, python3-3.6.1 will
f50a7d3
# replace python36-3.6.2.
f50a7d3
Obsoletes: python%{pyshortver}
1768987
337d334
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
337d334
# https://fedoraproject.org/wiki/Changes/Python_means_Python3
337d334
# We recommend /usr/bin/python so users get it by default
337d334
# Versioned recommends are problematic, and we know that the package requires
337d334
# python3 back with fixed version, so we just use the path here:
337d334
Recommends: %{_bindir}/python
337d334
337d334
# In Fedora 31, /usr/bin/pydoc was moved here from Python 2.
337d334
# Ideally we'd have an explicit conflict with "/usr/bin/pydoc < 3",
337d334
# but file provides aren't versioned and the file moved across packages.
337d334
# Instead, we rely on the conflict in python3-libs.
337d334
b9e8a46
# Previously, this was required for our rewheel patch to work.
b9e8a46
# This is technically no longer needed, but we keep it recommended
b9e8a46
# for the developer experience.
b9e8a46
Recommends: python3-setuptools
b9e8a46
Recommends: python3-pip
b9e8a46
3f778c4
# This prevents ALL subpackages built from this spec to require
3f778c4
# /usr/bin/python3*. Granularity per subpackage is impossible.
3f778c4
# It's intended for the libs package not to drag in the interpreter, see
3f778c4
# https://bugzilla.redhat.com/show_bug.cgi?id=1547131
3f778c4
# All others require %%{name} anyway.
3f778c4
%global __requires_exclude ^/usr/bin/python3
3f778c4
3f778c4
15a5ab1
# The description used both for the SRPM and the main `python3` subpackage:
a3483f9
%description
c2f8719
Python is an accessible, high-level, dynamically typed, interpreted programming
3bbc2a0
language, designed with an emphasis on code readability.
c2f8719
It includes an extensive standard library, and has a vast ecosystem of
c2f8719
third-party libraries.
6245861
af1dc26
The %{name} package provides the "python3" executable: the reference
15a5ab1
interpreter for the Python language, version 3.
c2f8719
The majority of its standard library is provided in the %{name}-libs package,
c2f8719
which should be installed automatically along with %{name}.
c2f8719
The remaining parts of the Python standard library are broken out into the
c2f8719
%{name}-tkinter and %{name}-test packages, which may need to be installed
c2f8719
separately.
6245861
c2f8719
Documentation for Python is provided in the %{name}-docs package.
c2f8719
c2f8719
Packages containing additional libraries for Python are generally named with
c2f8719
the "%{name}-" prefix.
6245861
a3483f9
337d334
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
337d334
# https://fedoraproject.org/wiki/Changes/Python_means_Python3
337d334
%package -n python-unversioned-command
337d334
Summary: The "python" command that runs Python 3
337d334
BuildArch: noarch
337d334
337d334
# In theory this could require any python3 version
337d334
Requires: python3 == %{version}-%{release}
337d334
# But since we want to provide versioned python, we require exact version
337d334
Provides: python = %{version}-%{release}
337d334
# This also save us an explicit conflict for older python3 builds
337d334
337d334
%description -n python-unversioned-command
337d334
This package contains /usr/bin/python - the "python" command that runs Python 3.
337d334
337d334
a3483f9
%package libs
6245861
Summary:        Python runtime libraries
a3483f9
0b241ab
%if %{with rpmwheels}
0b241ab
Requires: python-setuptools-wheel
0b241ab
Requires: python-pip-wheel
0b241ab
%else
194da16
Provides: bundled(python3dist(pip)) = %{pip_version}
194da16
Provides: bundled(python3dist(setuptools)) = %{setuptools_version}
0b241ab
%endif
0b241ab
f7475de
%{?python_provide:%python_provide python3-libs}
f7475de
3f778c4
# There are files in the standard library that have python shebang.
3f778c4
# We've filtered the automatic requirement out so libs are installable without
3f778c4
# the main package. This however makes it pulled in by default.
3f778c4
# See https://bugzilla.redhat.com/show_bug.cgi?id=1547131
3f778c4
Recommends: %{name}%{?_isa} = %{version}-%{release}
3f778c4
337d334
# https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
337d334
# In Fedora 31, several "unversioned" files like /usr/bin/pydoc and all the
337d334
# "unversioned" provides were moved from python2 to python3.
337d334
# So, newer python3 packages need to conflict with old Python 2 builds that
337d334
# still provided unversioned Python.
337d334
# Since all python packages, new and old, have versioned requires on
337d334
# python?-libs, we do it here:
337d334
Conflicts: python-libs < 3
337d334
# (We explicitly conflict with python-libs and not python2-libs, so only the
337d334
# old Python 2 builds that still provided unversioned Python are handled.)
337d334
337d334
a3483f9
%description libs
6245861
This package contains runtime libraries for use by Python:
c2f8719
- the majority of the Python standard library
c2f8719
- a dynamically linked library for use by applications that embed Python as
c2f8719
  a scripting language, and by the main "python3" executable
c2f8719
a3483f9
a3483f9
%package devel
6245861
Summary: Libraries and header files needed for Python development
c75d3be
Requires: %{name} = %{version}-%{release}
c75d3be
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Orion Poplawski 1eeebcf
BuildRequires: python-rpm-macros
71718b6
e259994
# The RPM related dependencies bring nothing to a non-RPM Python developer
e259994
# But we want them when packages BuildRequire python3-devel
e259994
Requires: (python-rpm-macros if rpm-build)
e259994
Requires: (python3-rpm-macros if rpm-build)
e259994
Requires: (python3-rpm-generators if rpm-build)
f7475de
4da7cff
# This is not "API" (packages that need setuptools should still BuildRequire it)
4da7cff
# However some packages apparently can build both with and without setuptools
4da7cff
# producing egg-info as file or directory (depending on setuptools presence).
4da7cff
# Directory-to-file updates are problematic in RPM, so we ensure setuptools is
4da7cff
# installed when -devel is required.
4da7cff
# See https://bugzilla.redhat.com/show_bug.cgi?id=1623914
4da7cff
# See https://fedoraproject.org/wiki/Packaging:Directory_Replacement
e259994
Requires: (python3-setuptools if rpm-build)
e259994
e259994
%{?python_provide:%python_provide python3-devel}
4da7cff
d938460
Provides: %{name}-2to3 = %{version}-%{release}
d938460
Provides: 2to3 = %{version}-%{release}
d938460
a3483f9
Conflicts: %{name} < %{version}-%{release}
a3483f9
337d334
# In Fedora 31, several "unversioned" files were moved here from Python 2:
337d334
# pygettext.py, msgfmt.py, python-config, python.pc
337d334
Conflicts: python-devel < 3
337d334
a3483f9
%description devel
c2f8719
This package contains the header files and configuration needed to compile
c2f8719
Python extension modules (typically written in C or C++), to embed Python
c2f8719
into other programs, and to make binary distributions for Python libraries.
c2f8719
d938460
It also contains the necessary macros to build RPM packages with Python modules
d938460
and 2to3 tool, an automatic source converter from Python 2.X.
6245861
a3483f9
d938460
%package idle
d938460
Summary: A basic graphical development environment for Python
a3483f9
Requires: %{name} = %{version}-%{release}
a3483f9
Requires: %{name}-tkinter = %{version}-%{release}
a3483f9
b0aea52
Provides: idle3 = %{version}-%{release}
337d334
Provides: idle = %{version}-%{release}
b0aea52
d938460
Provides: %{name}-tools = %{version}-%{release}
d938460
Provides: %{name}-tools%{?_isa} = %{version}-%{release}
d938460
Obsoletes: %{name}-tools < %{version}-%{release}
357f40b
337d334
# In Fedora 31, /usr/bin/idle was moved here from Python 2.
337d334
Conflicts: python-tools < 3
337d334
f7475de
%{?python_provide:%python_provide python3-idle}
f7475de
d938460
%description idle
d938460
IDLE is Python’s Integrated Development and Learning Environment.
d938460
d938460
IDLE has the following features: Python shell window (interactive
d938460
interpreter) with colorizing of code input, output, and error messages;
d938460
multi-window text editor with multiple undo, Python colorizing,
d938460
smart indent, call tips, auto completion, and other features;
d938460
search within any window, replace within editor windows, and
d938460
search through multiple files (grep); debugger with persistent
d938460
breakpoints, stepping, and viewing of global and local namespaces;
d938460
configuration, browsers, and other dialogs.
c2f8719
a3483f9
a3483f9
%package tkinter
6245861
Summary: A GUI toolkit for Python
a3483f9
Requires: %{name} = %{version}-%{release}
a3483f9
f7475de
%{?python_provide:%python_provide python3-tkinter}
f7475de
a3483f9
%description tkinter
c2f8719
The Tkinter (Tk interface) library is a graphical user interface toolkit for
c2f8719
the Python programming language.
c2f8719
a3483f9
a3483f9
%package test
c2f8719
Summary: The self-test suite for the main python3 package
a3483f9
Requires: %{name} = %{version}-%{release}
31d9637
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
a3483f9
f7475de
%{?python_provide:%python_provide python3-test}
f7475de
a3483f9
%description test
c2f8719
The self-test suite for the Python interpreter.
c2f8719
c2f8719
This is only useful to test Python itself. For testing general Python code,
c2f8719
you should use the unittest module from %{name}-libs, or a library such as
2bcebb2
%{name}-pytest or %{name}-nose.
a3483f9
a3483f9
043c574
%if %{with debug_build}
55cf580
%package debug
6245861
Summary: Debug version of the Python runtime
55cf580
55cf580
# The debug build is an all-in-one package version of the regular build, and
3bbc2a0
# shares the same .py/.pyc files and directories as the regular build. Hence
55cf580
# we depend on all of the subpackages of the regular build:
55cf580
Requires: %{name}%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-test%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-tkinter%{?_isa} = %{version}-%{release}
d938460
Requires: %{name}-idle%{?_isa} = %{version}-%{release}
55cf580
337d334
# In Fedora 31, /usr/bin/python-debug was moved here from Python 2.
337d334
Conflicts: python-debug < 3
337d334
f7475de
%{?python_provide:%python_provide python3-debug}
f7475de
55cf580
%description debug
6245861
python3-debug provides a version of the Python runtime with numerous debugging
c2f8719
features enabled, aimed at advanced Python users such as developers of Python
55cf580
extension modules.
55cf580
6245861
This version uses more memory and will be slower than the regular Python build,
c2f8719
but is useful for tracking down reference-counting issues and other bugs.
55cf580
c2f8719
The bytecode format is unchanged, so that .pyc files are compatible between
c2f8719
this and the standard version of Python, but the debugging features mean that
c2f8719
C/C++ extension modules are ABI-incompatible and must be built for each version
c2f8719
separately.
55cf580
c2f8719
The debug build shares installation directories with the standard Python
c2f8719
runtime, so that .py and .pyc files can be shared.
c2f8719
Compiled extension modules use a special ABI flag ("d") in the filename,
3bbc2a0
so extensions for both versions can co-exist in the same directory.
043c574
%endif # with debug_build
55cf580
8c67baf
%else  # with flatpackage
8c67baf
8c67baf
# We'll not provide this, on purpose
8c67baf
# No package in Fedora shall ever depend on flatpackage via this
8c67baf
%global __requires_exclude ^python\\(abi\\) = 3\\..$
8c67baf
%global __provides_exclude ^python\\(abi\\) = 3\\..$
8c67baf
0b241ab
%if %{with rpmwheels}
0b241ab
Requires: python-setuptools-wheel
0b241ab
Requires: python-pip-wheel
0b241ab
%else
194da16
Provides: bundled(python3dist(pip)) = %{pip_version}
194da16
Provides: bundled(python3dist(setuptools)) = %{setuptools_version}
0b241ab
%endif
8c67baf
8c67baf
# The description for the flat package
8c67baf
%description
8c67baf
Python %{pybasever} package for developers.
8c67baf
fc23c47
This package exists to allow developers to test their code against a newer
8c67baf
version of Python. This is not a full Python stack and if you wish to run
63459d7
your applications with Python %{pybasever}, update your Fedora to a newer
63459d7
version once Python %{pybasever} is stable.
8c67baf
8c67baf
%endif # with flatpackage
c2f8719
c769a6b
# ======================================================
c769a6b
# The prep phase of the build:
c769a6b
# ======================================================
c769a6b
a3483f9
%prep
2ef8434
%gpgverify -k2 -s1 -d0
4d8d4c0
%autosetup -S git_am -N -n Python-%{upstream_version}
6859f23
4d8d4c0
# Apply initial patches manually
4d8d4c0
%apply_patch -q %{PATCH1}
7eb10c8
a3483f9
%if "%{_lib}" == "lib64"
4d8d4c0
%apply_patch -q %{PATCH102}
a3483f9
%endif
4d8d4c0
4d8d4c0
%apply_patch -q %{PATCH111}
4d8d4c0
%apply_patch -q %{PATCH155}
4d8d4c0
%apply_patch -q %{PATCH170}
0c8875f
0b241ab
%if %{with rpmwheels}
4d8d4c0
%apply_patch -q %{PATCH189}
0b241ab
rm Lib/ensurepip/_bundled/*.whl
Matej Stuchlik 11fb599
%endif
Matej Stuchlik 11fb599
4d8d4c0
# Apply the remaining patches
4d8d4c0
%autopatch -m 190
4d8d4c0
4d8d4c0
# Remove all exe files to ensure we are not shipping prebuilt binaries
4d8d4c0
# note that those are only used to create Microsoft Windows installers
4d8d4c0
# and that functionality is broken on Linux anyway
4d8d4c0
find -name '*.exe' -print -delete
27c558e
4d8d4c0
# Remove bundled libraries to ensure that we're using the system copy.
4d8d4c0
rm -r Modules/expat
0efd3d3
96a7bd5
# Remove files that should be generated by the build
96a7bd5
# (This is after patching, so that we can use patches directly from upstream)
96a7bd5
rm configure pyconfig.h.in
96a7bd5
704d298
# When we use the legacy arch names, we need to change them in configure.ac
704d298
%if %{with legacy_archnames}
704d298
sed -i configure.ac \
704d298
    -e 's/\b%{platform_triplet_upstream}\b/%{platform_triplet_legacy}/'
704d298
%endif
704d298
96a7bd5
c769a6b
# ======================================================
c769a6b
# Configuring and building the code:
c769a6b
# ======================================================
c769a6b
a3483f9
%build
96a7bd5
3b5f161
# The build process embeds version info extracted from the Git repository
3b5f161
# into the Py_GetBuildInfo and sys.version strings.
3b5f161
# Our Git repository is artificial, so we don't want that.
3b5f161
# Tell configure to not use git.
3b5f161
export HAS_GIT=not-found
3b5f161
96a7bd5
# Regenerate the configure script and pyconfig.h.in
96a7bd5
autoconf
96a7bd5
autoheader
96a7bd5
db2797c
# Remember the current directory (which has sources and the configure script),
db2797c
# so we can refer to it after we "cd" elsewhere.
55cf580
topdir=$(pwd)
db2797c
db2797c
# Get proper option names from bconds
db2797c
%if %{with computed_gotos}
db2797c
%global computed_gotos_flag yes
db2797c
%else
db2797c
%global computed_gotos_flag no
db2797c
%endif
db2797c
db2797c
%if %{with optimizations}
db2797c
%global optimizations_flag "--enable-optimizations"
db2797c
%else
db2797c
%global optimizations_flag "--disable-optimizations"
db2797c
%endif
db2797c
db2797c
# Set common compiler/linker flags
8927d3f
# We utilize the %%extension_...flags macros here so users building C/C++
8927d3f
# extensions with our python won't get all the compiler/linker flags used
8927d3f
# in Fedora RPMs.
8927d3f
# Standard library built here will still use the %%build_...flags,
8927d3f
# Fedora packages utilizing %%py3_build will use them as well
8927d3f
# https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
8927d3f
export CFLAGS="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
8927d3f
export CFLAGS_NODIST="%{build_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
8927d3f
export CXXFLAGS="%{extension_cxxflags} -D_GNU_SOURCE -fPIC -fwrapv"
db2797c
export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
8927d3f
export OPT="%{extension_cflags} -D_GNU_SOURCE -fPIC -fwrapv"
a3483f9
export LINKCC="gcc"
db2797c
export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
8927d3f
export LDFLAGS="%{extension_ldflags} -g $(pkg-config --libs-only-L openssl)"
8927d3f
export LDFLAGS_NODIST="%{build_ldflags} -g $(pkg-config --libs-only-L openssl)"
a3483f9
db2797c
# We can build several different configurations of Python: regular and debug.
db2797c
# Define a common function that does one build:
55cf580
BuildPython() {
Robert Kuska a0e3ab8
  ConfName=$1
db2797c
  ExtraConfigArgs=$2
db2797c
  MoreCFlags=$3
55cf580
db2797c
  # Each build is done in its own directory
55cf580
  ConfDir=build/$ConfName
db2797c
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
  mkdir -p $ConfDir
55cf580
  pushd $ConfDir
55cf580
db2797c
  # Normally, %%configure looks for the "configure" script in the current
db2797c
  # directory.
db2797c
  # Since we changed directories, we need to tell %%configure where to look.
55cf580
  %global _configure $topdir/configure
55cf580
c969609
%configure \
c969609
  --enable-ipv6 \
c969609
  --enable-shared \
043c574
  --with-computed-gotos=%{computed_gotos_flag} \
ecc5705
  --with-dbmliborder=gdbm:ndbm:bdb \
ecc5705
  --with-system-expat \
ecc5705
  --with-system-ffi \
b8daf73
  --enable-loadable-sqlite-extensions \
af1b222
  --with-dtrace \
3f69bcd
  --with-lto \
969d514
  --with-ssl-default-suites=openssl \
043c574
%if %{with valgrind}
31a06df
  --with-valgrind \
31a06df
%endif
55cf580
  $ExtraConfigArgs \
55cf580
  %{nil}
c969609
b50df31
%global flags_override EXTRA_CFLAGS="$MoreCFlags" CFLAGS_NODIST="$CFLAGS_NODIST $MoreCFlags"
b50df31
3a42baf
  # Regenerate generated importlib frozen modules (see patch 353)
3a42baf
  %make_build %{flags_override} regen-importlib
3a42baf
db2797c
  # Invoke the build
b50df31
  %make_build %{flags_override}
a3483f9
55cf580
  popd
db2797c
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
}
55cf580
db2797c
# Call the above to build each configuration.
55cf580
043c574
%if %{with debug_build}
55cf580
BuildPython debug \
db2797c
  "--without-ensurepip --with-pydebug" \
091b4b2
  "-Og"
043c574
%endif # with debug_build
55cf580
55cf580
BuildPython optimized \
db2797c
  "--without-ensurepip %{optimizations_flag}" \
db2797c
  ""
55cf580
c769a6b
# ======================================================
c769a6b
# Installing the built code:
c769a6b
# ======================================================
a3483f9
a3483f9
%install
208332b
208332b
# As in %%build, remember the current directory
55cf580
topdir=$(pwd)
a3483f9
208332b
# We install a collection of hooks for gdb that make it easier to debug
208332b
# executables linked against libpython3* (such as /usr/bin/python3 itself)
208332b
#
208332b
# These hooks are implemented in Python itself (though they are for the version
208332b
# of python that gdb is linked with)
208332b
#
208332b
# gdb-archer looks for them in the same path as the ELF file or its .debug
208332b
# file, with a -gdb.py suffix.
208332b
# We put them next to the debug file, because ldconfig would complain if
208332b
# it found non-library files directly in /usr/lib/
208332b
# (see https://bugzilla.redhat.com/show_bug.cgi?id=562980)
208332b
#
208332b
# We'll put these files in the debuginfo package by installing them to e.g.:
208332b
#  /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
208332b
# (note that the debug path is /usr/lib/debug for both 32/64 bit)
208332b
#
208332b
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
208332b
# information
208332b
208332b
%if %{with gdb_hooks}
28f989a
DirHoldingGdbPy=%{_usr}/lib/debug/%{_libdir}
208332b
mkdir -p %{buildroot}$DirHoldingGdbPy
208332b
%endif # with gdb_hooks
208332b
6c51695
# Multilib support for pyconfig.h
6c51695
# 32- and 64-bit versions of pyconfig.h are different. For multilib support
6c51695
# (making it possible to install 32- and 64-bit versions simultaneously),
6c51695
# we need to install them under different filenames, and to make the common
6c51695
# "pyconfig.h" include the right file based on architecture.
6c51695
# See https://bugzilla.redhat.com/show_bug.cgi?id=192747
6c51695
# Filanames are defined here:
6c51695
%global _pyconfig32_h pyconfig-32.h
6c51695
%global _pyconfig64_h pyconfig-64.h
cfeac3f
%global _pyconfig_h pyconfig-%{__isa_bits}.h
6c51695
208332b
# Use a common function to do an install for all our configurations:
55cf580
InstallPython() {
55cf580
Robert Kuska a0e3ab8
  ConfName=$1
55cf580
  PyInstSoName=$2
Matej Stuchlik 318f360
  MoreCFlags=$3
474cc9f
  LDVersion=$4
55cf580
208332b
  # Switch to the directory with this configuration's built files
55cf580
  ConfDir=build/$ConfName
55cf580
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
  mkdir -p $ConfDir
55cf580
  pushd $ConfDir
55cf580
2fa1c0b
  %make_install EXTRA_CFLAGS="$MoreCFlags"
a3483f9
cfd3e15
  popd
55cf580
043c574
%if %{with gdb_hooks}
208332b
  # See comment on $DirHoldingGdbPy above
e49a729
  PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName-%{version}-%{release}.%{_arch}.debug-gdb.py
cfd3e15
  cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
043c574
%endif # with gdb_hooks
55cf580
474cc9f
  # Rename the -devel script that differs on different arches to arch specific name
474cc9f
  mv %{buildroot}%{_bindir}/python${LDVersion}-{,`uname -m`-}config
474cc9f
  echo -e '#!/bin/sh\nexec `dirname $0`/python'${LDVersion}'-`uname -m`-config "$@"' > \
474cc9f
    %{buildroot}%{_bindir}/python${LDVersion}-config
474cc9f
  echo '[ $? -eq 127 ] && echo "Could not find python'${LDVersion}'-`uname -m`-config. Look around to see available arches." >&2' >> \
474cc9f
    %{buildroot}%{_bindir}/python${LDVersion}-config
474cc9f
    chmod +x %{buildroot}%{_bindir}/python${LDVersion}-config
474cc9f
6c51695
  # Make python3-devel multilib-ready
6c51695
  mv %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h \
6c51695
     %{buildroot}%{_includedir}/python${LDVersion}/%{_pyconfig_h}
6c51695
  cat > %{buildroot}%{_includedir}/python${LDVersion}/pyconfig.h << EOF
6c51695
#include <bits/wordsize.h>
6c51695
6c51695
#if __WORDSIZE == 32
e8fa184
#include "%{_pyconfig32_h}"
6c51695
#elif __WORDSIZE == 64
e8fa184
#include "%{_pyconfig64_h}"
6c51695
#else
6c51695
#error "Unknown word size"
6c51695
#endif
6c51695
EOF
6c51695
55cf580
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
}
55cf580
7c72174
# Install the "debug" build first; any common files will be overridden with
208332b
# later builds
043c574
%if %{with debug_build}
55cf580
InstallPython debug \
Matej Stuchlik 318f360
  %{py_INSTSONAME_debug} \
474cc9f
  -O0 \
ffaa0f3
  %{LDVERSION_debug}
043c574
%endif # with debug_build
55cf580
55cf580
# Now the optimized build:
55cf580
InstallPython optimized \
208332b
  %{py_INSTSONAME_optimized} \
474cc9f
  "" \
ffaa0f3
  %{LDVERSION_optimized}
55cf580
f86b3d1
# Install directories for additional packages
b3fc51b
install -d -m 0755 %{buildroot}%{pylibdir}/site-packages/__pycache__
f86b3d1
%if "%{_lib}" == "lib64"
f86b3d1
# The 64-bit version needs to create "site-packages" in /usr/lib/ (for
f86b3d1
# pure-Python modules) as well as in /usr/lib64/ (for packages with extension
f86b3d1
# modules).
f86b3d1
# Note that rpmlint will complain about hardcoded library path;
f86b3d1
# this is intentional.
f86b3d1
install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
f86b3d1
%endif
a3483f9
8c67baf
%if %{without flatpackage}
860f392
# add idle3 to menu
b3fc51b
install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle3.png
b3fc51b
install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle3.png
b3fc51b
install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle3.png
b3fc51b
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE10}
860f392
860f392
# Install and validate appdata file
838e397
mkdir -p %{buildroot}%{_metainfodir}
838e397
cp -a %{SOURCE11} %{buildroot}%{_metainfodir}
838e397
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/idle3.appdata.xml
8c67baf
%endif
860f392
6c51695
# Make sure distutils looks at the right pyconfig.h file
6c51695
# See https://bugzilla.redhat.com/show_bug.cgi?id=201434
824c34b
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
824c34b
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
6c51695
# when python starts up (see https://bugzilla.redhat.com/show_bug.cgi?id=653058)
824c34b
#
824c34b
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
824c34b
# variants:
824c34b
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
824c34b
  %{buildroot}%{pylibdir}/distutils/sysconfig.py \
824c34b
  %{buildroot}%{pylibdir}/sysconfig.py
a3483f9
d938460
# Install pathfix.py to bindir
d938460
# See https://github.com/fedora-python/python-rpm-porting/issues/24
5e429b6
cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/pathfix%{pybasever}.py
d938460
83a5f52
# Install i18n tools to bindir
83a5f52
# They are also in python2, so we version them
83a5f52
# https://bugzilla.redhat.com/show_bug.cgi?id=1571474
83a5f52
for tool in pygettext msgfmt; do
83a5f52
  cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{pybasever}.py
83a5f52
  ln -s ${tool}%{pybasever}.py %{buildroot}%{_bindir}/${tool}3.py
83a5f52
done
83a5f52
a3483f9
# Switch all shebangs to refer to the specific Python version.
Iryna Shcherbina 685fb7b
# This currently only covers files matching ^[a-zA-Z0-9_]+\.py$,
Iryna Shcherbina 685fb7b
# so handle files named using other naming scheme separately.
55cf580
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
55cf580
  Tools/scripts/pathfix.py \
6c5992e
  -i "%{_bindir}/python%{pybasever}" -pn \
6c5992e
  %{buildroot} \
83a5f52
  %{buildroot}%{_bindir}/*%{pybasever}.py \
6c5992e
  %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py}
0652b06
d938460
# Remove tests for python3-tools which was removed in
d938460
# https://bugzilla.redhat.com/show_bug.cgi?id=1312030
d938460
rm -rf %{buildroot}%{pylibdir}/test/test_tools
0652b06
a3483f9
# Remove shebang lines from .py files that aren't executable, and
a3483f9
# remove executability from .py files that don't have a shebang line:
71040c9
find %{buildroot} -name \*.py \
a3483f9
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
a3483f9
  -print -exec sed -i '1d' {} \; \) -o \( \
a3483f9
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
a3483f9
  -exec chmod a-x {} \; \) \)
a3483f9
a3483f9
# Get rid of DOS batch files:
71040c9
find %{buildroot} -name \*.bat -exec rm {} \;
a3483f9
a3483f9
# Get rid of backup files:
71040c9
find %{buildroot}/ -name "*~" -exec rm -f {} \;
a3483f9
find . -name "*~" -exec rm -f {} \;
a3483f9
Thomas Spura 1c26b68
# Do bytecompilation with the newly installed interpreter.
Thomas Spura e6314e6
# This is similar to the script in macros.pybytecompile
Thomas Spura ae2fc1c
# compile *.pyc
Thomas Spura ae2fc1c
find %{buildroot} -type f -a -name "*.py" -print0 | \
Thomas Spura ae2fc1c
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
3dbbc14
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
b2fa007
    xargs -0 %{buildroot}%{_bindir}/python%{pybasever} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=opt) for opt in range(3) for f in sys.argv[1:]]' || :
a3483f9
0652b06
# Since we have pathfix.py in bindir, this is created, but we don't want it
0652b06
rm -rf %{buildroot}%{_bindir}/__pycache__
0652b06
a3483f9
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
d54a775
find %{buildroot} -perm 555 -exec chmod 755 {} \;
a3483f9
9640a7e
# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
c4a5733
# avoid the user having to know the precise version and ABI flags.
c4a5733
# See e.g. https://bugzilla.redhat.com/show_bug.cgi?id=676748
8c67baf
%if %{with debug_build} && %{without flatpackage}
9640a7e
ln -s \
9640a7e
  %{_bindir}/python%{LDVERSION_debug} \
9640a7e
  %{buildroot}%{_bindir}/python3-debug
00fd884
%endif
9640a7e
dc669ab
# There's 2to3-X.X executable and 2to3 soft link to it.
dc669ab
# No reason to have both, so keep only 2to3 as an executable.
dc669ab
# See https://bugzilla.redhat.com/show_bug.cgi?id=1111275
dc669ab
mv %{buildroot}%{_bindir}/2to3-%{pybasever} %{buildroot}%{_bindir}/2to3
6a6d4a0
8f86cfe
# make man python3.Xm work https://bugzilla.redhat.com/show_bug.cgi?id=1612241
8f86cfe
ln -s ./python%{pybasever}.1 %{buildroot}%{_mandir}/man1/python%{pybasever}m.1
8f86cfe
8c67baf
%if %{with flatpackage}
8c67baf
# Remove stuff that would conflict with python3 package
8c67baf
rm %{buildroot}%{_bindir}/python3
8c67baf
rm %{buildroot}%{_bindir}/pydoc3
83a5f52
rm %{buildroot}%{_bindir}/pygettext3.py
83a5f52
rm %{buildroot}%{_bindir}/msgfmt3.py
8c67baf
rm %{buildroot}%{_bindir}/idle3
8c67baf
rm %{buildroot}%{_bindir}/python3-*
8c67baf
rm %{buildroot}%{_bindir}/pyvenv
6a6d4a0
rm %{buildroot}%{_bindir}/2to3
8c67baf
rm %{buildroot}%{_libdir}/libpython3.so
8c67baf
rm %{buildroot}%{_mandir}/man1/python3.1*
8c67baf
rm %{buildroot}%{_libdir}/pkgconfig/python3.pc
337d334
%else
337d334
# Link the unversioned stuff
337d334
# https://fedoraproject.org/wiki/Changes/Python_means_Python3
337d334
ln -s ./python3 %{buildroot}%{_bindir}/python
337d334
ln -s ./pydoc3 %{buildroot}%{_bindir}/pydoc
337d334
ln -s ./pygettext3.py %{buildroot}%{_bindir}/pygettext.py
337d334
ln -s ./msgfmt3.py %{buildroot}%{_bindir}/msgfmt.py
337d334
ln -s ./idle3 %{buildroot}%{_bindir}/idle
337d334
ln -s ./python3-config %{buildroot}%{_bindir}/python-config
337d334
ln -s ./python3.1 %{buildroot}%{_mandir}/man1/python.1
337d334
ln -s ./python3.pc %{buildroot}%{_libdir}/pkgconfig/python.pc
5e429b6
ln -s ./pathfix%{pybasever}.py %{buildroot}%{_bindir}/pathfix.py
337d334
%if %{with debug_build}
337d334
ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug
337d334
%endif
8c67baf
%endif
7e7918a
7e7918a
c769a6b
# ======================================================
ec8375c
# Checks for packaging issues
c769a6b
# ======================================================
c769a6b
a3483f9
%check
3dbbc14
3dbbc14
# first of all, check timestamps of bytecode files
3dbbc14
find %{buildroot} -type f -a -name "*.py" -print0 | \
3dbbc14
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
3dbbc14
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
3dbbc14
    xargs -0 %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE8}
3dbbc14
ec8375c
# Ensure that the curses module was linked against libncursesw.so, rather than
ec8375c
# libncurses.so
ec8375c
# See https://bugzilla.redhat.com/show_bug.cgi?id=539917
ec8375c
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
ec8375c
    | grep curses \
ec8375c
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
ec8375c
ec8375c
# Ensure that the debug modules are linked against the debug libpython, and
ec8375c
# likewise for the optimized modules and libpython:
ec8375c
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
ec8375c
    case $Module in
ec8375c
    *.%{SOABI_debug})
ec8375c
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
ec8375c
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
ec8375c
ec8375c
        ;;
ec8375c
    *.%{SOABI_optimized})
ec8375c
        ldd $Module | grep %{py_INSTSONAME_debug} &&
ec8375c
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1)
ec8375c
        ;;
ec8375c
    esac
ec8375c
done
ec8375c
63459d7
ec8375c
# ======================================================
ec8375c
# Running the upstream test suite
ec8375c
# ======================================================
ec8375c
55cf580
topdir=$(pwd)
55cf580
CheckPython() {
Robert Kuska a0e3ab8
  ConfName=$1
5080ffc
  ConfDir=$(pwd)/build/$ConfName
4aa9ebc
55cf580
  echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
5a48967
  # Note that we're running the tests using the version of the code in the
5a48967
  # builddir, not in the buildroot.
5db81fb
e21e6a6
  # Show some info, helpful for debugging test failures
e21e6a6
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.pythoninfo
e21e6a6
9733ead
  # Run the upstream test suite
4b6961f
  # test_gdb skipped on armv7hl:
4b6961f
  #   https://bugzilla.redhat.com/show_bug.cgi?id=1196181
4b6961f
  # test_gdb skipped on s390x:
4b6961f
  #   https://bugzilla.redhat.com/show_bug.cgi?id=1678277
9a778ac
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
5258d1d
    -wW --slowest -j0 \
Matej Stuchlik 318f360
    -x test_distutils \
bbf2225
    -x test_bdist_rpm \
4b6961f
    %ifarch %{arm} s390x
e354fb5
    -x test_gdb \
4b6961f
    %endif
4bc70e0
    %ifarch %{mips64}
1b09295
    -x test_ctypes \
4bc70e0
    %endif
a3483f9
5db81fb
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
55cf580
}
55cf580
043c574
%if %{with tests}
a5cef79
55cf580
# Check each of the configurations:
043c574
%if %{with debug_build}
55cf580
CheckPython debug
043c574
%endif # with debug_build
55cf580
CheckPython optimized
55cf580
043c574
%endif # with tests
a5cef79
55cf580
4aab458
%files
Iryna Shcherbina aba719b
%doc README.rst
8c67baf
8c67baf
%if %{without flatpackage}
a3483f9
%{_bindir}/pydoc*
a3483f9
%{_bindir}/python3
1c94c1a
%{_bindir}/pyvenv
8c67baf
%else
8c67baf
%{_bindir}/pydoc%{pybasever}
8c67baf
%endif
63459d7
8c67baf
%{_bindir}/python%{pybasever}
8c67baf
%{_bindir}/python%{pybasever}m
f2d9a81
%{_bindir}/pyvenv-%{pybasever}
337d334
%{_mandir}/*/*3*
26c1be5
26c1be5
8c67baf
%if %{without flatpackage}
337d334
%files -n python-unversioned-command
337d334
%{_bindir}/python
337d334
%{_mandir}/*/python.1*
337d334
26c1be5
%files libs
Iryna Shcherbina aba719b
%doc README.rst
8c67baf
%endif
60aba0a
11efc8e
%dir %{pylibdir}
11efc8e
%dir %{dynload_dir}
11efc8e
46d035d
%license %{pylibdir}/LICENSE.txt
46d035d
60aba0a
%{pylibdir}/lib2to3
8c67baf
%if %{without flatpackage}
60aba0a
%exclude %{pylibdir}/lib2to3/tests
8c67baf
%endif
60aba0a
60aba0a
%dir %{pylibdir}/unittest/
60aba0a
%dir %{pylibdir}/unittest/__pycache__/
60aba0a
%{pylibdir}/unittest/*.py
60aba0a
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes}
60aba0a
60aba0a
%dir %{pylibdir}/asyncio/
60aba0a
%dir %{pylibdir}/asyncio/__pycache__/
60aba0a
%{pylibdir}/asyncio/*.py
60aba0a
%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes}
60aba0a
60aba0a
%dir %{pylibdir}/venv/
60aba0a
%dir %{pylibdir}/venv/__pycache__/
60aba0a
%{pylibdir}/venv/*.py
60aba0a
%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes}
60aba0a
%{pylibdir}/venv/scripts
60aba0a
60aba0a
%{pylibdir}/wsgiref
60aba0a
%{pylibdir}/xmlrpc
60aba0a
60aba0a
%dir %{pylibdir}/ensurepip/
60aba0a
%dir %{pylibdir}/ensurepip/__pycache__/
60aba0a
%{pylibdir}/ensurepip/*.py
60aba0a
%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes}
8c67baf
0b241ab
%if %{with rpmwheels}
60aba0a
%exclude %{pylibdir}/ensurepip/_bundled
8c67baf
%else
8c67baf
%dir %{pylibdir}/ensurepip/_bundled
8c67baf
%{pylibdir}/ensurepip/_bundled/*.whl
8c67baf
%endif
60aba0a
60aba0a
%dir %{pylibdir}/concurrent/
60aba0a
%dir %{pylibdir}/concurrent/__pycache__/
60aba0a
%{pylibdir}/concurrent/*.py
60aba0a
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes}
60aba0a
60aba0a
%dir %{pylibdir}/concurrent/futures/
60aba0a
%dir %{pylibdir}/concurrent/futures/__pycache__/
60aba0a
%{pylibdir}/concurrent/futures/*.py
60aba0a
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes}
60aba0a
60aba0a
%{pylibdir}/pydoc_data
60aba0a
1c8e9a6
%{dynload_dir}/_blake2.%{SOABI_optimized}.so
f7bd058
%{dynload_dir}/_md5.%{SOABI_optimized}.so
1c8e9a6
%{dynload_dir}/_sha1.%{SOABI_optimized}.so
f7bd058
%{dynload_dir}/_sha256.%{SOABI_optimized}.so
1c8e9a6
%{dynload_dir}/_sha3.%{SOABI_optimized}.so
f7bd058
%{dynload_dir}/_sha512.%{SOABI_optimized}.so
1c8e9a6
1b09295
%{dynload_dir}/_asyncio.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_bisect.%{SOABI_optimized}.so
1c94c1a
%{dynload_dir}/_bz2.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so
cea6d60
%{dynload_dir}/_contextvars.%{SOABI_optimized}.so
1c94c1a
%{dynload_dir}/_crypt.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_csv.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_curses.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_dbm.%{SOABI_optimized}.so
1c94c1a
%{dynload_dir}/_decimal.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so
043c574
%if %{with gdbm}
5080ffc
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
5fe31d8
%endif
5080ffc
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_heapq.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_json.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so
1c94c1a
%{dynload_dir}/_lzma.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so
3aee76e
%{dynload_dir}/_opcode.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_pickle.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so
cea6d60
%{dynload_dir}/_queue.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_random.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_socket.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_struct.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/array.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/audioop.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/binascii.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/cmath.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_datetime.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/fcntl.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/grp.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/math.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/mmap.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/nis.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/parser.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/readline.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/resource.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/select.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/spwd.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/syslog.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/termios.%{SOABI_optimized}.so
Matej Stuchlik abb2ff8
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
d668c1e
%{dynload_dir}/_uuid.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/zlib.%{SOABI_optimized}.so
4aab458
13c4a4f
%dir %{pylibdir}/site-packages/
13c4a4f
%dir %{pylibdir}/site-packages/__pycache__/
1c8e9a6
%{pylibdir}/site-packages/README.txt
7eb10c8
%{pylibdir}/*.py
e1c7be0
%dir %{pylibdir}/__pycache__/
7eb10c8
%{pylibdir}/__pycache__/*%{bytecode_suffixes}
1c94c1a
1c94c1a
%dir %{pylibdir}/collections/
1c94c1a
%dir %{pylibdir}/collections/__pycache__/
1c94c1a
%{pylibdir}/collections/*.py
1c94c1a
%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes}
5080ffc
5080ffc
%dir %{pylibdir}/ctypes/
e1c7be0
%dir %{pylibdir}/ctypes/__pycache__/
7eb10c8
%{pylibdir}/ctypes/*.py
7eb10c8
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes}
a3483f9
%{pylibdir}/ctypes/macholib
5080ffc
a3483f9
%{pylibdir}/curses
5080ffc
5080ffc
%dir %{pylibdir}/dbm/
e1c7be0
%dir %{pylibdir}/dbm/__pycache__/
7eb10c8
%{pylibdir}/dbm/*.py
7eb10c8
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes}
5080ffc
a6cf423
%dir %{pylibdir}/distutils/
a6cf423
%dir %{pylibdir}/distutils/__pycache__/
a6cf423
%{pylibdir}/distutils/*.py
a6cf423
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
a6cf423
%{pylibdir}/distutils/README
a6cf423
%{pylibdir}/distutils/command
a6cf423
5080ffc
%dir %{pylibdir}/email/
e1c7be0
%dir %{pylibdir}/email/__pycache__/
7eb10c8
%{pylibdir}/email/*.py
7eb10c8
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes}
a3483f9
%{pylibdir}/email/mime
1c94c1a
%doc %{pylibdir}/email/architecture.rst
5080ffc
a3483f9
%{pylibdir}/encodings
cb97d29
a3483f9
%{pylibdir}/html
a3483f9
%{pylibdir}/http
5080ffc
5080ffc
%dir %{pylibdir}/importlib/
e1c7be0
%dir %{pylibdir}/importlib/__pycache__/
7eb10c8
%{pylibdir}/importlib/*.py
7eb10c8
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes}
5080ffc
5080ffc
%dir %{pylibdir}/json/
e1c7be0
%dir %{pylibdir}/json/__pycache__/
7eb10c8
%{pylibdir}/json/*.py
7eb10c8
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes}
5080ffc
a3483f9
%{pylibdir}/logging
a3483f9
%{pylibdir}/multiprocessing
5080ffc
5080ffc
%dir %{pylibdir}/sqlite3/
e1c7be0
%dir %{pylibdir}/sqlite3/__pycache__/
7eb10c8
%{pylibdir}/sqlite3/*.py
7eb10c8
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
5080ffc
8c67baf
%if %{without flatpackage}
5080ffc
%exclude %{pylibdir}/turtle.py
5080ffc
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
8c67baf
%endif
5080ffc
a3483f9
%{pylibdir}/urllib
347356c
%{pylibdir}/xml
1c94c1a
a3483f9
%if "%{_lib}" == "lib64"
37de674
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
37de674
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
13c4a4f
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
a3483f9
%endif
a3483f9
a3483f9
# "Makefile" and the config-32/64.h file are needed by
a3483f9
# distutils/sysconfig.py:_init_posix(), so we include them in the core
a3483f9
# package, along with their parent directories (bug 531901):
704d298
%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/
704d298
%{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile
5080ffc
%dir %{_includedir}/python%{LDVERSION_optimized}/
5080ffc
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a3483f9
Robert Kuska 0837458
%{_libdir}/%{py_INSTSONAME_optimized}
8c67baf
%if %{without flatpackage}
34c15c7
%{_libdir}/libpython3.so
8c67baf
%endif
a3483f9
63459d7
8c67baf
%if %{without flatpackage}
a3483f9
%files devel
d938460
%{_bindir}/2to3
8c67baf
%endif
8c67baf
704d298
%{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/*
8c67baf
%if %{without flatpackage}
704d298
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{platform_triplet}/Makefile
8c67baf
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
8c67baf
%endif
5080ffc
%{_includedir}/python%{LDVERSION_optimized}/*.h
1385d6e
%{_includedir}/python%{LDVERSION_optimized}/internal/
a3483f9
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
8c67baf
8c67baf
%if %{without flatpackage}
a3483f9
%{_bindir}/python3-config
337d334
%{_bindir}/python-config
8c67baf
%{_libdir}/pkgconfig/python3.pc
337d334
%{_libdir}/pkgconfig/python.pc
8c67baf
%{_bindir}/pathfix.py
83a5f52
%{_bindir}/pygettext3.py
337d334
%{_bindir}/pygettext.py
83a5f52
%{_bindir}/msgfmt3.py
337d334
%{_bindir}/msgfmt.py
8c67baf
%endif
8c67baf
5e429b6
%{_bindir}/pathfix%{pybasever}.py
83a5f52
%{_bindir}/pygettext%{pybasever}.py
83a5f52
%{_bindir}/msgfmt%{pybasever}.py
83a5f52
a3483f9
%{_bindir}/python%{pybasever}-config
5080ffc
%{_bindir}/python%{LDVERSION_optimized}-config
f188880
%{_bindir}/python%{LDVERSION_optimized}-*-config
5080ffc
%{_libdir}/libpython%{LDVERSION_optimized}.so
5080ffc
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
55cf580
%{_libdir}/pkgconfig/python-%{pybasever}.pc
a3483f9
63459d7
8c67baf
%if %{without flatpackage}
d938460
%files idle
8c67baf
a3483f9
%{_bindir}/idle*
8c67baf
%else
8c67baf
%{_bindir}/idle%{pybasever}
8c67baf
%endif
8c67baf
d938460
%{pylibdir}/idlelib
8c67baf
8c67baf
%if %{without flatpackage}
838e397
%{_metainfodir}/idle3.appdata.xml
860f392
%{_datadir}/applications/idle3.desktop
860f392
%{_datadir}/icons/hicolor/*/apps/idle3.*
8c67baf
%endif
a3483f9
8c67baf
%if %{without flatpackage}
a3483f9
%files tkinter
8c67baf
%endif
8c67baf
a3483f9
%{pylibdir}/tkinter
8c67baf
%if %{without flatpackage}
a3483f9
%exclude %{pylibdir}/tkinter/test
8c67baf
%endif
5080ffc
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
5080ffc
%{pylibdir}/turtle.py
5080ffc
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
5080ffc
%dir %{pylibdir}/turtledemo
5080ffc
%{pylibdir}/turtledemo/*.py
5080ffc
%{pylibdir}/turtledemo/*.cfg
5080ffc
%dir %{pylibdir}/turtledemo/__pycache__/
5080ffc
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}
a3483f9
63459d7
8c67baf
%if %{without flatpackage}
a3483f9
%files test
8c67baf
%endif
63459d7
a3483f9
%{pylibdir}/ctypes/test
a3483f9
%{pylibdir}/distutils/tests
a3483f9
%{pylibdir}/sqlite3/test
a3483f9
%{pylibdir}/test
5080ffc
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
1c94c1a
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
b282179
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
d668c1e
%{dynload_dir}/_xxtestfuzz.%{SOABI_optimized}.so
a3483f9
%{pylibdir}/lib2to3/tests
a3483f9
%{pylibdir}/tkinter/test
e1c7be0
%{pylibdir}/unittest/test
a3483f9
55cf580
# We don't bother splitting the debug build out into further subpackages:
55cf580
# if you need it, you're probably a developer.
55cf580
55cf580
# Hence the manifest is the combination of analogous files in the manifests of
55cf580
# all of the other subpackages
55cf580
043c574
%if %{with debug_build}
8c67baf
%if %{without flatpackage}
55cf580
%files debug
8c67baf
%{_bindir}/python3-debug
337d334
%{_bindir}/python-debug
8c67baf
%endif
55cf580
55cf580
# Analog of the core subpackage's files:
5080ffc
%{_bindir}/python%{LDVERSION_debug}
55cf580
26c1be5
# Analog of the -libs subpackage's files:
55cf580
# ...with debug builds of the built-in "extension" modules:
f7bd058
1c8e9a6
%{dynload_dir}/_blake2.%{SOABI_debug}.so
f7bd058
%{dynload_dir}/_md5.%{SOABI_debug}.so
1c8e9a6
%{dynload_dir}/_sha1.%{SOABI_debug}.so
f7bd058
%{dynload_dir}/_sha256.%{SOABI_debug}.so
1c8e9a6
%{dynload_dir}/_sha3.%{SOABI_debug}.so
f7bd058
%{dynload_dir}/_sha512.%{SOABI_debug}.so
1c8e9a6
1b09295
%{dynload_dir}/_asyncio.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_bisect.%{SOABI_debug}.so
1c94c1a
%{dynload_dir}/_bz2.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so
cea6d60
%{dynload_dir}/_contextvars.%{SOABI_debug}.so
1c94c1a
%{dynload_dir}/_crypt.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_csv.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_ctypes.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_curses.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_curses_panel.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_dbm.%{SOABI_debug}.so
1c94c1a
%{dynload_dir}/_decimal.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_elementtree.%{SOABI_debug}.so
043c574
%if %{with gdbm}
5080ffc
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
5fe31d8
%endif
5080ffc
%{dynload_dir}/_hashlib.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_heapq.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_json.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_lsprof.%{SOABI_debug}.so
1c94c1a
%{dynload_dir}/_lzma.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so
3aee76e
%{dynload_dir}/_opcode.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_pickle.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so
cea6d60
%{dynload_dir}/_queue.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_random.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_socket.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_sqlite3.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_ssl.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_struct.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/array.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/audioop.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/binascii.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/cmath.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_datetime.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/fcntl.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/grp.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/math.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/mmap.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/nis.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/parser.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/pyexpat.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/readline.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/resource.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/select.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/spwd.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/syslog.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/termios.%{SOABI_debug}.so
Matej Stuchlik abb2ff8
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
d668c1e
%{dynload_dir}/_uuid.%{SOABI_debug}.so
d668c1e
%{dynload_dir}/_xxtestfuzz.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/zlib.%{SOABI_debug}.so
55cf580
55cf580
# No need to split things out the "Makefile" and the config-32/64.h file as we
55cf580
# do for the regular build above (bug 531901), since they're all in one package
55cf580
# now; they're listed below, under "-devel":
55cf580
Robert Kuska 0837458
%{_libdir}/%{py_INSTSONAME_debug}
55cf580
55cf580
# Analog of the -devel subpackage's files:
704d298
%{pylibdir}/config-%{LDVERSION_debug}-%{platform_triplet}
5080ffc
%{_includedir}/python%{LDVERSION_debug}
5080ffc
%{_bindir}/python%{LDVERSION_debug}-config
3a35e0b
%{_bindir}/python%{LDVERSION_debug}-*-config
5080ffc
%{_libdir}/libpython%{LDVERSION_debug}.so
Matej Stuchlik abb2ff8
%{_libdir}/libpython%{LDVERSION_debug}.so.1.0
5080ffc
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
55cf580
55cf580
# Analog of the -tools subpackage's files:
55cf580
#  None for now; we could build precanned versions that have the appropriate
55cf580
# shebang if needed
55cf580
55cf580
# Analog  of the tkinter subpackage's files:
5080ffc
%{dynload_dir}/_tkinter.%{SOABI_debug}.so
55cf580
55cf580
# Analog  of the -test subpackage's files:
5080ffc
%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
1c94c1a
%{dynload_dir}/_testbuffer.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_testcapi.%{SOABI_debug}.so
b282179
%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so
55cf580
043c574
%endif # with debug_build
815994f
c4a5733
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from ldconfig
c4a5733
# See https://bugzilla.redhat.com/show_bug.cgi?id=562980
Robert Kuska a0e3ab8
#
15a050e
# The /usr/lib/rpm/redhat/macros defines %%__debug_package to use
d5a5bf3
# debugfiles.list, and it appears that everything below /usr/lib/debug and
d5a5bf3
# (/usr/src/debug) gets added to this file (via LISTFILES) in
d5a5bf3
# /usr/lib/rpm/find-debuginfo.sh
Robert Kuska a0e3ab8
#
d5a5bf3
# Hence by installing it below /usr/lib/debug we ensure it is added to the
d5a5bf3
# -debuginfo subpackage
Robert Kuska a0e3ab8
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py
d5a5bf3
# payload file would be unpackaged)
d5a5bf3
c4a5733
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1476593
c6fe5c6
%undefine _debuginfo_subpackages
d5a5bf3
c769a6b
# ======================================================
c769a6b
# Finally, the changelog:
c769a6b
# ======================================================
c769a6b
a3483f9
%changelog
704d298
* Mon Oct 05 2020 Miro Hrončok <mhroncok@redhat.com> - 3.7.9-3
704d298
- Use upstream architecture names on Fedora 34+
704d298
- https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
704d298
6641177
* Mon Sep 21 2020 Miro Hrončok <mhroncok@redhat.com> - 3.7.9-2
6641177
- Rebuilt for new %%extension flags
6641177
- Fixes: rhbz#1877652
6641177
bc74407
* Wed Aug 19 2020 Tomas Hrnciar <thrnciar@redhat.com> - 3.7.9-1
bc74407
- Update to 3.7.9
bc74407
3b5f161
* Wed Aug 12 2020 Petr Viktorin <pviktori@redhat.com> - 3.7.8-4
3b5f161
- In sys.version and initial REPL message, list the source commit as "default"
3b5f161
3a42baf
* Mon Aug 03 2020 Lumír Balhar <lbalhar@redhat.com> - 3.7.8-3
3a42baf
- Add support for upstream architectures' names (patch 353)
3a42baf
db4e5c3
* Tue Jul 28 2020 Charalampos Stratakis <cstratak@redhat.com> - 3.7.8-2
db4e5c3
- Avoid infinite loop when reading specially crafted TAR files (CVE-2019-20907)
db4e5c3
Resolves: rhbz#1856481
01e8a2e
- Resolve hash collisions for Pv4Interface and IPv6Interface (CVE-2020-14422)
01e8a2e
Resolves: rhbz#1854926
5e429b6
- Ship versioned pathfixX.Y.py in main and non-main Python versions
db4e5c3
256657e
* Wed Jul 01 2020 Petr Viktorin <pviktori@redhat.com> - 3.7.8-1
256657e
- Update to 3.7.8 final
256657e
868793d
* Wed Mar 11 2020 Marcel Plch <mplch@redhat.com> - 3.7.7-1
868793d
- Update to 3.7.7
0540736
- Update the ensurepip module to work with setuptools >= 45
868793d
56cfeb6
* Tue Jan 28 2020 Miro Hrončok <mhroncok@redhat.com> - 3.7.6-2
56cfeb6
- ctypes: Disable checks for union types being passed by value (#1794572)
56cfeb6
58c995a
* Thu Dec 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.6-1
58c995a
- Update to 3.7.6
58c995a
9cf4138
* Thu Dec 05 2019 Patrik Kopkan <pkopkan@redhat.com> - 3.7.5-2
9cf4138
- pathfix.py: add -k (keep) and -a (add) command line options,
9cf4138
              assume all .py files are Python scripts when working recursively
9cf4138
- This changes will lead to having macros that will fix (#1335203)
9cf4138
d355239
* Tue Oct 15 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.5-1
d355239
- Update to 3.7.5
d355239
1d717f2
* Wed Oct 02 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.5~rc1-1
1d717f2
- Update to 3.7.5rc1
1d717f2
e259994
* Sun Aug 11 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.4-5
e259994
- Conditionalize python3-devel runtime dependencies on RPM packages and setuptools
e259994
5c6b2e2
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.4-4
5c6b2e2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
5c6b2e2
a664336
* Mon Jul 15 2019 Lumír Balhar <lbalhar@redhat.com> - 3.7.4-3
a664336
- Move test.support module to python3-test subpackage
a664336
  https://fedoraproject.org/wiki/Changes/Move_test.support_module_to_python3-test_subpackage
ec995d8
- Restore pyc to TIMESTAMP invalidation mode as default in rpmbubild
a664336
337d334
* Fri Jul 12 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.4-2
337d334
- https://fedoraproject.org/wiki/Changes/Python_means_Python3
337d334
- The python-unversioned-command package is no longer Python 2, but 3
337d334
- The python, pydoc, python-config, python-debug, idle, pygettext.py and
337d334
  msgfmt.py commands are now in python3
337d334
663a998
* Tue Jul 09 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.4-1
663a998
- Update to 3.7.4
663a998
f585cd7
* Tue Jul 02 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.4~rc2-1
f585cd7
- Update to 3.7.4rc2
f585cd7
dd5f80b
* Tue Jun 25 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.4~rc1-1
dd5f80b
- Update to 3.7.4rc1
dd5f80b
1b92cc7
* Tue May 07 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.7.3-3
1b92cc7
- Fix handling of pre-normalization characters in urlsplit
d3803a6
- Disallow control chars in http URLs (#1695572, #1700684, #1688169, #1706851)
1b92cc7
8f86cfe
* Wed Apr 17 2019 Patrik Kopkan <pkopkan@redhat.com> - 3.7.3-2
8f86cfe
- Makes man python3.7m show python3.7 man pages (#1612241)
8f86cfe
6caee32
* Wed Mar 27 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.3-1
6caee32
- Update to 3.7.3
6caee32
45a4368
* Thu Mar 21 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.3~rc1-1
45a4368
- Update to 3.7.3rc1
45a4368
498b883
* Thu Mar 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.2-8
498b883
- Security fix for CVE-2019-9636 (#1688543, #1688546)
498b883
50afd5b
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.7.2-7
50afd5b
- Rebuild for readline 8.0
50afd5b
8927d3f
* Tue Feb 12 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.2-6
8927d3f
- Reduced default build flags used to build extension modules
8927d3f
  https://fedoraproject.org/wiki/Changes/Python_Extension_Flags
8927d3f
1cdc336
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.2-5
1cdc336
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
1cdc336
4e7015b
* Wed Jan 16 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.2-4
4e7015b
- Security fix for CVE-2019-5010 (#1666519, #1666522)
4e7015b
053863a
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 3.7.2-3
053863a
- Rebuilt for libcrypt.so.2 (#1666033)
053863a
41f5904
* Fri Jan 04 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.2-2
41f5904
- No longer revert upstream commit 3b699932e5ac3e7
41f5904
- This was a dirty workaround for (#1644936)
41f5904
1385d6e
* Tue Dec 25 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.2-1
1385d6e
- Update to 3.7.2
1385d6e
1092d47
* Fri Dec 07 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-5
1092d47
- Make sure we don't ship any exe files (not needed an prebuilt)
1092d47
31d9637
* Wed Nov 21 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-4
31d9637
- Make sure the entire test.support module is in python3-libs (#1651245)
31d9637
a4e3949
* Tue Nov 06 2018 Victor Stinner <vstinner@redhat.com> - 3.7.1-3
a4e3949
- Verify the value of '-s' when execute the CLI of cProfile (rhbz#1160640)
a4e3949
72bc3f4
* Sun Nov 04 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-2
72bc3f4
- Temporarily revert upstream commit 3b699932e5ac3e7
72bc3f4
- This is dirty workaround for (#1644936)
72bc3f4
d533a32
* Mon Oct 22 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-1
d533a32
- Update to 3.7.1
d533a32
091b4b2
* Thu Sep 27 2018 Petr Viktorin <pviktori@redhat.com> - 3.7.0-10
091b4b2
- Compile the debug build with -Og rather than -O0
091b4b2
4da7cff
* Thu Aug 30 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-9
4da7cff
- Require python3-setuptools from python3-devel to prevent packaging errors (#1623914)
4da7cff
83a5f52
* Fri Aug 17 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-8
83a5f52
- Add /usr/bin/pygettext3.py and msgfmt3.py to python3-devel
83a5f52
Resolves: rhbz#1571474
83a5f52
4aa9ebc
* Fri Aug 17 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-7
4aa9ebc
- Backport TLS 1.3 related fixes to fix FTBFS
4aa9ebc
Resolves: rhbz#1609291
4aa9ebc
0b241ab
* Wed Aug 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-6
0b241ab
- Use RPM built wheels of pip and setuptools in ensurepip instead of our rewheel patch
0b241ab
da8bebd
* Fri Aug 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.7.0-5
da8bebd
- Fix wrong requirement on gdbm
da8bebd
37437e1
* Fri Jul 20 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-4
37437e1
- Allow to call Py_Main() after Py_Initialize()
37437e1
Resolves: rhbz#1595421
37437e1
266317a
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-3
266317a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
266317a
7a4ecff
* Thu Jul 12 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.7.0-2
7a4ecff
- Rebuild for new gdbm
7a4ecff
dc63bc7
* Wed Jun 27 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-1
dc63bc7
- Update to 3.7.0 final
dc63bc7
3ba1d1a
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.21.rc1
3ba1d1a
- Finish bootstrapping, enable rewheel, tests, optimizations
3ba1d1a
63f277f
* Tue Jun 12 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-0.20.rc1
63f277f
- Update to 3.7.0rc1
2266a26
- Bootstrap, disable rewheel, tests, optimizations
63f277f
e324bf2
* Mon Apr 23 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.5-4
e324bf2
- Fix multiprocessing regression on newer glibcs
e324bf2
- Enable test_multiprocessing_fork(server) and _spawn again
e324bf2
Resolves: rhbz#1569933
e324bf2
45a046d
* Thu Apr 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.5-3
45a046d
- Skip test_multiprocessing_fork(server) and _spawn for now
45a046d
8c67baf
* Wed Apr 18 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.5-2
8c67baf
- Add flatpackage conditionals
8c67baf
9a2e4be
* Thu Mar 29 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.5-1
9a2e4be
- Update to 3.6.5
9a2e4be
e8fa184
* Sat Mar 24 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.4-20
e8fa184
- Fix broken macro invocation and broken building of C Python extensions
e8fa184
Resolves: rhbz#1560103
e8fa184
545e680
* Fri Mar 16 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.4-19
545e680
- Add -n option for pathfix.py
545e680
Resolves: rhbz#1546990
545e680
e5f4159
* Thu Mar 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.4-18
e5f4159
- Fix the py_byte_compile macro to work on Python 2
e5f4159
- Remove the pybytecompile macro file from the flat package
e5f4159
Resolves: rhbz#1484993
e5f4159
c9bb114
* Tue Mar 13 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.4-17
c9bb114
- Do not send IP addresses in SNI TLS extension
c9bb114
347e968
* Sat Feb 24 2018 Florian Weimer <fweimer@redhat.com> - 3.6.4-16
347e968
- Rebuild with new LDFLAGS from redhat-rpm-config
347e968
3f778c4
* Wed Feb 21 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.4-15
3f778c4
- Filter out automatic /usr/bin/python3.X requirement,
3f778c4
  recommend the main package from libs instead
3f778c4
Resolves: rhbz#1547131
3f778c4
d938460
* Thu Feb 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.6.4-14
d938460
- Remove the python3-tools package (#rhbz 1312030)
d938460
- Move /usr/bin/2to3 to python3-devel
d938460
- Move /usr/bin/idle and idlelib to python3-idle
d938460
- Provide python3-tools from python3-idle
d938460
40b8f9e
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.6.4-13
40b8f9e
- Escape macros in %%changelog
40b8f9e
08ffd08
* Fri Feb 02 2018 Michal Cyprian <mcyprian@redhat.com> - 3.6.4-12
08ffd08
- Remove sys.executable check from change-user-install-location patch
08ffd08
Resolves: rhbz#1532287
08ffd08
969d514
* Thu Feb 01 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.4-11
969d514
- Define TLS cipher suite on build time.
969d514
be04920
* Wed Jan 31 2018 Tomas Orsava <torsava@redhat.com> - 3.6.4-10
be04920
- Disable test_gdb for all arches and test_buffer for ppc64le in anticipation
be04920
  of the F28 mass rebuild
be04920
- Re-enable these tests after the mass rebuild when they can be properly
be04920
  addressed
be04920
d623e92
* Tue Jan 23 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.4-9
d623e92
- Restore the PyExc_RecursionErrorInst public symbol
d623e92
ce6ec4f
* Tue Jan 23 2018 Björn Esser <besser82@fedoraproject.org> - 3.6.4-8
ce6ec4f
- Add patch to explicitly link _ctypes module with -ldl (#1537489)
ce6ec4f
- Refactored patch for libxcrypt
ce6ec4f
- Re-enable strict symbol checks in the link editor
ce6ec4f
5ea7bf4
* Mon Jan 22 2018 Björn Esser <besser82@fedoraproject.org> - 3.6.4-7
5ea7bf4
- Add patch for libxcrypt
5a8bf97
- Disable strict symbol checks in the link editor
5ea7bf4
085ae32
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 3.6.4-6
085ae32
- Rebuilt for switch to libxcrypt
085ae32
2602477
* Fri Jan 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.4-5
2602477
- Fix localeconv() encoding for LC_NUMERIC
2602477
57ec201
* Thu Jan 18 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.6.4-4
57ec201
- R: gdbm-devel → R: gdbm for python3-libs
57ec201
1a43a65
* Wed Jan 17 2018 Miro Hrončok <mhroncok@redhat.com> - 3.6.4-3
1a43a65
- Require large enough gdbm (fixup for previous bump)
1a43a65
6e38667
* Tue Jan 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.4-2
6e38667
- Rebuild for reverted gdbm 1.13 on Fedora 27
6e38667
0077a19
* Mon Jan 15 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.4-1
0077a19
- Update to version 3.6.4
0077a19
6ff303e
* Fri Jan 12 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.6.3-5
6ff303e
- Fix the compilation of the nis module.
6ff303e
1f528da
* Tue Nov 21 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.3-4
1f528da
- Raise the release of platform-python obsoletes for better maintainability
1f528da
e522c84
* Wed Nov 15 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.3-3
e522c84
- Obsolete platform-python and it's subpackages
e522c84
22b8f2b
* Mon Oct 09 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.3-2
22b8f2b
- Fix memory corruption due to allocator mix
22b8f2b
Resolves: rhbz#1498207
22b8f2b
47069ff
* Fri Oct 06 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.3-1
47069ff
- Update to Python 3.6.3
47069ff
71718b6
* Fri Sep 29 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.2-19
0652b06
- Move pathfix.py to bindir, https://github.com/fedora-python/python-rpm-porting/issues/24
71718b6
- Make the -devel package require redhat-rpm-config
71718b6
Resolves: rhbz#1496757
0652b06
Iryna Shcherbina 685fb7b
* Wed Sep 13 2017 Iryna Shcherbina <ishcherb@redhat.com> - 3.6.2-18
Iryna Shcherbina 685fb7b
- Fix /usr/bin/env dependency from python3-tools
Iryna Shcherbina 685fb7b
Resolves: rhbz#1482118
Iryna Shcherbina 685fb7b
Iryna Shcherbina 87e35ed
* Wed Sep 06 2017 Iryna Shcherbina <ishcherb@redhat.com> - 3.6.2-17
Iryna Shcherbina 87e35ed
- Include `-g` in the flags sent to the linker (LDFLAGS)
Iryna Shcherbina 87e35ed
Resolves: rhbz#1483222
Iryna Shcherbina 87e35ed
7d6b083
* Tue Sep 05 2017 Petr Viktorin <pviktori@redhat.com> - 3.6.2-16
7d6b083
- Specfile cleanup
7d6b083
- Make the main description also applicable to the SRPM
7d6b083
- Add audiotest.au to the test package
7d6b083
1acd7df
* Fri Sep 01 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.2-15
1acd7df
- Remove %%{pylibdir}/Tools/scripts/2to3
1acd7df
33e1101
* Fri Sep 01 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.2-14
33e1101
- Expat >= 2.1.0 is everywhere, remove explicit requires
51501f9
- Conditionalize systemtap-devel BuildRequires
5f24f39
- For consistency, require /usr/sbin/ifconfig instead of net-tools
33e1101
d27ccf6
* Mon Aug 28 2017 Petr Viktorin <pviktori@redhat.com> - 3.6.2-13
d27ccf6
- Rename patch files to be consistent
96a7bd5
- Run autotools to generate the configure script before building
2c6abcc
- Merge lib64 patches (104 into 102)
bbf2225
- Skip test_bdist_rpm using test config rather than a patch (removes patch 137)
d8970d7
- Remove patches 157 and 186, which had test changes left over after upstreaming
ac06dea
- Remove patch 188, a temporary workaround for hashlib tests
357f40b
- Merge patches 180, 206, 243, 5001 (architecture naming) into new patch 274
357f40b
- Move python2-tools conflicts to tools subpackage (it was wrongly in tkinter)
d27ccf6
eef42fd
* Mon Aug 28 2017 Michal Cyprian <mcyprian@redhat.com> - 3.6.2-12
eef42fd
- Use python3 style of calling super() without arguments in rpath
eef42fd
  patch to prevent recursion in UnixCCompiler subclasses
eef42fd
Resolves: rhbz#1458122
eef42fd
a7a170b
* Mon Aug 21 2017 Petr Viktorin <pviktori@redhat.com> - 3.6.2-11
a7a170b
- Add bcond for --without optimizations
c2f8719
- Reword package descriptions
c2f8719
- Remove Group declarations