churchyard / rpms / python3

Forked from rpms/python3 3 years ago
Clone

Blame python3.spec

c769a6b
# ======================================================
c769a6b
# Conditionals and other variables controlling the build
c769a6b
# ======================================================
c769a6b
b689767
# NOTES ON BOOTSTRAPING PYTHON 3.6:
Matej Stuchlik 95668bd
#
afb0016
# Due to a dependency cycle between Python, gdb, rpm, pip, setuptools, wheel,
afb0016
# and other packages, in order to rebase Python 3 one has to build in the
afb0016
# following order:
Matej Stuchlik 95668bd
#
bb9ca6b
# 1. At the same time:
bb9ca6b
#     - gdb without python support (add %%global _without_python 1 on top of gdb's SPEC file)
bb9ca6b
#     - python-rpm-generators with bootstrapping_python set to 1
bb9ca6b
#       (this can be done also during step 2., but should be done before 3.)
afb0016
# 2. python3 with with_rewheel set to 0
bb9ca6b
# 3. At the same time:
bb9ca6b
#     - gdb with python support (remove %%global _without_python 1 on top of gdb's SPEC file)
bb9ca6b
#     - python-rpm-generators with bootstrapping_python set to 0
bb9ca6b
#       (this can be done at any later step without negative effects)
afb0016
# 4. rpm
afb0016
# 5. python-setuptools with bootstrap set to 1
afb0016
# 6. python-pip with build_wheel set to 0
afb0016
# 7. python-wheel with %%bcond_without bootstrap
afb0016
# 8. python-setuptools with bootstrap set to 0 and also with_check set to 0
afb0016
# 9. python-pip with build_wheel set to 1
afb0016
# 10. pyparsing
afb0016
# 11. python3 with with_rewheel set to 1
eefe139
#
afb0016
# Then the most important packages have to be built, starting from their
afb0016
# various leaf dependencies recursively. After these have been built, a
afb0016
# targeted rebuild should be requested for the rest.
afb0016
#
afb0016
# Currently these packages are recommended to have been built before a targeted
afb0016
# rebuild after a python abi change:
afb0016
#   python-sphinx, pytest, python-requests, cloud-init, dnf, anaconda, abrt
Matej Stuchlik 95668bd
efda0ca
%global with_rewheel 1
Matej Stuchlik 11fb599
b689767
%global pybasever 3.6
5080ffc
5080ffc
# pybasever without the dot:
b689767
%global pyshortver 36
5080ffc
a3483f9
%global pylibdir %{_libdir}/python%{pybasever}
4aab458
%global dynload_dir %{pylibdir}/lib-dynload
a3483f9
5080ffc
# SOABI is defined in the upstream configure.in from Python-3.2a2 onwards,
5080ffc
# for PEP 3149:
5080ffc
#   http://www.python.org/dev/peps/pep-3149/
5080ffc
1c94c1a
# ("configure.in" became "configure.ac" in Python 3.3 onwards, and in
1c94c1a
# backports)
1c94c1a
5080ffc
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
1c94c1a
# With Python 3.3, we lose the "u" suffix due to PEP 393
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
Robert Kuska 08f3736
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu}
Robert Kuska 08f3736
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu}
5080ffc
7eb10c8
# All bytecode files are now in a __pycache__ subdirectory, with a name
7eb10c8
# reflecting the version of the bytecode (to permit sharing of python libraries
7eb10c8
# between different runtimes)
7eb10c8
# See http://www.python.org/dev/peps/pep-3147/
7eb10c8
# For example,
7eb10c8
#   foo/bar.py
7eb10c8
# now has bytecode at:
1c8e9a6
#   foo/__pycache__/bar.cpython-36.pyc
1c8e9a6
#   foo/__pycache__/bar.cpython-36.opt-1.pyc
1c8e9a6
#	foo/__pycache__/bar.cpython-36.opt-2.pyc
1c8e9a6
%global bytecode_suffixes .cpython-36*.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
815994f
%global with_debug_build 1
815994f
b2154fa
%global with_gdb_hooks 1
b2154fa
e9db5d3
%global with_systemtap 0
c969609
31a06df
# some arches don't have valgrind so we need to disable its support on them
05c99bb
%ifnarch s390 %{mips} riscv64
31a06df
%global with_valgrind 1
31a06df
%else
31a06df
%global with_valgrind 0
31a06df
%endif
31a06df
9b8d221
%global with_gdbm 1
5fe31d8
91b7804
# Change from yes to no to turn this off
91b7804
%global with_computed_gotos yes
91b7804
a5cef79
# Turn this to 0 to turn off the "check" phase:
ace4eac
%global run_selftest_suite 1
a5cef79
a3483f9
# We want to byte-compile the .py files within the packages using the new
a3483f9
# python3 binary.
Robert Kuska a0e3ab8
#
a3483f9
# Unfortunately, rpmbuild's infrastructure requires us to jump through some
a3483f9
# hoops to avoid byte-compiling with the system python 2 version:
a3483f9
#   /usr/lib/rpm/redhat/macros sets up build policy that (amongst other things)
a3483f9
# defines __os_install_post.  In particular, "brp-python-bytecompile" is
a3483f9
# invoked without an argument thus using the wrong version of python
a3483f9
# (/usr/bin/python, rather than the freshly built python), thus leading to
a3483f9
# numerous syntax errors, and incorrect magic numbers in the .pyc files.  We
a3483f9
# thus override __os_install_post to avoid invoking this script:
Matej Stuchlik 516eb7a
%global __os_install_post /usr/lib/rpm/brp-compress \
Matej Stuchlik 516eb7a
  %{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
Matej Stuchlik 516eb7a
  /usr/lib/rpm/brp-strip-static-archive %{__strip} \
Matej Stuchlik 516eb7a
  /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
Robert Kuska a0e3ab8
  /usr/lib/rpm/brp-python-hardlink
a3483f9
# to remove the invocation of brp-python-bytecompile, whilst keeping the
a3483f9
# invocation of brp-python-hardlink (since this should still work for python3
a3483f9
# pyc/pyo files)
a3483f9
7eb10c8
c769a6b
# ==================
c769a6b
# Top-level metadata
c769a6b
# ==================
a3483f9
Summary: Version 3 of the Python programming language aka Python 3000
a3483f9
Name: python3
4ff2113
Version: %{pybasever}.2
7ce2b35
Release: 5%{?dist}
a3483f9
License: Python
a3483f9
Group: Development/Languages
c769a6b
c769a6b
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
5974f19
5974f19
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
5974f19
# it (in pyexpat) in order to enable the fix in Python-3.2.3 for CVE-2012-0876:
5974f19
BuildRequires: expat-devel >= 2.1.0
5974f19
c769a6b
BuildRequires: findutils
c769a6b
BuildRequires: gcc-c++
5fe31d8
%if %{with_gdbm}
c769a6b
BuildRequires: gdbm-devel
5fe31d8
%endif
c769a6b
BuildRequires: glibc-devel
c769a6b
BuildRequires: gmp-devel
c769a6b
BuildRequires: libffi-devel
c769a6b
BuildRequires: libGL-devel
c769a6b
BuildRequires: libX11-devel
c769a6b
BuildRequires: ncurses-devel
de14a01
# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig)
de14a01
BuildRequires: net-tools
c769a6b
BuildRequires: openssl-devel
c769a6b
BuildRequires: pkgconfig
c769a6b
BuildRequires: readline-devel
c769a6b
BuildRequires: sqlite-devel
860f392
BuildRequires: desktop-file-utils
860f392
BuildRequires: libappstream-glib
c769a6b
c769a6b
BuildRequires: systemtap-sdt-devel
af1b222
BuildRequires: systemtap-devel
c769a6b
# (this introduces a dependency on "python", in that systemtap-sdt-devel's
c769a6b
# /usr/bin/dtrace is a python 2 script)
c769a6b
%global tapsetdir      /usr/share/systemtap/tapset
c769a6b
c769a6b
BuildRequires: tar
c769a6b
BuildRequires: tcl-devel
c769a6b
BuildRequires: tix-devel
c769a6b
BuildRequires: tk-devel
c769a6b
c769a6b
%if 0%{?with_valgrind}
c769a6b
BuildRequires: valgrind-devel
c769a6b
%endif
c769a6b
f2b86e2
BuildRequires: xz-devel
c769a6b
BuildRequires: zlib-devel
c769a6b
Matej Stuchlik 11fb599
%if 0%{?with_rewheel}
Matej Stuchlik 11fb599
BuildRequires: python3-setuptools
Matej Stuchlik 11fb599
BuildRequires: python3-pip
Matej Stuchlik 11fb599
%endif
Matej Stuchlik 11fb599
c769a6b
c769a6b
# =======================
c769a6b
# Source code and patches
c769a6b
# =======================
c769a6b
Iryna Shcherbina b603b2d
Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
a3483f9
4aab458
# Supply an RPM macro "py_byte_compile" for the python3-devel subpackage
4aab458
# to enable specfiles to selectively byte-compile individual files and paths
4aab458
# with different Python runtimes as necessary:
Matej Stuchlik 318f360
Source3: macros.pybytecompile%{pybasever}
4aab458
c969609
# Systemtap tapset to make it easier to use the systemtap static probes
c969609
# (actually a template; LIBRARY_PATH will get fixed up during install)
c969609
# Written by dmalcolm; not yet sent upstream
c969609
Source5: libpython.stp
c969609
c969609
# Example systemtap script using the tapset
c969609
# Written by wcohen, mjw, dmalcolm; not yet sent upstream
c969609
Source6: systemtap-example.stp
c969609
71040c9
# Another example systemtap script that uses the tapset
71040c9
# Written by dmalcolm; not yet sent upstream
71040c9
Source7: pyfuntop.stp
71040c9
3dbbc14
# A simple script to check timestamps of bytecode files
3dbbc14
# Run in check section with Python that is currently being built
3dbbc14
# Written by bkabrda
3dbbc14
Source8: check-pyc-and-pyo-timestamps.py
71040c9
60aba0a
# A simple macro that enables packages to require system-python(abi) instead of python(abi)
60aba0a
Source9: macros.systempython
60aba0a
860f392
# Desktop menu entry for idle3
860f392
Source10: idle3.desktop
860f392
860f392
# AppData file for idle3
860f392
Source11: idle3.appdata.xml
860f392
a3483f9
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
a3483f9
# Was Patch0 in ivazquez' python3000 specfile:
a3483f9
Patch1:         Python-3.1.1-rpath.patch
a3483f9
6b34963
# 00055 #
c969609
# Systemtap support: add statically-defined probe points
1c94c1a
# Patch sent upstream as http://bugs.python.org/issue14776
62d7207
# with some subsequent reworking to cope with LANG=C in an rpmbuild
62d7207
# (where sys.getfilesystemencoding() == 'ascii')
c923b51
Patch55: 00055-systemtap.patch
c969609
bf35167
Patch102: 00102-lib64.patch
a3483f9
6b34963
# 00104 #
c923b51
# Only used when "%{_lib}" == "lib64"
c923b51
# Another lib64 fix, for distutils/tests/test_install.py; not upstream:
c923b51
Patch104: 00104-lib64-fix-for-test_install.patch
c923b51
6b34963
# 00111 #
c923b51
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
c923b51
# a libpythonMAJOR.MINOR.a (bug 550692):
bbb5084
# Downstream only: not appropriate for upstream
c923b51
Patch111: 00111-no-static-lib.patch
c923b51
6b34963
# 00132 #
0c8875f
# Add non-standard hooks to unittest for use in the "check" phase below, when
0c8875f
# running selftests within the build:
0c8875f
#   @unittest._skipInRpmBuild(reason)
0c8875f
# for tests that hang or fail intermittently within the build environment, and:
0c8875f
#   @unittest._expectedFailureInRpmBuild
0c8875f
# for tests that always fail within the build environment
0c8875f
#
0c8875f
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the
0c8875f
# environment, which we set manually in the appropriate portion of the "check"
0c8875f
# phase below (and which potentially other python-* rpms could set, to reuse
0c8875f
# these unittest hooks in their own "check" phases)
0c8875f
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
0c8875f
6b34963
# 00133 #
0c8875f
# 00133-skip-test_dl.patch is not relevant for python3: the "dl" module no
0c8875f
# longer exists
0c8875f
6b34963
# 00137 #
0c8875f
# Some tests within distutils fail when run in an rpmbuild:
0c8875f
Patch137: 00137-skip-distutils-tests-that-fail-in-rpmbuild.patch
0c8875f
6b34963
# 00146 #
b8f92b4
# Support OpenSSL FIPS mode (e.g. when OPENSSL_FORCE_FIPS_MODE=1 is set)
b8f92b4
# - handle failures from OpenSSL (e.g. on attempts to use MD5 in a
b8f92b4
#   FIPS-enforcing environment)
b8f92b4
# - add a new "usedforsecurity" keyword argument to the various digest
b8f92b4
#   algorithms in hashlib so that you can whitelist a callsite with
b8f92b4
#   "usedforsecurity=False"
b8f92b4
# (sent upstream for python 3 as http://bugs.python.org/issue9216 ; see RHEL6
b8f92b4
# python patch 119)
b8f92b4
# - enforce usage of the _hashlib implementation: don't fall back to the _md5
b8f92b4
#   and _sha* modules (leading to clearer error messages if fips selftests
b8f92b4
#   fail)
b8f92b4
# - don't build the _md5 and _sha* modules; rely on the _hashlib implementation
b8f92b4
#   of hashlib
b8f92b4
# (rhbz#563986)
61fd48d
# Note: Up to Python 3.4.0.b1, upstream had their own implementation of what
61fd48d
# they assumed would become sha3. This patch was adapted to give it the
61fd48d
# usedforsecurity argument, even though it did nothing (OpenSSL didn't have
61fd48d
# sha3 implementation at that time).In 3.4.0.b2, sha3 implementation was reverted
61fd48d
# (see http://bugs.python.org/issue16113), but the alterations were left in the
61fd48d
# patch, since they may be useful again if upstream decides to rerevert sha3
61fd48d
# implementation and OpenSSL still doesn't support it. For now, they're harmless.
b8f92b4
Patch146: 00146-hashlib-fips.patch
b8f92b4
6b34963
# 00155 #
8a28107
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
8a28107
# generating SELinux denials on "import ctypes" and "import uuid" when
8a28107
# embedding Python within httpd (rhbz#814391)
8a28107
Patch155: 00155-avoid-ctypes-thunks.patch
8a28107
7989368
# 00157 #
7989368
# Update uid/gid handling throughout the standard library: uid_t and gid_t are
7989368
# unsigned 32-bit values, but existing code often passed them through C long
7989368
# values, which are signed 32-bit values on 32-bit architectures, leading to
7989368
# negative int objects for uid/gid values >= 2^31 on 32-bit architectures.
7989368
#
7989368
# Introduce _PyObject_FromUid/Gid to convert uid_t/gid_t values to python
7989368
# objects, using int objects where the value will fit (long objects otherwise),
7989368
# and _PyArg_ParseUid/Gid to convert int/long to uid_t/gid_t, with -1 allowed
7989368
# as a special case (since this is given special meaning by the chown syscall)
7989368
#
7989368
# Update standard library to use this throughout for uid/gid values, so that
7989368
# very large uid/gid values are round-trippable, and -1 remains usable.
7989368
# (rhbz#697470)
7989368
Patch157: 00157-uid-gid-overflows.patch
7989368
823581e
# 00160 #
3b4dd24
# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the
3b4dd24
# header files in the build chroot, but may not be supported in the running
3b4dd24
# kernel, hence we disable this test in an rpm build.
3b4dd24
# Adding these was upstream issue http://bugs.python.org/issue10142
3b4dd24
# Not yet sent upstream
823581e
Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
3b4dd24
48d2048
# 00163 #
48d2048
# Some tests within test_socket fail intermittently when run inside Koji;
48d2048
# disable them using unittest._skipInRpmBuild
48d2048
# Not yet sent upstream
48d2048
Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch
48d2048
Robert Kuska a0e3ab8
# 00170 #
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)
Robert Kuska a0e3ab8
# Backported to 2.7 from a patch I sent upstream for py3k
Robert Kuska a0e3ab8
#   http://bugs.python.org/issue9263  (rhbz#614680)
Robert Kuska a0e3ab8
# hiding the proposed new macros/functions within gcmodule.c to avoid exposing
Robert Kuska a0e3ab8
# them within the extension API.
Robert Kuska 86a9a20
# (rhbz#850013
Robert Kuska 86a9a20
Patch170: 00170-gc-assertions.patch
260ceea
5023236
# 00178 #
5023236
# Don't duplicate various FLAGS in sysconfig values
5023236
# http://bugs.python.org/issue17679
5023236
# Does not affect python2 AFAICS (different sysconfig values initialization)
5023236
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
e721470
f9db6e6
# 00180 #
f9db6e6
# Enable building on ppc64p7
f9db6e6
# Not appropriate for upstream, Fedora-specific naming
f9db6e6
Patch180: 00180-python-add-support-for-ppc64p7.patch
f9db6e6
3dbbc14
# 00186 #
3dbbc14
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1023607
f5250ec
# Previously, this fixed a problem where some *.py files were not being
f5250ec
# bytecompiled properly during build. This was result of py_compile.compile
f5250ec
# raising exception when trying to convert test file with bad encoding, and
f5250ec
# thus not continuing bytecompilation for other files.
f5250ec
# This was fixed upstream, but the test hasn't been merged yet, so we keep it
3dbbc14
Patch186: 00186-dont-raise-from-py_compile.patch
3dbbc14
0153564
# 00188 #
0153564
# Downstream only patch that should be removed when we compile all guaranteed
0153564
# hashlib algorithms properly. The problem is this:
0153564
# - during tests, test_hashlib is imported and executed before test_lib2to3
0153564
# - if at least one hash function has failed, trying to import it triggers an
0153564
#   exception that is being caught and exception is logged:
0153564
#   http://hg.python.org/cpython/file/2de806c8b070/Lib/hashlib.py#l217
0153564
# - logging the exception makes logging module run basicConfig
0153564
# - when lib2to3 tests are run again, lib2to3 runs basicConfig again, which
0153564
#   doesn't do anything, because it was run previously
0153564
#   (logging.root.handlers != []), which means that the default setup
0153564
#   (most importantly logging level) is not overriden. That means that a test
0153564
#   relying on this will fail (test_filename_changing_on_output_single_dir)
0153564
Patch188: 00188-fix-lib2to3-tests-when-hashlib-doesnt-compile-properly.patch
0153564
Matej Stuchlik 11fb599
# 00189 #
Matej Stuchlik 11fb599
# Add the rewheel module, allowing to recreate wheels from already installed
Matej Stuchlik 11fb599
# ones
Matej Stuchlik 11fb599
# https://github.com/bkabrda/rewheel
Matej Stuchlik 11fb599
Patch189: 00189-add-rewheel-module.patch
486eb43
3702d0d
# 00205 #
Robert Kuska a52deaa
# LIBPL variable in makefile takes LIBPL from configure.ac
Robert Kuska a52deaa
# but the LIBPL variable defined there doesn't respect libdir macro
Robert Kuska a52deaa
Patch205: 00205-make-libpl-respect-lib64.patch
Robert Kuska a52deaa
3702d0d
# 00206 #
Robert Kuska 08f3736
# Remove hf flag from arm triplet which is used
Robert Kuska 08f3736
# by debian but fedora infra uses only eabi without hf
Robert Kuska 08f3736
Patch206: 00206-remove-hf-from-arm-triplet.patch
Robert Kuska 08f3736
77a5f91
# 00243 #
4bc70e0
# Fix the triplet used on 64-bit MIPS
4bc70e0
# rhbz#1322526: https://bugzilla.redhat.com/show_bug.cgi?id=1322526
4bc70e0
# Upstream uses Debian-like style mips64-linux-gnuabi64
4bc70e0
# Fedora needs the default mips64-linux-gnu
77a5f91
Patch243: 00243-fix-mips64-triplet.patch
4bc70e0
332b947
# 00251
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
332b947
# is not detected to make pip and distutils install into separate location
46034c8
# Fedora Change: https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
332b947
Patch251: 00251-change-user-install-location.patch
332b947
ef5c6fe
# 00252
ef5c6fe
# Add executable option to install.py command to make it work for
ef5c6fe
# scripts specified as an entry_points
46034c8
# Reported upstream: https://bugs.python.org/issue29411
ef5c6fe
Patch252: 00252-add-executable-option.patch
ef5c6fe
3b36b49
# 00262 #
3b36b49
# Backport of PEP 538: Coercing the legacy C locale to a UTF-8 based locale
3b36b49
# https://www.python.org/dev/peps/pep-0538/
3b36b49
# Fedora Change: https://fedoraproject.org/wiki/Changes/python3_c.utf-8_locale
3b36b49
# Original proposal: https://bugzilla.redhat.com/show_bug.cgi?id=1404918
3b36b49
Patch262: 00262-pep538_coerce_legacy_c_locale.patch
3b36b49
27c558e
# 00264 #
27c558e
# test_pass_by_value was added in Python 3.6.1 and on aarch64
27c558e
# it is catching an error that was there, but wasn't tested before.
27c558e
# Therefore skipping the test on aarch64 until fixed upstream.
27c558e
# Reported upstream: http://bugs.python.org/issue29804
27c558e
Patch264: 00264-skip-test-failing-on-aarch64.patch
27c558e
b5403ba
# 00270 #
b5403ba
# Fix test_alpn_protocols from test_ssl as openssl > 1.1.0f
b5403ba
# changed the behaviour of the ALPN hook.
b5403ba
# Fixed upstream: http://bugs.python.org/issue30714
b5403ba
Patch270: 00270-fix-ssl-alpn-hook-test.patch
b5403ba
3a226ae
# 00271 #
3a226ae
# Make test_asyncio to not depend on the current signal handler
3a226ae
# as this can make it hang on koji, since it ignores SIGHUP.
3a226ae
# Reported upstream: http://bugs.python.org/issue31034
3a226ae
Patch271: 00271-asyncio-get-default-signal-handler.patch
3a226ae
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
0efd3d3
# add correct arch for ppc64/ppc64le
0efd3d3
# it should be ppc64le-linux-gnu/ppc64-linux-gnu instead powerpc64le-linux-gnu/powerpc64-linux-gnu
0efd3d3
Patch5001: python3-powerppc-arch.patch
0efd3d3
a3483f9
BuildRoot: %{_tmppath}/%{name}-%{version}-root
a3483f9
c769a6b
# ======================================================
c769a6b
# Additional metadata, and subpackages
c769a6b
# ======================================================
c969609
efda0ca
URL: https://www.python.org/
a3483f9
a3483f9
# See notes in bug 532118:
a3483f9
Provides: python(abi) = %{pybasever}
a3483f9
26c1be5
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
26c1be5
1768987
# In order to support multiple python interpreters, apart from the system python3,
1768987
# for development purposes, new packages were introduced which can be installed in parallel
1768987
# with the main python3 package (e.g. 1369688), with the naming scheme 'python<version>',
1768987
# however in order to keep the upgrade path clean we need to Obsolete and Provide
1768987
# these packages at the main python3 package.
1768987
Obsoletes: python%{pyshortver}
1768987
Provides: python%{pyshortver} = %{version}-%{release}
1768987
Matej Stuchlik f498010
%if 0%{with_rewheel}
f30edc5
Requires: python3-setuptools
f30edc5
Requires: python3-pip
Matej Stuchlik f498010
%endif
Matej Stuchlik f498010
a3483f9
%description
6245861
Python is an interpreted, interactive, object-oriented programming
6245861
language often compared to Tcl, Perl, Scheme or Java. Python includes
6245861
modules, classes, exceptions, very high level dynamic data types
6245861
and dynamic typing. Python supports interfaces to many system calls and
6245861
libraries, as well as to various windowing systems (X11, Motif, Tk,
6245861
Mac and MFC).
6245861
6245861
Programmers can write new built-in modules for Python in C or C++.
6245861
Python can be used as an extension language for applications that
6245861
need a programmable interface.
6245861
6245861
Note that documentation for Python is provided in the python3-docs package.
6245861
6245861
This package provides the "python3" executable; most of the actual
6245861
implementation is within the "python3-libs" and "system-python-libs" packages.
a3483f9
a3483f9
%package libs
6245861
Summary:        Python runtime libraries
a3483f9
Group:          Development/Libraries
d80b542
# For Modularity purpose we need not to include the dist-tag int he dependency
bbccd64
%if %(d="%{?dist}"; [ "${d#module-base-runtime-}x" != "${d}x" ] && echo 1 || echo 0)
d80b542
Requires:       system-python-libs%{?_isa} = %{version}
d80b542
%else
Igor Gnatenko adf44e0
Requires:       system-python-libs%{?_isa} = %{version}-%{release}
d80b542
%endif
a3483f9
5974f19
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
5974f19
# this symbol (in pyexpat), so we must explicitly state this dependency to
5974f19
# prevent "import pyexpat" from failing with a linker error if someone hasn't
5974f19
# yet upgraded expat:
5974f19
Requires: expat >= 2.1.0
Robert Kuska 82c3cee
Provides: python3-enum34 = 1.0.4-5%{?dist}
Robert Kuska 82c3cee
Obsoletes: python3-enum34 < 1.0.4-5%{?dist}
5974f19
a3483f9
%description libs
6245861
This package contains runtime libraries for use by Python:
6245861
- the libpython dynamic library, for use by applications that embed Python as
6245861
a scripting language, and by the main "python3" executable
6245861
- the Python standard library
a3483f9
60aba0a
%package -n system-python
60aba0a
Summary:        System Python executable
60aba0a
Group:          Development/Libraries
60aba0a
Requires:       system-python-libs%{?_isa} = %{version}-%{release}
60aba0a
Provides:       system-python(abi) = %{pybasever}
60aba0a
60aba0a
%description -n system-python
60fd88f
System Python provides a binary interpreter which uses system-python-libs,
60fd88f
a subset of standard Python library considered essential to run various tools,
ca48cc1
requiring Python, that consider themselves "system tools".
60aba0a
60aba0a
%package -n system-python-libs
60aba0a
Summary:        System Python runtime libraries
60aba0a
Group:          Development/Libraries
60aba0a
60aba0a
%define __requires_exclude ^(/usr/bin/python3.*|python\\(abi\\) = 3\\..*)$
60aba0a
60aba0a
Requires: expat >= 2.1.0
a5e3562
# Python 3 built with glibc >= 2.24.90-26 needs to require it (rhbz#1410644).
ae0e9fd
Requires: glibc%{?_isa} >= 2.24.90-26
60aba0a
60aba0a
%description -n system-python-libs
60aba0a
This package contains files used to embed System Python into applications.
60aba0a
a3483f9
%package devel
6245861
Summary: Libraries and header files needed for Python development
a3483f9
Group: Development/Libraries
c75d3be
Requires: %{name} = %{version}-%{release}
c75d3be
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Orion Poplawski 1eeebcf
BuildRequires: python-rpm-macros
Orion Poplawski 1eeebcf
Requires: python-rpm-macros
Orion Poplawski 1eeebcf
Requires: python3-rpm-macros
bb9ca6b
Requires: python3-rpm-generators
a3483f9
Conflicts: %{name} < %{version}-%{release}
a3483f9
a3483f9
%description devel
6245861
The Python programming language's interpreter can be extended with
6245861
dynamically loaded extensions and can be embedded in other programs.
6245861
This package contains the header files and libraries needed to do
6245861
these types of tasks.
6245861
6245861
Install python3-devel if you want to develop Python extensions. The
6245861
python3 package will also need to be installed.  You'll probably also
6245861
want to install the python3-docs package, which contains Python
6245861
documentation.
a3483f9
a3483f9
%package tools
6245861
Summary: A collection of tools included with Python
a3483f9
Group: Development/Tools
a3483f9
Requires: %{name} = %{version}-%{release}
a3483f9
Requires: %{name}-tkinter = %{version}-%{release}
a3483f9
a3483f9
%description tools
6245861
This package contains several tools included with Python
a3483f9
a3483f9
%package tkinter
6245861
Summary: A GUI toolkit for Python
a3483f9
Group: Development/Languages
a3483f9
Requires: %{name} = %{version}-%{release}
a3483f9
a3483f9
%description tkinter
6245861
The Tkinter (Tk interface) program is a graphical user interface for
a3483f9
the Python scripting language.
a3483f9
a3483f9
%package test
6245861
Summary: The test modules from the main python3 package
a3483f9
Group: Development/Languages
a3483f9
Requires: %{name} = %{version}-%{release}
a3483f9
Requires: %{name}-tools = %{version}-%{release}
a3483f9
a3483f9
%description test
a3483f9
The test modules from the main %{name} package.
a3483f9
These are in a separate package to save space, as they are almost never used
a3483f9
in production.
a3483f9
a3483f9
You might want to install the python3-test package if you're developing
6245861
python code that uses more than just unittest and/or test_support.py.
a3483f9
815994f
%if 0%{?with_debug_build}
55cf580
%package debug
6245861
Summary: Debug version of the Python runtime
55cf580
Group: Applications/System
55cf580
55cf580
# The debug build is an all-in-one package version of the regular build, and
55cf580
# 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}
55cf580
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
55cf580
55cf580
%description debug
6245861
python3-debug provides a version of the Python runtime with numerous debugging
55cf580
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,
55cf580
but is useful for tracking down reference-counting issues, and other bugs.
55cf580
55cf580
The bytecodes are unchanged, so that .pyc files are compatible between the two
6245861
versions of Python, but the debugging features mean that C/C++ extension
55cf580
modules are ABI-incompatible with those built for the standard runtime.
55cf580
6245861
It shares installation directories with the standard Python runtime, so that
6245861
.py and .pyc files can be shared. All compiled extension modules gain a "_d"
6245861
suffix ("foo_d.so" rather than "foo.so") so that each Python implementation
55cf580
can load its own extensions.
7eb10c8
%endif # with_debug_build
55cf580
c769a6b
# ======================================================
c769a6b
# The prep phase of the build:
c769a6b
# ======================================================
c769a6b
a3483f9
%prep
f5250ec
%setup -q -n Python-%{version}%{?prerel}
6859f23
c969609
%if 0%{?with_systemtap}
c969609
# Provide an example of usage of the tapset:
c969609
cp -a %{SOURCE6} .
71040c9
cp -a %{SOURCE7} .
c969609
%endif # with_systemtap
c969609
1ae4dd3
# Ensure that we're using the system copy of various libraries, rather than
1ae4dd3
# copies shipped by upstream in the tarball:
1ae4dd3
#   Remove embedded copy of expat:
1ae4dd3
rm -r Modules/expat || exit 1
1ae4dd3
1ae4dd3
#   Remove embedded copy of zlib:
1ae4dd3
rm -r Modules/zlib || exit 1
1ae4dd3
f7bd058
## Disabling hashlib patch for now as it needs to be reimplemented
f7bd058
## for OpenSSL 1.1.0.
b8f92b4
# Don't build upstream Python's implementation of these crypto algorithms;
b8f92b4
# instead rely on _hashlib and OpenSSL.
b8f92b4
#
b8f92b4
# For example, in our builds hashlib.md5 is implemented within _hashlib via
b8f92b4
# OpenSSL (and thus respects FIPS mode), and does not fall back to _md5
b282179
# TODO: there seems to be no OpenSSL support in Python for sha3 so far
b282179
# when it is there, also remove _sha3/ dir
f7bd058
#for f in md5module.c sha1module.c sha256module.c sha512module.c; do
f7bd058
#    rm Modules/$f
f7bd058
#done
b8f92b4
Matej Stuchlik 8f7e215
%if 0%{with_rewheel}
ddb16c6
%global pip_version 9.0.1
Matej Stuchlik 8f7e215
sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/ensurepip/__init__.py
Matej Stuchlik 8f7e215
%endif
Matej Stuchlik 8f7e215
1ae4dd3
#
1ae4dd3
# Apply patches:
1ae4dd3
#
7eb10c8
%patch1 -p1
7eb10c8
c969609
%if 0%{?with_systemtap}
c923b51
%patch55 -p1 -b .systemtap
c969609
%endif
a3483f9
a3483f9
%if "%{_lib}" == "lib64"
7eb10c8
%patch102 -p1
c923b51
%patch104 -p1
a3483f9
%endif
Robert Kuska 7035fe2
%patch111 -p1
0c8875f
%patch132 -p1
0c8875f
%patch137 -p1
f7bd058
#patch146 -p1
8a28107
%patch155 -p1
7989368
%patch157 -p1
823581e
%patch160 -p1
48d2048
%patch163 -p1
0424a4f
%patch170 -p1
5023236
%patch178 -p1
f9db6e6
%patch180 -p1
3dbbc14
%patch186 -p1
0153564
%patch188 -p1
0c8875f
Matej Stuchlik 11fb599
%if 0%{with_rewheel}
Matej Stuchlik 11fb599
%patch189 -p1
Matej Stuchlik 11fb599
%endif
Matej Stuchlik 11fb599
Robert Kuska a52deaa
%patch205 -p1
Robert Kuska 08f3736
%patch206 -p1
77a5f91
%patch243 -p1
332b947
%patch251 -p1
ef5c6fe
%patch252 -p1
3b36b49
%patch262 -p1
0c8875f
Iryna Shcherbina aba719b
%ifarch aarch64
Iryna Shcherbina aba719b
%patch264 -p1
Iryna Shcherbina aba719b
%endif
Iryna Shcherbina aba719b
b5403ba
%patch270 -p1
3a226ae
%patch271 -p1
27c558e
a9e268f
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
a9e268f
# are many differences between 2.6 and the Python 3 library.
a9e268f
#
a9e268f
# Fix up the URLs within pydoc to point at the documentation for this
a9e268f
# MAJOR.MINOR version:
a9e268f
#
a9e268f
sed --in-place \
a9e268f
    --expression="s|http://docs.python.org/library|http://docs.python.org/%{pybasever}/library|g" \
a9e268f
    Lib/pydoc.py || exit 1
a3483f9
0efd3d3
%patch5001 -p1
0efd3d3
c769a6b
# ======================================================
c769a6b
# Configuring and building the code:
c769a6b
# ======================================================
c769a6b
a3483f9
%build
55cf580
topdir=$(pwd)
5c9590b
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
5c9590b
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
a3483f9
export CPPFLAGS="`pkg-config --cflags-only-I libffi`"
5c9590b
export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
a3483f9
export LINKCC="gcc"
a3483f9
export CFLAGS="$CFLAGS `pkg-config --cflags openssl`"
8a69a67
export LDFLAGS="$RPM_LD_FLAGS `pkg-config --libs-only-L openssl`"
a3483f9
e3c54b7
55cf580
# Define a function, for how to perform a "build" of python for a given
55cf580
# configuration:
55cf580
BuildPython() {
Robert Kuska a0e3ab8
  ConfName=$1
55cf580
  BinaryName=$2
55cf580
  SymlinkName=$3
55cf580
  ExtraConfigArgs=$4
55cf580
  PathFixWithThisBinary=$5
Matej Stuchlik 318f360
  MoreCFlags=$6
55cf580
55cf580
  ConfDir=build/$ConfName
55cf580
55cf580
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName
55cf580
  mkdir -p $ConfDir
55cf580
55cf580
  pushd $ConfDir
55cf580
55cf580
  # Use the freshly created "configure" script, but in the directory two above:
55cf580
  %global _configure $topdir/configure
55cf580
c969609
%configure \
c969609
  --enable-ipv6 \
c969609
  --enable-shared \
ecc5705
  --with-computed-gotos=%{with_computed_gotos} \
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 \
c969609
%if 0%{?with_systemtap}
1c94c1a
  --with-systemtap \
c969609
%endif
31a06df
%if 0%{?with_valgrind}
31a06df
  --with-valgrind \
31a06df
%endif
55cf580
  $ExtraConfigArgs \
55cf580
  %{nil}
c969609
5659c63
  # Set EXTRA_CFLAGS to our CFLAGS (rather than overriding OPT, as we've done
5659c63
  # in the past).
5659c63
  # This should fix a problem with --with-valgrind where it adds
5659c63
  #   -DDYNAMIC_ANNOTATIONS_ENABLED=1
5659c63
  # to OPT which must be passed to all compilation units in the build,
5659c63
  # otherwise leading to linker errors, e.g.
5659c63
  #    missing symbol AnnotateRWLockDestroy
5659c63
  #
5659c63
  # Invoke the build:
Matej Stuchlik 318f360
  make EXTRA_CFLAGS="$CFLAGS $MoreCFlags" %{?_smp_mflags}
a3483f9
55cf580
  popd
55cf580
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir
55cf580
}
55cf580
55cf580
# Use "BuildPython" to support building with different configurations:
55cf580
815994f
%if 0%{?with_debug_build}
55cf580
BuildPython debug \
55cf580
  python-debug \
55cf580
  python%{pybasever}-debug \
cc23835
%ifarch %{ix86} x86_64 ppc %{power64}
1f40c0c
  "--with-pydebug --without-ensurepip" \
66cf571
%else
5941d2a
  "--with-pydebug --without-ensurepip" \
66cf571
%endif
Matej Stuchlik 318f360
  false \
Matej Stuchlik 8f7e215
  -O0
815994f
%endif # with_debug_build
55cf580
55cf580
BuildPython optimized \
55cf580
  python \
55cf580
  python%{pybasever} \
27c558e
%ifarch %{ix86} x86_64
27c558e
  "--without-ensurepip --enable-optimizations" \
27c558e
%else
cb97d29
  "--without-ensurepip" \
2287f0c
%endif
55cf580
  true
55cf580
c769a6b
# ======================================================
c769a6b
# Installing the built code:
c769a6b
# ======================================================
a3483f9
a3483f9
%install
55cf580
topdir=$(pwd)
71040c9
rm -fr %{buildroot}
71040c9
mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir}
a3483f9
55cf580
InstallPython() {
55cf580
Robert Kuska a0e3ab8
  ConfName=$1
55cf580
  PyInstSoName=$2
Matej Stuchlik 318f360
  MoreCFlags=$3
55cf580
55cf580
  ConfDir=build/$ConfName
55cf580
55cf580
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
  mkdir -p $ConfDir
55cf580
55cf580
  pushd $ConfDir
55cf580
Matej Stuchlik 318f360
make install DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="$MoreCFlags"
a3483f9
cfd3e15
  popd
55cf580
cfd3e15
  # We install a collection of hooks for gdb that make it easier to debug
cfd3e15
  # executables linked against libpython3* (such as /usr/bin/python3 itself)
cfd3e15
  #
cfd3e15
  # These hooks are implemented in Python itself (though they are for the version
cfd3e15
  # of python that gdb is linked with, in this case Python 2.7)
cfd3e15
  #
cfd3e15
  # gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
cfd3e15
  # We put them in the debuginfo package by installing them to e.g.:
cfd3e15
  #  /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
cfd3e15
  #
cfd3e15
  # See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
cfd3e15
  # information
cfd3e15
  #
cfd3e15
  # Copy up the gdb hooks into place; the python file will be autoloaded by gdb
cfd3e15
  # when visiting libpython.so, provided that the python file is installed to the
cfd3e15
  # same path as the library (or its .debug file) plus a "-gdb.py" suffix, e.g:
cfd3e15
  #  /usr/lib/debug/usr/lib64/libpython3.2.so.1.0.debug-gdb.py
cfd3e15
  # (note that the debug path is /usr/lib/debug for both 32/64 bit)
cfd3e15
  #
cfd3e15
  # Initially I tried:
cfd3e15
  #  /usr/lib/libpython3.1.so.1.0-gdb.py
cfd3e15
  # but doing so generated noise when ldconfig was rerun (rhbz:562980)
cfd3e15
  #
55cf580
%if 0%{?with_gdb_hooks}
cfd3e15
  DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
e49a729
  PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName-%{version}-%{release}.%{_arch}.debug-gdb.py
55cf580
cfd3e15
  mkdir -p %{buildroot}$DirHoldingGdbPy
cfd3e15
  cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
55cf580
%endif # with_gdb_hooks
55cf580
55cf580
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
}
55cf580
55cf580
# Use "InstallPython" to support building with different configurations:
55cf580
55cf580
# Install the "debug" build first, so that we can move some files aside
815994f
%if 0%{?with_debug_build}
55cf580
InstallPython debug \
Matej Stuchlik 318f360
  %{py_INSTSONAME_debug} \
Matej Stuchlik 8f7e215
  -O0
815994f
%endif # with_debug_build
55cf580
55cf580
# Now the optimized build:
55cf580
InstallPython optimized \
55cf580
  %{py_INSTSONAME_optimized}
55cf580
13c4a4f
install -d -m 0755 ${RPM_BUILD_ROOT}%{pylibdir}/site-packages/__pycache__
a3483f9
4aab458
mv ${RPM_BUILD_ROOT}%{_bindir}/2to3 ${RPM_BUILD_ROOT}%{_bindir}/python3-2to3
a3483f9
860f392
# add idle3 to menu
860f392
install -D -m 0644 Lib/idlelib/Icons/idle_16.png ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/16x16/apps/idle3.png
860f392
install -D -m 0644 Lib/idlelib/Icons/idle_32.png ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/32x32/apps/idle3.png
860f392
install -D -m 0644 Lib/idlelib/Icons/idle_48.png ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/48x48/apps/idle3.png
860f392
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE10}
860f392
860f392
# Install and validate appdata file
860f392
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/appdata
860f392
cp -a %{SOURCE11} ${RPM_BUILD_ROOT}%{_datadir}/appdata
860f392
appstream-util validate-relax --nonet ${RPM_BUILD_ROOT}%{_datadir}/appdata/idle3.appdata.xml
860f392
a3483f9
# Development tools
a3483f9
install -m755 -d ${RPM_BUILD_ROOT}%{pylibdir}/Tools
a3483f9
install Tools/README ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
cp -ar Tools/freeze ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
cp -ar Tools/i18n ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
cp -ar Tools/pynche ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
cp -ar Tools/scripts ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
a3483f9
# Documentation tools
71040c9
install -m755 -d %{buildroot}%{pylibdir}/Doc
71040c9
cp -ar Doc/tools %{buildroot}%{pylibdir}/Doc/
a3483f9
a3483f9
# Demo scripts
34c15c7
cp -ar Tools/demo %{buildroot}%{pylibdir}/Tools/
a3483f9
a3483f9
# Fix for bug #136654
71040c9
rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au
a3483f9
a3483f9
%if "%{_lib}" == "lib64"
Matej Stuchlik 2699e37
install -d -m 0755 %{buildroot}/%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
a3483f9
%endif
a3483f9
a3483f9
# Make python3-devel multilib-ready (bug #192747, #139911)
a3483f9
%global _pyconfig32_h pyconfig-32.h
a3483f9
%global _pyconfig64_h pyconfig-64.h
a3483f9
c3e3d77
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 aarch64 %{mips64} riscv64
a3483f9
%global _pyconfig_h %{_pyconfig64_h}
a3483f9
%else
a3483f9
%global _pyconfig_h %{_pyconfig32_h}
a3483f9
%endif
815994f
5080ffc
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
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
Robert Kuska 08f3736
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu}
Robert Kuska 08f3736
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu}
5080ffc
815994f
%if 0%{?with_debug_build}
5080ffc
%global PyIncludeDirs python%{LDVERSION_optimized} python%{LDVERSION_debug}
5080ffc
815994f
%else
5080ffc
%global PyIncludeDirs python%{LDVERSION_optimized}
815994f
%endif
815994f
815994f
for PyIncludeDir in %{PyIncludeDirs} ; do
55cf580
  mv %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h \
55cf580
     %{buildroot}%{_includedir}/$PyIncludeDir/%{_pyconfig_h}
55cf580
  cat > %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h << EOF
a3483f9
#include <bits/wordsize.h>
a3483f9
a3483f9
#if __WORDSIZE == 32
a3483f9
#include "%{_pyconfig32_h}"
a3483f9
#elif __WORDSIZE == 64
a3483f9
#include "%{_pyconfig64_h}"
a3483f9
#else
a3483f9
#error "Unknown word size"
a3483f9
#endif
a3483f9
EOF
55cf580
done
a3483f9
a3483f9
# Fix for bug 201434: make sure distutils looks at the right pyconfig.h file
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
824c34b
# when python starts up (bug 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
a3483f9
# Switch all shebangs to refer to the specific Python version.
55cf580
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
55cf580
  Tools/scripts/pathfix.py \
55cf580
  -i "%{_bindir}/python%{pybasever}" \
55cf580
  %{buildroot}
a3483f9
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
# .xpm and .xbm files should not be executable:
71040c9
find %{buildroot} \
a3483f9
  \( -name \*.xbm -o -name \*.xpm -o -name \*.xpm.1 \) \
a3483f9
  -exec chmod a-x {} \;
a3483f9
a3483f9
# Remove executable flag from files that shouldn't have it:
a3483f9
chmod a-x \
71040c9
  %{buildroot}%{pylibdir}/distutils/tests/Setup.sample \
34c15c7
  %{buildroot}%{pylibdir}/Tools/README
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 {} \;
71040c9
rm -f %{buildroot}%{pylibdir}/LICENSE.txt
a3483f9
# Junk, no point in putting in -test sub-pkg
a3483f9
rm -f ${RPM_BUILD_ROOT}/%{pylibdir}/idlelib/testcode.py*
a3483f9
a3483f9
# Get rid of stray patch file from buildroot:
71040c9
rm -f %{buildroot}%{pylibdir}/test/test_imp.py.apply-our-changes-to-expected-shebang # from patch 4
a3483f9
a3483f9
# Fix end-of-line encodings:
71040c9
find %{buildroot}/ -name \*.py -exec sed -i 's/\r//' {} \;
a3483f9
a3483f9
# Fix an encoding:
71040c9
iconv -f iso8859-1 -t utf-8 %{buildroot}/%{pylibdir}/Demo/rpc/README > README.conv && mv -f README.conv %{buildroot}/%{pylibdir}/Demo/rpc/README
a3483f9
Robert Kuska a0e3ab8
# Note that
a3483f9
#  %{pylibdir}/Demo/distutils/test2to3/setup.py
a3483f9
# is in iso-8859-1 encoding, and that this is deliberate; this is test data
a3483f9
# for the 2to3 tool, and one of the functions of the 2to3 tool is to fixup
a3483f9
# character encodings within python source code
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
a3483f9
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
71040c9
find %{buildroot} \
a3483f9
    -perm 555 -exec chmod 755 {} \;
a3483f9
bd4f5e9
# Install macros for rpm:
a39396d
mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d/
a39396d
install -m 644 %{SOURCE3} %{buildroot}/%{_rpmconfigdir}/macros.d/
60aba0a
install -m 644 %{SOURCE9} %{buildroot}/%{_rpmconfigdir}/macros.d/
a3483f9
113725a
# Ensure that the curses module was linked against libncursesw.so, rather than
113725a
# libncurses.so (bug 539917)
71040c9
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
113725a
    | grep curses \
113725a
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
113725a
55cf580
# Ensure that the debug modules are linked against the debug libpython, and
55cf580
# likewise for the optimized modules and libpython:
55cf580
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
55cf580
    case $Module in
5080ffc
    *.%{SOABI_debug})
55cf580
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
5080ffc
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
Robert Kuska a0e3ab8
55cf580
        ;;
5080ffc
    *.%{SOABI_optimized})
55cf580
        ldd $Module | grep %{py_INSTSONAME_debug} &&
5080ffc
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1)
55cf580
        ;;
55cf580
    esac
55cf580
done
b2154fa
9640a7e
# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
9640a7e
# avoid the user having to know the precise version and ABI flags.  (see
9640a7e
# e.g. rhbz#676748):
00fd884
%if 0%{?with_debug_build}
9640a7e
ln -s \
9640a7e
  %{_bindir}/python%{LDVERSION_debug} \
9640a7e
  %{buildroot}%{_bindir}/python3-debug
00fd884
%endif
9640a7e
c969609
#
c969609
# Systemtap hooks:
c969609
#
c969609
%if 0%{?with_systemtap}
c969609
# Install a tapset for this libpython into tapsetdir, fixing up the path to the
c969609
# library:
c969609
mkdir -p %{buildroot}%{tapsetdir}
4bc70e0
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 aarch64 %{mips64}
55cf580
%global libpython_stp_optimized libpython%{pybasever}-64.stp
55cf580
%global libpython_stp_debug     libpython%{pybasever}-debug-64.stp
c969609
%else
55cf580
%global libpython_stp_optimized libpython%{pybasever}-32.stp
55cf580
%global libpython_stp_debug     libpython%{pybasever}-debug-32.stp
c969609
%endif
c969609
c969609
sed \
55cf580
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_optimized}|" \
b0ba5d4
   %{_sourcedir}/libpython.stp \
55cf580
   > %{buildroot}%{tapsetdir}/%{libpython_stp_optimized}
55cf580
815994f
%if 0%{?with_debug_build}
f011cdc
# In Python 3, python3 and python3-debug don't point to the same binary,
f011cdc
# so we have to replace "python3" with "python3-debug" to get systemtap
f011cdc
# working with debug build
55cf580
sed \
55cf580
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \
f011cdc
   -e 's|"python3"|"python3-debug"|' \
b0ba5d4
   %{_sourcedir}/libpython.stp \
55cf580
   > %{buildroot}%{tapsetdir}/%{libpython_stp_debug}
815994f
%endif # with_debug_build
55cf580
c969609
%endif # with_systemtap
c969609
3a35e0b
# Rename the -devel script that differs on different arches to arch specific name
f188880
mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config
8430e60
echo -e '#!/bin/sh\nexec `dirname $0`/python%{LDVERSION_optimized}-`uname -m`-config "$@"' > \
8430e60
  %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
8430e60
echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_optimized}-`uname -m`-config. Look around to see available arches." >&2' >> \
8430e60
  %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
8430e60
  chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
c769a6b
7e7918a
%if 0%{?with_debug_build}
3a35e0b
# Rename the -debug script that differs on different arches to arch specific name
3a35e0b
mv %{buildroot}%{_bindir}/python%{LDVERSION_debug}-{,`uname -m`-}config
3a35e0b
echo -e '#!/bin/sh\nexec `dirname $0`/python%{LDVERSION_debug}-`uname -m`-config "$@"' > \
3a35e0b
  %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config
3a35e0b
echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_debug}-`uname -m`-config. Look around to see available arches." >&2' >> \
3a35e0b
  %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config
3a35e0b
  chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_debug}-config
7e7918a
%endif # with_debug_build
3a35e0b
60aba0a
# System Python: Copy the executable to libexec
60aba0a
mkdir -p %{buildroot}%{_libexecdir}
60aba0a
cp %{buildroot}%{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/system-python
60aba0a
7e7918a
c769a6b
# ======================================================
c769a6b
# Running the upstream test suite
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
e3c54b7
# For ppc64 we need a larger stack than default (rhbz#1292462)
e3c54b7
%ifarch %{power64}
e3c54b7
  ulimit -a
e3c54b7
  ulimit -s 16384
e3c54b7
%endif
3dbbc14
55cf580
topdir=$(pwd)
55cf580
CheckPython() {
Robert Kuska a0e3ab8
  ConfName=$1
5080ffc
  ConfDir=$(pwd)/build/$ConfName
55cf580
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
0c8875f
  # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the
0c8875f
  # our non-standard decorators take effect on the relevant tests:
0c8875f
  #   @unittest._skipInRpmBuild(reason)
0c8875f
  #   @unittest._expectedFailureInRpmBuild
29b9689
  # test_faulthandler.test_register_chain currently fails on ppc64le and
29b9689
  #   aarch64, see upstream bug http://bugs.python.org/issue21131
0c8875f
  WITHIN_PYTHON_RPM_BUILD= \
9a778ac
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
5b6a3e0
    -wW --slowest --findleaks \
Matej Stuchlik 318f360
    -x test_distutils \
29b9689
    %ifarch ppc64le aarch64
1b09295
    -x test_faulthandler \
8d54999
    %endif
4bc70e0
    %ifarch %{mips64}
1b09295
    -x test_ctypes \
4bc70e0
    %endif
4bc70e0
    %ifarch %{power64} s390 s390x armv7hl aarch64 %{mips}
1b09295
    -x test_gdb
Matej Stuchlik 1746188
    %endif
a3483f9
5db81fb
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
55cf580
}
55cf580
a5cef79
%if 0%{run_selftest_suite}
a5cef79
55cf580
# Check each of the configurations:
815994f
%if 0%{?with_debug_build}
55cf580
CheckPython debug
815994f
%endif # with_debug_build
55cf580
CheckPython optimized
55cf580
a5cef79
%endif # run_selftest_suite
a5cef79
55cf580
c769a6b
# ======================================================
c769a6b
# Cleaning up
c769a6b
# ======================================================
c769a6b
a3483f9
%clean
71040c9
rm -fr %{buildroot}
a3483f9
c769a6b
c769a6b
# ======================================================
c769a6b
# Scriptlets
c769a6b
# ======================================================
c769a6b
a3483f9
%post libs -p /sbin/ldconfig
a3483f9
a3483f9
%postun libs -p /sbin/ldconfig
a3483f9
60aba0a
%post -n system-python-libs -p /sbin/ldconfig
60aba0a
60aba0a
%postun -n system-python-libs -p /sbin/ldconfig
60aba0a
860f392
%post
860f392
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
860f392
860f392
%postun
860f392
if [ $1 -eq 0 ] ; then
860f392
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
860f392
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
860f392
fi
c769a6b
860f392
%posttrans
860f392
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
c769a6b
4aab458
%files
a3483f9
%defattr(-, root, root)
ea14453
%license LICENSE
Iryna Shcherbina aba719b
%doc README.rst
a3483f9
%{_bindir}/pydoc*
a3483f9
%{_bindir}/python3
a3483f9
%{_bindir}/python%{pybasever}
1c94c1a
%{_bindir}/python%{pybasever}m
1c94c1a
%{_bindir}/pyvenv
f2d9a81
%{_bindir}/pyvenv-%{pybasever}
a3483f9
%{_mandir}/*/*
26c1be5
26c1be5
%files libs
26c1be5
%defattr(-,root,root,-)
ea14453
%license LICENSE
Iryna Shcherbina aba719b
%doc README.rst
60aba0a
60aba0a
%{pylibdir}/lib2to3
60aba0a
%exclude %{pylibdir}/lib2to3/tests
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}
60aba0a
%exclude %{pylibdir}/ensurepip/_bundled
60aba0a
60aba0a
%if 0%{?with_rewheel}
60aba0a
%dir %{pylibdir}/ensurepip/rewheel/
60aba0a
%dir %{pylibdir}/ensurepip/rewheel/__pycache__/
60aba0a
%{pylibdir}/ensurepip/rewheel/*.py
60aba0a
%{pylibdir}/ensurepip/rewheel/__pycache__/*%{bytecode_suffixes}
60aba0a
%endif
60aba0a
60aba0a
%{pylibdir}/idlelib
60aba0a
60aba0a
%dir %{pylibdir}/test/
60aba0a
%dir %{pylibdir}/test/__pycache__/
60aba0a
%dir %{pylibdir}/test/support/
60aba0a
%dir %{pylibdir}/test/support/__pycache__/
60aba0a
%{pylibdir}/test/__init__.py
60aba0a
%{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
60aba0a
%{pylibdir}/test/support/__init__.py
60aba0a
%{pylibdir}/test/support/__pycache__/__init__%{bytecode_suffixes}
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
60aba0a
##################################################################################
60aba0a
60aba0a
%files -n system-python
60aba0a
%defattr(-,root,root,-)
ea14453
%license LICENSE
Iryna Shcherbina aba719b
%doc README.rst
60aba0a
%{_libexecdir}/system-python
60aba0a
60aba0a
%files -n system-python-libs
60aba0a
%defattr(-,root,root,-)
ea14453
%license LICENSE
Iryna Shcherbina aba719b
%doc README.rst
a3483f9
%dir %{pylibdir}
4aab458
%dir %{dynload_dir}
f7bd058
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
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
5fe31d8
%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
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}/time.%{SOABI_optimized}.so
Matej Stuchlik abb2ff8
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/unicodedata.%{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
bbbc440
%exclude %{pylibdir}/distutils/command/wininst-*.exe
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
5080ffc
%exclude %{pylibdir}/turtle.py
5080ffc
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
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):
bea97d9
%dir %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/
bea97d9
%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile
5080ffc
%dir %{_includedir}/python%{LDVERSION_optimized}/
5080ffc
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a3483f9
Robert Kuska 0837458
%{_libdir}/%{py_INSTSONAME_optimized}
34c15c7
%{_libdir}/libpython3.so
c969609
%if 0%{?with_systemtap}
11842a3
%dir %(dirname %{tapsetdir})
11842a3
%dir %{tapsetdir}
55cf580
%{tapsetdir}/%{libpython_stp_optimized}
71040c9
%doc systemtap-example.stp pyfuntop.stp
c969609
%endif
a3483f9
a3483f9
%files devel
a3483f9
%defattr(-,root,root)
bea97d9
%{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/*
bea97d9
%exclude %{pylibdir}/config-%{LDVERSION_optimized}-%{_arch}-linux%{_gnu}/Makefile
bbbc440
%{pylibdir}/distutils/command/wininst-*.exe
5080ffc
%{_includedir}/python%{LDVERSION_optimized}/*.h
5080ffc
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a3483f9
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
a3483f9
%{_bindir}/python3-config
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
55cf580
%{_libdir}/pkgconfig/python3.pc
Matej Stuchlik 318f360
%{_rpmconfigdir}/macros.d/macros.pybytecompile%{pybasever}
60aba0a
%{_rpmconfigdir}/macros.d/macros.systempython
a3483f9
a3483f9
%files tools
a3483f9
%defattr(-,root,root,755)
4aab458
%{_bindir}/python3-2to3
34c15c7
%{_bindir}/2to3-%{pybasever}
a3483f9
%{_bindir}/idle*
a3483f9
%{pylibdir}/Tools
a3483f9
%doc %{pylibdir}/Doc
860f392
%{_datadir}/appdata/idle3.appdata.xml
860f392
%{_datadir}/applications/idle3.desktop
860f392
%{_datadir}/icons/hicolor/*/apps/idle3.*
a3483f9
a3483f9
%files tkinter
a3483f9
%defattr(-,root,root,755)
a3483f9
%{pylibdir}/tkinter
a3483f9
%exclude %{pylibdir}/tkinter/test
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
a3483f9
%files test
a3483f9
%defattr(-, root, root)
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
a3483f9
%{pylibdir}/lib2to3/tests
a3483f9
%{pylibdir}/tkinter/test
e1c7be0
%{pylibdir}/unittest/test
a3483f9
55cf580
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
815994f
%if 0%{?with_debug_build}
55cf580
%files debug
55cf580
%defattr(-,root,root,-)
55cf580
55cf580
# Analog of the core subpackage's files:
5080ffc
%{_bindir}/python%{LDVERSION_debug}
9640a7e
%{_bindir}/python3-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
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
5fe31d8
%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
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}/time.%{SOABI_debug}.so
Matej Stuchlik abb2ff8
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/unicodedata.%{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
%if 0%{?with_systemtap}
11842a3
%dir %(dirname %{tapsetdir})
11842a3
%dir %{tapsetdir}
55cf580
%{tapsetdir}/%{libpython_stp_debug}
55cf580
%endif
55cf580
55cf580
# Analog of the -devel subpackage's files:
bea97d9
%{pylibdir}/config-%{LDVERSION_debug}-%{_arch}-linux%{_gnu}
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
815994f
%endif # with_debug_build
815994f
d5a5bf3
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from
d5a5bf3
# ldconfig (rhbz:562980).
Robert Kuska a0e3ab8
#
d5a5bf3
# 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
c6fe5c6
# Workaround for rhbz#1476593
c6fe5c6
%undefine _debuginfo_subpackages
d5a5bf3
c769a6b
# ======================================================
c769a6b
# Finally, the changelog:
c769a6b
# ======================================================
c769a6b
a3483f9
%changelog
7ce2b35
* Tue Aug 01 2017 Tomas Orsava <torsava@redhat.com> - 3.6.2-5
7ce2b35
- Dropped BuildRequires on db4-devel which was useful for Python 2 (module
7ce2b35
  bsddb), however, no longer needod for Python 3
7ce2b35
- Tested building Python 3 with and without the dependency, all tests pass and
7ce2b35
  filelists of resulting RPMs are identical
7ce2b35
c6fe5c6
* Sun Jul 30 2017 Florian Weimer <fweimer@redhat.com> - 3.6.2-4
c6fe5c6
- Do not generate debuginfo subpackages (#1476593)
c6fe5c6
- Rebuild with binutils fix for ppc64le (#1475636)
c6fe5c6
4cc9b2e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.2-3
4cc9b2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4cc9b2e
3a226ae
* Tue Jul 25 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.2-2
3a226ae
- Make test_asyncio to not depend on the current SIGHUP signal handler.
3a226ae
4ff2113
* Tue Jul 18 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.2-1
4ff2113
- Update to Python 3.6.2
4ff2113
2529623
* Tue Jun 27 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.1-10
2529623
- Update to the latest upstream implementation of PEP 538
2529623
332b947
* Mon Jun 26 2017 Michal Cyprian <mcyprian@redhat.com> - 3.6.1-9
332b947
- Make pip and distutils in user environment install into separate location
332b947
b5403ba
* Fri Jun 23 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.1-8
b5403ba
- Fix test_alpn_protocols from test_ssl
b5403ba
- Do not require rebundled setuptools dependencies
b5403ba
bb9ca6b
* Tue May 16 2017 Tomas Orsava <torsava@redhat.com> - 3.6.1-7
bb9ca6b
- Added a dependency to the devel subpackage on python3-rpm-generators which
bb9ca6b
  have been excised out of rpm-build
bb9ca6b
- Updated notes on bootstrapping Python on top of this specfile accordingly
bb9ca6b
- Involves: rhbz#1410631, rhbz#1444925
bb9ca6b
27c558e
* Tue May 09 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.1-6
27c558e
- Enable profile guided optimizations for x86_64 and i686 architectures
27c558e
- Update to a newer implementation of PEP 538
27c558e
- Update description to reflect that Python 3 is now the default Python
27c558e
31fe33b
* Fri May 05 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.1-5
31fe33b
- Update PEP 538 to the latest upstream implementation
31fe33b
bbbc440
* Tue Apr 18 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.1-4
bbbc440
- Enable link time optimizations
bbbc440
- Move windows executables to the devel subpackage (rhbz#1426257)
bbbc440
3a35e0b
* Thu Apr 13 2017 Tomas Orsava <torsava@redhat.com> - 3.6.1-3
3a35e0b
- Rename python3.Xdm-config script from -debug to be arch specific
3a35e0b
Resolves: rhbz#1179073
3a35e0b
bea97d9
* Wed Apr 05 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.1-2
bea97d9
- Install the Makefile in its proper location (rhbz#1438219)
bea97d9
Iryna Shcherbina b603b2d
* Wed Mar 22 2017 Iryna Shcherbina <ishcherb@redhat.com> - 3.6.1-1
Iryna Shcherbina b603b2d
- Update to version 3.6.1 final
Iryna Shcherbina b603b2d
628b06d
* Tue Mar 21 2017 Tomas Orsava <torsava@redhat.com> - 3.6.1-0.2.rc1
628b06d
- Fix syntax error in %%py_byte_compile macro (rhbz#1433569)
628b06d
Iryna Shcherbina aba719b
* Thu Mar 16 2017 Iryna Shcherbina <ishcherb@redaht.com> - 3.6.1-0.1.rc1
Iryna Shcherbina aba719b
- Update to Python 3.6.1 release candidate 1
Iryna Shcherbina aba719b
- Add patch 264 to skip a known test failure on aarch64
Iryna Shcherbina aba719b
3b36b49
* Fri Mar 10 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-21
3b36b49
- Use proper command line parsing in _testembed
3b36b49
- Backport of PEP 538: Coercing the legacy C locale to a UTF-8 based locale
3b36b49
  https://fedoraproject.org/wiki/Changes/python3_c.utf-8_locale
3b36b49
860f392
* Mon Feb 27 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-20
860f392
- Add desktop entry and appdata.xml file for IDLE 3 (rhbz#1392049)
860f392
bbccd64
* Fri Feb 24 2017 Michal Cyprian <mcyprian@redhat.com> - 3.6.0-19
bbccd64
- Revert "Set values of prefix and exec_prefix to /usr/local for
bbccd64
  /usr/bin/python* executables..." to prevent build failures
bbccd64
  of packages using alternate build tools
bbccd64
24515db
* Tue Feb 21 2017 Michal Cyprian <mcyprian@redhat.com> - 3.6.0-18
24515db
- Set values of prefix and exec_prefix to /usr/local for
24515db
  /usr/bin/python* executables
24515db
- Use new %%_module_build macro
24515db
ef5c6fe
* Fri Feb 17 2017 Michal Cyprian <mcyprian@redhat.com> - 3.6.0-13
ef5c6fe
- Add --executable option to install.py command
ef5c6fe
7973de8
* Wed Feb 15 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-12
7973de8
- BuildRequire the new dependencies of setuptools when rewheel mode is enabled
7973de8
in order for the virtualenvs to work properly
7973de8
45bc614
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-11
45bc614
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
45bc614
ea14453
* Wed Feb 01 2017 Stephen Gallagher <sgallagh@redhat.com> - 3.6.0-10
ea14453
- Add missing %%license macro
ea14453
d80b542
* Thu Jan 26 2017 Tomas Orsava <torsava@redhat.com> - 3.6.0-9
d80b542
- Modify the runtime dependency of python3-libs on system-python-libs again,
d80b542
  because previous attempt didn't work properly with dnf resolving mechanism
d80b542
d80b542
* Wed Jan 25 2017 Tomas Orsava <torsava@redhat.com> - 3.6.0-8
d80b542
- Modify the runtime dependency of python3-libs on system-python-libs to use
d80b542
  just the version and release number, but not the dist tag due to Modularity
d80b542
79728f7
* Mon Jan 16 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-7
79728f7
- Fix error check, so that Random.seed actually uses OS randomness (rhbz#1412275)
ae3f901
- Skip test_aead_aes_gcm during rpmbuild
79728f7
Igor Gnatenko 2294d64
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 3.6.0-6
Igor Gnatenko 2294d64
- Rebuild for readline 7.x
Igor Gnatenko 2294d64
a5e3562
* Tue Jan 10 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-5
a5e3562
- Require glibc >= 2.24.90-26 for system-python-libs (rhbz#1410644)
a5e3562
0da740b
* Mon Jan 09 2017 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-4
0da740b
- Define HAVE_LONG_LONG as 1 for backwards compatibility
0da740b
1abbc72
* Thu Jan 05 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.0-3
6bb1189
- Don't blow up on EL7 kernel (random generator) (rhbz#1410175)
6bb1189
e79e900
* Tue Dec 27 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-1
e79e900
- Update to Python 3.6.0 final
e79e900
efda0ca
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-0.6.rc1
efda0ca
- Enable rewheel
efda0ca
97cc10c
* Wed Dec 07 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-0.5.rc1
97cc10c
- Update to Python 3.6.0 release candidate 1
97cc10c
d555968
* Mon Dec 05 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-0.4.b4
3b1225f
- Update to Python 3.6.0 beta 4
3b1225f
ddb16c6
* Mon Dec 05 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-7
ddb16c6
- Set to work with pip version 9.0.1
ddb16c6
f7bd058
* Wed Oct 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-6
f7bd058
- Use proper patch numbering and base upstream branch for
f7bd058
porting ssl and hashlib modules to OpenSSL 1.1.0
f7bd058
- Drop hashlib patch for now
f7bd058
- Add riscv64 arch to 64bit and no-valgrind arches
f7bd058
55d65ad
* Tue Oct 11 2016 Tomáš Mráz <tmraz@redhat.com> - 3.5.2-5
38b026e
- Make it build with OpenSSL-1.1.0 based on upstream patch
38b026e
1768987
* Wed Sep 14 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-4
1768987
- Obsolete and Provide python35 package
1768987
5941d2a
* Mon Sep 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-3
5941d2a
- Update %py_byte_compile macro
5941d2a
- Remove unused configure flags (rhbz#1374357)
5941d2a
b2fa007
* Fri Sep 09 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-2
b2fa007
- Updated .pyc 'bytecompilation with the newly installed interpreter' to also
b2fa007
  recompile optimized .pyc files
b2fa007
- Removed .pyo 'bytecompilation with the newly installed interpreter', as .pyo
b2fa007
  files are no more
b2fa007
- Resolves rhbz#1373635
b2fa007
6cd1c5f
* Mon Aug 15 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-1
6cd1c5f
- Rebased to version 3.5.2
6cd1c5f
- Set to work with pip version 8.1.2
6cd1c5f
- Removed patches 207, 237, 241 as fixes are already contained in Python 3.5.2
6cd1c5f
- Removed arch or environment specific patches 194, 196, 203, and 208
6cd1c5f
  as test builds indicate they are no longer needed
6cd1c5f
- Updated patches 102, 146, and 242 to work with the new Python codebase
6cd1c5f
- Removed patches 200, 201, 5000 which weren't even being applied
6cd1c5f
77a5f91
* Tue Aug 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-15
77a5f91
- Fix for CVE-2016-1000110 HTTPoxy attack
77a5f91
- SPEC file cleanup
77a5f91
4bc70e0
* Mon Aug 01 2016 Michal Toman <mtoman@fedoraproject.org> - 3.5.1-14
4bc70e0
- Build properly on MIPS
4bc70e0
18346f1
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.1-13
18346f1
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
18346f1
3702d0d
* Fri Jul 08 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-12
3702d0d
- Refactor patch for properly fixing CVE-2016-5636
3702d0d
92512b0
* Fri Jul 08 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-11
92512b0
- Fix test_pyexpat failure with Expat version of 2.2.0
92512b0
347356c
* Fri Jul 08 2016 Miro Hrončok <mhroncok@redhat.com> - 3.5.1-10
347356c
- Move xml module to system-python-libs
347356c
8f231d0
* Thu Jun 16 2016 Tomas Orsava <torsava@redhat.com> - 3.5.1-9
8f231d0
- Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack
8f231d0
- Raise an error when STARTTLS fails
8f231d0
- rhbz#1303647: https://bugzilla.redhat.com/show_bug.cgi?id=1303647
8f231d0
- rhbz#1346345: https://bugzilla.redhat.com/show_bug.cgi?id=1346345
8f231d0
- Fixed upstream: https://hg.python.org/cpython/rev/d590114c2394
8f231d0
5279a7c
* Mon Jun 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-8
5279a7c
- Added patch for fixing possible integer overflow and heap corruption in zipimporter.get_data()
5279a7c
a6cf423
* Fri Mar 04 2016 Miro Hrončok <mhroncok@redhat.com> - 3.5.1-7
a6cf423
- Move distutils to system-python-libs
a6cf423
60aba0a
* Wed Feb 24 2016 Robert Kuska <rkuska@redhat.com> - 3.5.1-6
Robert Kuska 82c3cee
- Provide python3-enum34
Robert Kuska 82c3cee
60aba0a
* Fri Feb 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.5.1-5
60aba0a
- Provide System Python packages and macros
60aba0a
aa74fec
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-4
aa74fec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
aa74fec
Orion Poplawski 1eeebcf
* Wed Jan 13 2016 Orion Poplwski <orion@cora.nwra.com> - 3.5.1-2
Orion Poplawski 1eeebcf
- Drop python3 macros, require python/python3-rpm-macros
Orion Poplawski 1eeebcf
Robert Kuska e248727
* Mon Dec 14 2015 Robert Kuska <rkuska@redhat.com> - 3.5.1-1
Robert Kuska e248727
- Update to 3.5.1
Robert Kuska e248727
- Removed patch 199 and 207 (upstream)
Robert Kuska e248727
Robert Kuska e769a59
* Sun Nov 15 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-5
Robert Kuska e769a59
- Remove versioned libpython from devel package
Robert Kuska e769a59
0efd3d3
* Fri Nov 13 2015 Than Ngo <than@redhat.com> 3.5.0-4
0efd3d3
- add correct arch for ppc64/ppc64le to fix build failure
0efd3d3
Robert Kuska 0837458
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-3
Robert Kuska 0837458
- Hide the private _Py_atomic_xxx symbols from public header
Robert Kuska 0837458
Robert Kuska b0795dd
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-2
Robert Kuska b0795dd
- Rebuild with wheel set to 1
Robert Kuska b0795dd
Matej Stuchlik abb2ff8
* Tue Sep 15 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.5.0-1
Matej Stuchlik abb2ff8
- Update to 3.5.0
Matej Stuchlik abb2ff8
Thomas Spura 8d338b7
* Mon Jun 29 2015 Thomas Spura <tomspur@fedoraproject.org> - 3.4.3-4
Thomas Spura 8d338b7
- python3-devel: Require python-macros for version independant macros such as
Thomas Spura 8d338b7
  python_provide. See fpc#281 and fpc#534.
Thomas Spura 8d338b7
6f1b657
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.3-3
6f1b657
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6f1b657
Matej Stuchlik 8f7e215
* Wed Jun 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-4
Matej Stuchlik 8f7e215
- Use 1024bit DH key in test_ssl
Matej Stuchlik 8f7e215
- Use -O0 when compiling -debug build
Matej Stuchlik 8f7e215
- Update pip version variable to the version we actually ship
Matej Stuchlik 8f7e215
Matej Stuchlik 2699e37
* Wed Jun 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-3
Matej Stuchlik 2699e37
- Make relocating Python by changing _prefix actually work
Matej Stuchlik 2699e37
Resolves: rhbz#1231801
Matej Stuchlik 2699e37
3b7dceb
* Mon May  4 2015 Peter Robinson <pbrobinson@fedoraproject.org> 3.4.3-2
3b7dceb
- Disable test_gdb on aarch64 (rhbz#1196181), it joins all other non x86 arches
3b7dceb
Matej Stuchlik 318f360
* Thu Mar 12 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-1
Matej Stuchlik 318f360
- Updated to 3.4.3
Matej Stuchlik 318f360
- BuildPython now accepts additional build options
Matej Stuchlik 318f360
- Temporarily disabled test_gdb on arm (rhbz#1196181)
Matej Stuchlik 318f360
Matej Stuchlik aca03e4
* Wed Feb 25 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.2-7
Matej Stuchlik aca03e4
- Fixed undefined behaviour in faulthandler which caused test to hang on x86_64
Matej Stuchlik aca03e4
  (http://bugs.python.org/issue23433)
Matej Stuchlik aca03e4
9d940a7
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 3.4.2-6
9d940a7
- Rebuilt for Fedora 23 Change
9d940a7
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
9d940a7
11842a3
* Tue Feb 17 2015 Ville Skyttä <ville.skytta@iki.fi> - 3.4.2-5
11842a3
- Own systemtap dirs (#710733)
11842a3
70025c7
* Mon Jan 12 2015 Dan Horák <dan[at]danny.cz> - 3.4.2-4
70025c7
- build with valgrind on ppc64le
70025c7
- disable test_gdb on s390(x) until rhbz#1181034 is resolved
70025c7
Robert Kuska 86a9a20
* Tue Dec 16 2014 Robert Kuska <rkuska@redhat.com> - 3.4.2-3
Robert Kuska 86a9a20
- New patches: 170 (gc asserts), 200 (gettext headers),
Robert Kuska 86a9a20
  201 (gdbm memory leak)
Robert Kuska 86a9a20
Robert Kuska 6afc2ff
* Thu Dec 11 2014 Robert Kuska <rkuska@redhat.com> - 3.4.2-2
Robert Kuska 6afc2ff
- OpenSSL disabled SSLv3 in SSLv23 method
Robert Kuska 6afc2ff
Matej Stuchlik a8e96a1
* Thu Nov 13 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.2-1
Matej Stuchlik a8e96a1
- Update to 3.4.2
Matej Stuchlik a8e96a1
- Refreshed patches: 156 (gdb autoload)
Matej Stuchlik a8e96a1
- Removed: 195 (Werror declaration), 197 (CVE-2014-4650)
Matej Stuchlik a8e96a1
e0539fb
* Mon Nov 03 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.4.1-16
e0539fb
- Fix CVE-2014-4650 - CGIHTTPServer URL handling
e0539fb
Resolves: rhbz#1113529
e0539fb
e0539fb
* Sun Sep 07 2014 Karsten Hopp <karsten@redhat.com> 3.4.1-15
8d54999
- exclude test_gdb on ppc* (rhbz#1132488)
8d54999
ed631df
* Thu Aug 21 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.4.1-14
ed631df
- Update rewheel patch with fix from https://github.com/bkabrda/rewheel/pull/1
ed631df
2d77c4d
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.1-13
2d77c4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2d77c4d
9012997
* Sun Jun  8 2014 Peter Robinson <pbrobinson@fedoraproject.org> 3.4.1-12
9012997
- aarch64 has valgrind, just list those that don't support it
9012997
a292e5b
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.1-11
a292e5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a292e5b
cb99f9f
* Wed Jun 04 2014 Karsten Hopp <karsten@redhat.com> 3.4.1-10
cb99f9f
- bump release and rebuild to link with the correct tcl/tk libs on ppcle
cb99f9f
Matej Stuchlik 1014fca
* Tue Jun 03 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-9
Matej Stuchlik 1014fca
- Change paths to bundled projects in rewheel patch
Matej Stuchlik 1014fca
f188880
* Fri May 30 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-8
f188880
- In config script, use uname -m to write the arch
f188880
2a2186c
* Thu May 29 2014 Dan Horák <dan[at]danny.cz> - 3.4.1-7
2a2186c
- update the arch list where valgrind exists - %%power64 includes also
2a2186c
    ppc64le which is not supported yet
2a2186c
567c967
* Thu May 29 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-6
567c967
- Forward arguments to the arch specific config script
567c967
Resolves: rhbz#1102683
567c967
3d53dce
* Wed May 28 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-5
3d53dce
- Rename python3.Xm-config script to arch specific.
3d53dce
Resolves: rhbz#1091815
3d53dce
f30edc5
* Tue May 27 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.1-4
f30edc5
- Use python3-*, not python-* runtime requires on setuptools and pip
aeae72b
- rebuild for tcl-8.6
f30edc5
Matej Stuchlik cfa9e52
* Tue May 27 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-3
Matej Stuchlik cfa9e52
- Update the rewheel module