churchyard / rpms / python3

Forked from rpms/python3 3 years ago
Clone
c769a6
# ======================================================
c769a6
# Conditionals and other variables controlling the build
c769a6
# ======================================================
c769a6
b68976
# NOTES ON BOOTSTRAPING PYTHON 3.6:
Matej Stuchlik 95668b
#
eefe13
# Due to dependency cycle between Python, gdb, rpm, pip, setuptools and
eefe13
# wheel, in order to rebase Python 3, one has to build in the following order:
Matej Stuchlik 95668b
#
eefe13
# 1) gdb without python support (add %%global _without_python 1 on top of gdb's SPEC file)
eefe13
# 2) python3 with with_rewheel set to 0
eefe13
# 3) gdb with python support (remove %%global _without_python 1 on top of gdb's SPEC file)
eefe13
# 4) rpm
eefe13
# 5) python-setuptools with bootstrap set to 1
eefe13
# 6) python-pip with build_wheel set to 0
eefe13
# 7) python-wheel with %%bcond_without bootstrap
eefe13
# 8) python-setuptools with bootstrap set to 0 and also with_check set to 0
eefe13
# 9) python-pip with build_wheel set to 1
eefe13
# 10) pyparsing
eefe13
# 11) python3 with with_rewheel set to 1
eefe13
#
eefe13
# Then the most important packages have to be built, starting from their various leaf dependencies
eefe13
# recursively. After these have been built, a targeted rebuild should be requested for the rest.
eefe13
# Currently these packages are recommended to have been built before a targeted rebuild after a python abi change:
eefe13
# python-sphinx, pytest, python-requests, cloud-init, dnf, anaconda, abrt.
Matej Stuchlik 95668b
b68976
efda0c
%global with_rewheel 1
Matej Stuchlik 11fb59
b68976
%global pybasever 3.6
5080ff
5080ff
# pybasever without the dot:
b68976
%global pyshortver 36
5080ff
a3483f
%global pylibdir %{_libdir}/python%{pybasever}
4aab45
%global dynload_dir %{pylibdir}/lib-dynload
a3483f
5080ff
# SOABI is defined in the upstream configure.in from Python-3.2a2 onwards,
5080ff
# for PEP 3149:
5080ff
#   http://www.python.org/dev/peps/pep-3149/
5080ff
1c94c1
# ("configure.in" became "configure.ac" in Python 3.3 onwards, and in
1c94c1
# backports)
1c94c1
5080ff
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
1c94c1
# With Python 3.3, we lose the "u" suffix due to PEP 393
1c94c1
%global ABIFLAGS_optimized m
1c94c1
%global ABIFLAGS_debug     dm
5080ff
5080ff
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
5080ff
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
5080ff
Robert Kuska 08f373
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu}
Robert Kuska 08f373
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu}
5080ff
7eb10c
# All bytecode files are now in a __pycache__ subdirectory, with a name
7eb10c
# reflecting the version of the bytecode (to permit sharing of python libraries
7eb10c
# between different runtimes)
7eb10c
# See http://www.python.org/dev/peps/pep-3147/
7eb10c
# For example,
7eb10c
#   foo/bar.py
7eb10c
# now has bytecode at:
1c8e9a
#   foo/__pycache__/bar.cpython-36.pyc
1c8e9a
#   foo/__pycache__/bar.cpython-36.opt-1.pyc
1c8e9a
#	foo/__pycache__/bar.cpython-36.opt-2.pyc
1c8e9a
%global bytecode_suffixes .cpython-36*.pyc
7eb10c
d5a5bf
# Python's configure script defines SOVERSION, and this is used in the Makefile
d5a5bf
# to determine INSTSONAME, the name of the libpython DSO:
d5a5bf
#   LDLIBRARY='libpython$(VERSION).so'
d5a5bf
#   INSTSONAME="$LDLIBRARY".$SOVERSION
d5a5bf
# We mirror this here in order to make it easier to add the -gdb.py hooks.
d5a5bf
# (if these get out of sync, the payload of the libs subpackage will fail
d5a5bf
# and halt the build)
d5a5bf
%global py_SOVERSION 1.0
5080ff
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
5080ff
%global py_INSTSONAME_debug     libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
d5a5bf
815994
%global with_debug_build 1
815994
b2154f
%global with_gdb_hooks 1
b2154f
e9db5d
%global with_systemtap 0
c96960
31a06d
# some arches don't have valgrind so we need to disable its support on them
05c99b
%ifnarch s390 %{mips} riscv64
31a06d
%global with_valgrind 1
31a06d
%else
31a06d
%global with_valgrind 0
31a06d
%endif
31a06d
9b8d22
%global with_gdbm 1
5fe31d
91b780
# Change from yes to no to turn this off
91b780
%global with_computed_gotos yes
91b780
a5cef7
# Turn this to 0 to turn off the "check" phase:
ace4ea
%global run_selftest_suite 1
a5cef7
a3483f
# We want to byte-compile the .py files within the packages using the new
a3483f
# python3 binary.
Robert Kuska a0e3ab
#
a3483f
# Unfortunately, rpmbuild's infrastructure requires us to jump through some
a3483f
# hoops to avoid byte-compiling with the system python 2 version:
a3483f
#   /usr/lib/rpm/redhat/macros sets up build policy that (amongst other things)
a3483f
# defines __os_install_post.  In particular, "brp-python-bytecompile" is
a3483f
# invoked without an argument thus using the wrong version of python
a3483f
# (/usr/bin/python, rather than the freshly built python), thus leading to
a3483f
# numerous syntax errors, and incorrect magic numbers in the .pyc files.  We
a3483f
# thus override __os_install_post to avoid invoking this script:
Matej Stuchlik 516eb7
%global __os_install_post /usr/lib/rpm/brp-compress \
Matej Stuchlik 516eb7
  %{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
Matej Stuchlik 516eb7
  /usr/lib/rpm/brp-strip-static-archive %{__strip} \
Matej Stuchlik 516eb7
  /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
Robert Kuska a0e3ab
  /usr/lib/rpm/brp-python-hardlink
a3483f
# to remove the invocation of brp-python-bytecompile, whilst keeping the
a3483f
# invocation of brp-python-hardlink (since this should still work for python3
a3483f
# pyc/pyo files)
a3483f
7eb10c
c769a6
# ==================
c769a6
# Top-level metadata
c769a6
# ==================
a3483f
Summary: Version 3 of the Python programming language aka Python 3000
a3483f
Name: python3
b68976
Version: %{pybasever}.0
6bb118
Release: 3%{?dist}
a3483f
License: Python
a3483f
Group: Development/Languages
c769a6
c769a6
c769a6
# =======================
c769a6
# Build-time requirements
c769a6
# =======================
c769a6
c769a6
# (keep this list alphabetized)
c769a6
c769a6
BuildRequires: autoconf
81ac8c
BuildRequires: bluez-libs-devel
c769a6
BuildRequires: bzip2
c769a6
BuildRequires: bzip2-devel
c769a6
BuildRequires: db4-devel >= 4.7
5974f1
5974f1
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
5974f1
# it (in pyexpat) in order to enable the fix in Python-3.2.3 for CVE-2012-0876:
5974f1
BuildRequires: expat-devel >= 2.1.0
5974f1
c769a6
BuildRequires: findutils
c769a6
BuildRequires: gcc-c++
5fe31d
%if %{with_gdbm}
c769a6
BuildRequires: gdbm-devel
5fe31d
%endif
c769a6
BuildRequires: glibc-devel
c769a6
BuildRequires: gmp-devel
c769a6
BuildRequires: libffi-devel
c769a6
BuildRequires: libGL-devel
c769a6
BuildRequires: libX11-devel
c769a6
BuildRequires: ncurses-devel
de14a0
# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig)
de14a0
BuildRequires: net-tools
c769a6
BuildRequires: openssl-devel
c769a6
BuildRequires: pkgconfig
c769a6
BuildRequires: readline-devel
c769a6
BuildRequires: sqlite-devel
c769a6
c769a6
BuildRequires: systemtap-sdt-devel
af1b22
BuildRequires: systemtap-devel
c769a6
# (this introduces a dependency on "python", in that systemtap-sdt-devel's
c769a6
# /usr/bin/dtrace is a python 2 script)
c769a6
%global tapsetdir      /usr/share/systemtap/tapset
c769a6
c769a6
BuildRequires: tar
c769a6
BuildRequires: tcl-devel
c769a6
BuildRequires: tix-devel
c769a6
BuildRequires: tk-devel
c769a6
c769a6
%if 0%{?with_valgrind}
c769a6
BuildRequires: valgrind-devel
c769a6
%endif
c769a6
f2b86e
BuildRequires: xz-devel
c769a6
BuildRequires: zlib-devel
c769a6
Matej Stuchlik 11fb59
%if 0%{?with_rewheel}
Matej Stuchlik 11fb59
BuildRequires: python3-setuptools
Matej Stuchlik 11fb59
BuildRequires: python3-pip
Matej Stuchlik 11fb59
%endif
Matej Stuchlik 11fb59
c769a6
c769a6
# =======================
c769a6
# Source code and patches
c769a6
# =======================
c769a6
e79e90
Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
a3483f
4aab45
# Supply an RPM macro "py_byte_compile" for the python3-devel subpackage
4aab45
# to enable specfiles to selectively byte-compile individual files and paths
4aab45
# with different Python runtimes as necessary:
Matej Stuchlik 318f36
Source3: macros.pybytecompile%{pybasever}
4aab45
c96960
# Systemtap tapset to make it easier to use the systemtap static probes
c96960
# (actually a template; LIBRARY_PATH will get fixed up during install)
c96960
# Written by dmalcolm; not yet sent upstream
c96960
Source5: libpython.stp
c96960
c96960
# Example systemtap script using the tapset
c96960
# Written by wcohen, mjw, dmalcolm; not yet sent upstream
c96960
Source6: systemtap-example.stp
c96960
71040c
# Another example systemtap script that uses the tapset
71040c
# Written by dmalcolm; not yet sent upstream
71040c
Source7: pyfuntop.stp
71040c
3dbbc1
# A simple script to check timestamps of bytecode files
3dbbc1
# Run in check section with Python that is currently being built
3dbbc1
# Written by bkabrda
3dbbc1
Source8: check-pyc-and-pyo-timestamps.py
71040c
60aba0
# A simple macro that enables packages to require system-python(abi) instead of python(abi)
60aba0
Source9: macros.systempython
60aba0
a3483f
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
a3483f
# Was Patch0 in ivazquez' python3000 specfile:
a3483f
Patch1:         Python-3.1.1-rpath.patch
a3483f
6b3496
# 00055 #
c96960
# Systemtap support: add statically-defined probe points
1c94c1
# Patch sent upstream as http://bugs.python.org/issue14776
62d720
# with some subsequent reworking to cope with LANG=C in an rpmbuild
62d720
# (where sys.getfilesystemencoding() == 'ascii')
c923b5
Patch55: 00055-systemtap.patch
c96960
bf3516
Patch102: 00102-lib64.patch
a3483f
6b3496
# 00104 #
c923b5
# Only used when "%{_lib}" == "lib64"
c923b5
# Another lib64 fix, for distutils/tests/test_install.py; not upstream:
c923b5
Patch104: 00104-lib64-fix-for-test_install.patch
c923b5
6b3496
# 00111 #
c923b5
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
c923b5
# a libpythonMAJOR.MINOR.a (bug 550692):
bbb508
# Downstream only: not appropriate for upstream
c923b5
Patch111: 00111-no-static-lib.patch
c923b5
6b3496
# 00132 #
0c8875
# Add non-standard hooks to unittest for use in the "check" phase below, when
0c8875
# running selftests within the build:
0c8875
#   @unittest._skipInRpmBuild(reason)
0c8875
# for tests that hang or fail intermittently within the build environment, and:
0c8875
#   @unittest._expectedFailureInRpmBuild
0c8875
# for tests that always fail within the build environment
0c8875
#
0c8875
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the
0c8875
# environment, which we set manually in the appropriate portion of the "check"
0c8875
# phase below (and which potentially other python-* rpms could set, to reuse
0c8875
# these unittest hooks in their own "check" phases)
0c8875
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
0c8875
6b3496
# 00133 #
0c8875
# 00133-skip-test_dl.patch is not relevant for python3: the "dl" module no
0c8875
# longer exists
0c8875
6b3496
# 00137 #
0c8875
# Some tests within distutils fail when run in an rpmbuild:
0c8875
Patch137: 00137-skip-distutils-tests-that-fail-in-rpmbuild.patch
0c8875
6b3496
# 00146 #
b8f92b
# Support OpenSSL FIPS mode (e.g. when OPENSSL_FORCE_FIPS_MODE=1 is set)
b8f92b
# - handle failures from OpenSSL (e.g. on attempts to use MD5 in a
b8f92b
#   FIPS-enforcing environment)
b8f92b
# - add a new "usedforsecurity" keyword argument to the various digest
b8f92b
#   algorithms in hashlib so that you can whitelist a callsite with
b8f92b
#   "usedforsecurity=False"
b8f92b
# (sent upstream for python 3 as http://bugs.python.org/issue9216 ; see RHEL6
b8f92b
# python patch 119)
b8f92b
# - enforce usage of the _hashlib implementation: don't fall back to the _md5
b8f92b
#   and _sha* modules (leading to clearer error messages if fips selftests
b8f92b
#   fail)
b8f92b
# - don't build the _md5 and _sha* modules; rely on the _hashlib implementation
b8f92b
#   of hashlib
b8f92b
# (rhbz#563986)
61fd48
# Note: Up to Python 3.4.0.b1, upstream had their own implementation of what
61fd48
# they assumed would become sha3. This patch was adapted to give it the
61fd48
# usedforsecurity argument, even though it did nothing (OpenSSL didn't have
61fd48
# sha3 implementation at that time).In 3.4.0.b2, sha3 implementation was reverted
61fd48
# (see http://bugs.python.org/issue16113), but the alterations were left in the
61fd48
# patch, since they may be useful again if upstream decides to rerevert sha3
61fd48
# implementation and OpenSSL still doesn't support it. For now, they're harmless.
b8f92b
Patch146: 00146-hashlib-fips.patch
b8f92b
6b3496
# 00155 #
8a2810
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
8a2810
# generating SELinux denials on "import ctypes" and "import uuid" when
8a2810
# embedding Python within httpd (rhbz#814391)
8a2810
Patch155: 00155-avoid-ctypes-thunks.patch
8a2810
798936
# 00157 #
798936
# Update uid/gid handling throughout the standard library: uid_t and gid_t are
798936
# unsigned 32-bit values, but existing code often passed them through C long
798936
# values, which are signed 32-bit values on 32-bit architectures, leading to
798936
# negative int objects for uid/gid values >= 2^31 on 32-bit architectures.
798936
#
798936
# Introduce _PyObject_FromUid/Gid to convert uid_t/gid_t values to python
798936
# objects, using int objects where the value will fit (long objects otherwise),
798936
# and _PyArg_ParseUid/Gid to convert int/long to uid_t/gid_t, with -1 allowed
798936
# as a special case (since this is given special meaning by the chown syscall)
798936
#
798936
# Update standard library to use this throughout for uid/gid values, so that
798936
# very large uid/gid values are round-trippable, and -1 remains usable.
798936
# (rhbz#697470)
798936
Patch157: 00157-uid-gid-overflows.patch
798936
823581
# 00160 #
3b4dd2
# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the
3b4dd2
# header files in the build chroot, but may not be supported in the running
3b4dd2
# kernel, hence we disable this test in an rpm build.
3b4dd2
# Adding these was upstream issue http://bugs.python.org/issue10142
3b4dd2
# Not yet sent upstream
823581
Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
3b4dd2
48d204
# 00163 #
48d204
# Some tests within test_socket fail intermittently when run inside Koji;
48d204
# disable them using unittest._skipInRpmBuild
48d204
# Not yet sent upstream
48d204
Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch
48d204
Robert Kuska a0e3ab
# 00170 #
Robert Kuska a0e3ab
# In debug builds, try to print repr() when a C-level assert fails in the
Robert Kuska a0e3ab
# garbage collector (typically indicating a reference-counting error
Robert Kuska a0e3ab
# somewhere else e.g in an extension module)
Robert Kuska a0e3ab
# Backported to 2.7 from a patch I sent upstream for py3k
Robert Kuska a0e3ab
#   http://bugs.python.org/issue9263  (rhbz#614680)
Robert Kuska a0e3ab
# hiding the proposed new macros/functions within gcmodule.c to avoid exposing
Robert Kuska a0e3ab
# them within the extension API.
Robert Kuska 86a9a2
# (rhbz#850013
Robert Kuska 86a9a2
Patch170: 00170-gc-assertions.patch
260cee
502323
# 00178 #
502323
# Don't duplicate various FLAGS in sysconfig values
502323
# http://bugs.python.org/issue17679
502323
# Does not affect python2 AFAICS (different sysconfig values initialization)
502323
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
e72147
f9db6e
# 00180 #
f9db6e
# Enable building on ppc64p7
f9db6e
# Not appropriate for upstream, Fedora-specific naming
f9db6e
Patch180: 00180-python-add-support-for-ppc64p7.patch
f9db6e
3dbbc1
# 00186 #
3dbbc1
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1023607
f5250e
# Previously, this fixed a problem where some *.py files were not being
f5250e
# bytecompiled properly during build. This was result of py_compile.compile
f5250e
# raising exception when trying to convert test file with bad encoding, and
f5250e
# thus not continuing bytecompilation for other files.
f5250e
# This was fixed upstream, but the test hasn't been merged yet, so we keep it
3dbbc1
Patch186: 00186-dont-raise-from-py_compile.patch
3dbbc1
015356
# 00188 #
015356
# Downstream only patch that should be removed when we compile all guaranteed
015356
# hashlib algorithms properly. The problem is this:
015356
# - during tests, test_hashlib is imported and executed before test_lib2to3
015356
# - if at least one hash function has failed, trying to import it triggers an
015356
#   exception that is being caught and exception is logged:
015356
#   http://hg.python.org/cpython/file/2de806c8b070/Lib/hashlib.py#l217
015356
# - logging the exception makes logging module run basicConfig
015356
# - when lib2to3 tests are run again, lib2to3 runs basicConfig again, which
015356
#   doesn't do anything, because it was run previously
015356
#   (logging.root.handlers != []), which means that the default setup
015356
#   (most importantly logging level) is not overriden. That means that a test
015356
#   relying on this will fail (test_filename_changing_on_output_single_dir)
015356
Patch188: 00188-fix-lib2to3-tests-when-hashlib-doesnt-compile-properly.patch
015356
Matej Stuchlik 11fb59
# 00189 #
Matej Stuchlik 11fb59
# Add the rewheel module, allowing to recreate wheels from already installed
Matej Stuchlik 11fb59
# ones
Matej Stuchlik 11fb59
# https://github.com/bkabrda/rewheel
Matej Stuchlik 11fb59
%if 0%{with_rewheel}
Matej Stuchlik 11fb59
Patch189: 00189-add-rewheel-module.patch
Matej Stuchlik 11fb59
%endif
486eb4
3702d0
# 00205 #
Robert Kuska a52dea
# LIBPL variable in makefile takes LIBPL from configure.ac
Robert Kuska a52dea
# but the LIBPL variable defined there doesn't respect libdir macro
Robert Kuska a52dea
Patch205: 00205-make-libpl-respect-lib64.patch
Robert Kuska a52dea
3702d0
# 00206 #
Robert Kuska 08f373
# Remove hf flag from arm triplet which is used
Robert Kuska 08f373
# by debian but fedora infra uses only eabi without hf
Robert Kuska 08f373
Patch206: 00206-remove-hf-from-arm-triplet.patch
Robert Kuska 08f373
77a5f9
# 00243 #
4bc70e
# Fix the triplet used on 64-bit MIPS
4bc70e
# rhbz#1322526: https://bugzilla.redhat.com/show_bug.cgi?id=1322526
4bc70e
# Upstream uses Debian-like style mips64-linux-gnuabi64
4bc70e
# Fedora needs the default mips64-linux-gnu
77a5f9
Patch243: 00243-fix-mips64-triplet.patch
4bc70e
af1b22
# 00249 #
af1b22
# Fix builds using the --with-dtrace flag as the rpmbuild
af1b22
# of python is an out of tree build
af1b22
# Not yet fixed upstream: http://bugs.python.org/issue28787
af1b22
Patch249: 00249-fix-out-of-tree-dtrace-builds.patch
af1b22
6bb118
# 00250 #
6bb118
# After  glibc-2.24.90, Python 3 failed to start on EL7 kernel
6bb118
# rhbz#1410175: https://bugzilla.redhat.com/show_bug.cgi?id=1410175
6bb118
# http://bugs.python.org/issue29157
6bb118
Patch250: 00250-getentropy.patch
6bb118
99ac2f
# (New patches go here ^^^)
99ac2f
#
77a5f9
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
77a5f9
# please try to keep the patch numbers in-sync between all specfiles.
99ac2f
#
77a5f9
# More information, and a patch number catalog, is at:
99ac2f
#
77a5f9
#     https://fedoraproject.org/wiki/SIGs/Python/PythonPatches
77a5f9
99ac2f
0efd3d
# add correct arch for ppc64/ppc64le
0efd3d
# it should be ppc64le-linux-gnu/ppc64-linux-gnu instead powerpc64le-linux-gnu/powerpc64-linux-gnu
0efd3d
Patch5001: python3-powerppc-arch.patch
0efd3d
a3483f
BuildRoot: %{_tmppath}/%{name}-%{version}-root
a3483f
c769a6
# ======================================================
c769a6
# Additional metadata, and subpackages
c769a6
# ======================================================
c96960
efda0c
URL: https://www.python.org/
a3483f
a3483f
# See notes in bug 532118:
a3483f
Provides: python(abi) = %{pybasever}
a3483f
26c1be
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
26c1be
176898
# In order to support multiple python interpreters, apart from the system python3,
176898
# for development purposes, new packages were introduced which can be installed in parallel
176898
# with the main python3 package (e.g. 1369688), with the naming scheme 'python<version>',
176898
# however in order to keep the upgrade path clean we need to Obsolete and Provide
176898
# these packages at the main python3 package.
176898
Obsoletes: python%{pyshortver}
176898
Provides: python%{pyshortver} = %{version}-%{release}
176898
Matej Stuchlik f49801
%if 0%{with_rewheel}
f30edc
Requires: python3-setuptools
f30edc
Requires: python3-pip
Matej Stuchlik f49801
%endif
Matej Stuchlik f49801
a3483f
%description
a3483f
Python 3 is a new version of the language that is incompatible with the 2.x
a3483f
line of releases. The language is mostly the same, but many details, especially
a3483f
how built-in objects like dictionaries and strings work, have changed
a3483f
considerably, and a lot of deprecated features have finally been removed.
a3483f
a3483f
%package libs
a3483f
Summary:        Python 3 runtime libraries
a3483f
Group:          Development/Libraries
60aba0
Requires:       system-python-libs%{?_isa} = %{version}-%{release}
a3483f
5974f1
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
5974f1
# this symbol (in pyexpat), so we must explicitly state this dependency to
5974f1
# prevent "import pyexpat" from failing with a linker error if someone hasn't
5974f1
# yet upgraded expat:
5974f1
Requires: expat >= 2.1.0
Robert Kuska 82c3ce
Provides: python3-enum34 = 1.0.4-5%{?dist}
Robert Kuska 82c3ce
Obsoletes: python3-enum34 < 1.0.4-5%{?dist}
5974f1
a3483f
%description libs
a3483f
This package contains files used to embed Python 3 into applications.
a3483f
60aba0
%package -n system-python
60aba0
Summary:        System Python executable
60aba0
Group:          Development/Libraries
60aba0
Requires:       system-python-libs%{?_isa} = %{version}-%{release}
60aba0
Provides:       system-python(abi) = %{pybasever}
60aba0
60aba0
%description -n system-python
60fd88
System Python provides a binary interpreter which uses system-python-libs,
60fd88
a subset of standard Python library considered essential to run various tools,
ca48cc
requiring Python, that consider themselves "system tools".
60aba0
60aba0
%package -n system-python-libs
60aba0
Summary:        System Python runtime libraries
60aba0
Group:          Development/Libraries
60aba0
60aba0
%define __requires_exclude ^(/usr/bin/python3.*|python\\(abi\\) = 3\\..*)$
60aba0
60aba0
Requires: expat >= 2.1.0
60aba0
60aba0
%description -n system-python-libs
60aba0
This package contains files used to embed System Python into applications.
60aba0
a3483f
%package devel
a3483f
Summary: Libraries and header files needed for Python 3 development
a3483f
Group: Development/Libraries
c75d3b
Requires: %{name} = %{version}-%{release}
c75d3b
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Orion Poplawski 1eeebc
BuildRequires: python-rpm-macros
Orion Poplawski 1eeebc
Requires: python-rpm-macros
Orion Poplawski 1eeebc
Requires: python3-rpm-macros
a3483f
Conflicts: %{name} < %{version}-%{release}
a3483f
a3483f
%description devel
Thomas Spura 8d338b
This package contains libraries and header files used to build applications
a3483f
with and native libraries for Python 3
a3483f
a3483f
%package tools
a3483f
Summary: A collection of tools included with Python 3
a3483f
Group: Development/Tools
a3483f
Requires: %{name} = %{version}-%{release}
a3483f
Requires: %{name}-tkinter = %{version}-%{release}
a3483f
a3483f
%description tools
a3483f
This package contains several tools included with Python 3
a3483f
a3483f
%package tkinter
a3483f
Summary: A GUI toolkit for Python 3
a3483f
Group: Development/Languages
a3483f
Requires: %{name} = %{version}-%{release}
a3483f
a3483f
%description tkinter
a3483f
The Tkinter (Tk interface) program is an graphical user interface for
a3483f
the Python scripting language.
a3483f
a3483f
%package test
a3483f
Summary: The test modules from the main python 3 package
a3483f
Group: Development/Languages
a3483f
Requires: %{name} = %{version}-%{release}
a3483f
Requires: %{name}-tools = %{version}-%{release}
a3483f
a3483f
%description test
a3483f
The test modules from the main %{name} package.
a3483f
These are in a separate package to save space, as they are almost never used
a3483f
in production.
a3483f
a3483f
You might want to install the python3-test package if you're developing
a3483f
python 3 code that uses more than just unittest and/or test_support.py.
a3483f
815994
%if 0%{?with_debug_build}
55cf58
%package debug
55cf58
Summary: Debug version of the Python 3 runtime
55cf58
Group: Applications/System
55cf58
55cf58
# The debug build is an all-in-one package version of the regular build, and
55cf58
# shares the same .py/.pyc files and directories as the regular build.  Hence
55cf58
# we depend on all of the subpackages of the regular build:
55cf58
Requires: %{name}%{?_isa} = %{version}-%{release}
55cf58
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
55cf58
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
55cf58
Requires: %{name}-test%{?_isa} = %{version}-%{release}
55cf58
Requires: %{name}-tkinter%{?_isa} = %{version}-%{release}
55cf58
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
55cf58
55cf58
%description debug
55cf58
python3-debug provides a version of the Python 3 runtime with numerous debugging
55cf58
features enabled, aimed at advanced Python users, such as developers of Python
55cf58
extension modules.
55cf58
55cf58
This version uses more memory and will be slower than the regular Python 3 build,
55cf58
but is useful for tracking down reference-counting issues, and other bugs.
55cf58
55cf58
The bytecodes are unchanged, so that .pyc files are compatible between the two
55cf58
versions of Python 3, but the debugging features mean that C/C++ extension
55cf58
modules are ABI-incompatible with those built for the standard runtime.
55cf58
55cf58
It shares installation directories with the standard Python 3 runtime, so that
55cf58
.py and .pyc files can be shared.  All compiled extension modules gain a "_d"
55cf58
suffix ("foo_d.so" rather than "foo.so") so that each Python 3 implementation
55cf58
can load its own extensions.
7eb10c
%endif # with_debug_build
55cf58
c769a6
# ======================================================
c769a6
# The prep phase of the build:
c769a6
# ======================================================
c769a6
a3483f
%prep
f5250e
%setup -q -n Python-%{version}%{?prerel}
6859f2
c96960
%if 0%{?with_systemtap}
c96960
# Provide an example of usage of the tapset:
c96960
cp -a %{SOURCE6} .
71040c
cp -a %{SOURCE7} .
c96960
%endif # with_systemtap
c96960
1ae4dd
# Ensure that we're using the system copy of various libraries, rather than
1ae4dd
# copies shipped by upstream in the tarball:
1ae4dd
#   Remove embedded copy of expat:
1ae4dd
rm -r Modules/expat || exit 1
1ae4dd
1ae4dd
#   Remove embedded copy of zlib:
1ae4dd
rm -r Modules/zlib || exit 1
1ae4dd
f7bd05
## Disabling hashlib patch for now as it needs to be reimplemented
f7bd05
## for OpenSSL 1.1.0.
b8f92b
# Don't build upstream Python's implementation of these crypto algorithms;
b8f92b
# instead rely on _hashlib and OpenSSL.
b8f92b
#
b8f92b
# For example, in our builds hashlib.md5 is implemented within _hashlib via
b8f92b
# OpenSSL (and thus respects FIPS mode), and does not fall back to _md5
b28217
# TODO: there seems to be no OpenSSL support in Python for sha3 so far
b28217
# when it is there, also remove _sha3/ dir
f7bd05
#for f in md5module.c sha1module.c sha256module.c sha512module.c; do
f7bd05
#    rm Modules/$f
f7bd05
#done
b8f92b
Matej Stuchlik 8f7e21
%if 0%{with_rewheel}
ddb16c
%global pip_version 9.0.1
Matej Stuchlik 8f7e21
sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/ensurepip/__init__.py
Matej Stuchlik 8f7e21
%endif
Matej Stuchlik 8f7e21
1ae4dd
#
1ae4dd
# Apply patches:
1ae4dd
#
7eb10c
%patch1 -p1
7eb10c
c96960
%if 0%{?with_systemtap}
c923b5
%patch55 -p1 -b .systemtap
c96960
%endif
a3483f
a3483f
%if "%{_lib}" == "lib64"
7eb10c
%patch102 -p1
c923b5
%patch104 -p1
a3483f
%endif
Robert Kuska 7035fe
%patch111 -p1
0c8875
%patch132 -p1
0c8875
%patch137 -p1
f7bd05
#patch146 -p1
8a2810
%patch155 -p1
798936
%patch157 -p1
823581
%patch160 -p1
48d204
%patch163 -p1
0424a4
%patch170 -p1
502323
%patch178 -p1
f9db6e
%patch180 -p1
3dbbc1
%patch186 -p1
015356
%patch188 -p1
0c8875
Matej Stuchlik 11fb59
%if 0%{with_rewheel}
Matej Stuchlik 11fb59
%patch189 -p1
Matej Stuchlik 11fb59
%endif
Matej Stuchlik 11fb59
Robert Kuska a52dea
%patch205 -p1
Robert Kuska 08f373
%patch206 -p1
77a5f9
%patch243 -p1
af1b22
%patch249 -p1
6bb118
%patch250 -p1
0c8875
a9e268
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
a9e268
# are many differences between 2.6 and the Python 3 library.
a9e268
#
a9e268
# Fix up the URLs within pydoc to point at the documentation for this
a9e268
# MAJOR.MINOR version:
a9e268
#
a9e268
sed --in-place \
a9e268
    --expression="s|http://docs.python.org/library|http://docs.python.org/%{pybasever}/library|g" \
a9e268
    Lib/pydoc.py || exit 1
a3483f
0efd3d
%patch5001 -p1
0efd3d
c769a6
# ======================================================
c769a6
# Configuring and building the code:
c769a6
# ======================================================
c769a6
a3483f
%build
55cf58
topdir=$(pwd)
5c9590
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
5c9590
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
a3483f
export CPPFLAGS="`pkg-config --cflags-only-I libffi`"
5c9590
export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
a3483f
export LINKCC="gcc"
a3483f
export CFLAGS="$CFLAGS `pkg-config --cflags openssl`"
8a69a6
export LDFLAGS="$RPM_LD_FLAGS `pkg-config --libs-only-L openssl`"
a3483f
e3c54b
55cf58
# Define a function, for how to perform a "build" of python for a given
55cf58
# configuration:
55cf58
BuildPython() {
Robert Kuska a0e3ab
  ConfName=$1
55cf58
  BinaryName=$2
55cf58
  SymlinkName=$3
55cf58
  ExtraConfigArgs=$4
55cf58
  PathFixWithThisBinary=$5
Matej Stuchlik 318f36
  MoreCFlags=$6
55cf58
55cf58
  ConfDir=build/$ConfName
55cf58
55cf58
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName
55cf58
  mkdir -p $ConfDir
55cf58
55cf58
  pushd $ConfDir
55cf58
55cf58
  # Use the freshly created "configure" script, but in the directory two above:
55cf58
  %global _configure $topdir/configure
55cf58
c96960
%configure \
c96960
  --enable-ipv6 \
c96960
  --enable-shared \
ecc570
  --with-computed-gotos=%{with_computed_gotos} \
ecc570
  --with-dbmliborder=gdbm:ndbm:bdb \
ecc570
  --with-system-expat \
ecc570
  --with-system-ffi \
b8daf7
  --enable-loadable-sqlite-extensions \
af1b22
  --with-dtrace \
c96960
%if 0%{?with_systemtap}
1c94c1
  --with-systemtap \
c96960
%endif
31a06d
%if 0%{?with_valgrind}
31a06d
  --with-valgrind \
31a06d
%endif
55cf58
  $ExtraConfigArgs \
55cf58
  %{nil}
c96960
5659c6
  # Set EXTRA_CFLAGS to our CFLAGS (rather than overriding OPT, as we've done
5659c6
  # in the past).
5659c6
  # This should fix a problem with --with-valgrind where it adds
5659c6
  #   -DDYNAMIC_ANNOTATIONS_ENABLED=1
5659c6
  # to OPT which must be passed to all compilation units in the build,
5659c6
  # otherwise leading to linker errors, e.g.
5659c6
  #    missing symbol AnnotateRWLockDestroy
5659c6
  #
5659c6
  # Invoke the build:
Matej Stuchlik 318f36
  make EXTRA_CFLAGS="$CFLAGS $MoreCFlags" %{?_smp_mflags}
a3483f
55cf58
  popd
55cf58
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir
55cf58
}
55cf58
55cf58
# Use "BuildPython" to support building with different configurations:
55cf58
815994
%if 0%{?with_debug_build}
55cf58
BuildPython debug \
55cf58
  python-debug \
55cf58
  python%{pybasever}-debug \
cc2383
%ifarch %{ix86} x86_64 ppc %{power64}
1f40c0
  "--with-pydebug --without-ensurepip" \
66cf57
%else
5941d2
  "--with-pydebug --without-ensurepip" \
66cf57
%endif
Matej Stuchlik 318f36
  false \
Matej Stuchlik 8f7e21
  -O0
815994
%endif # with_debug_build
55cf58
55cf58
BuildPython optimized \
55cf58
  python \
55cf58
  python%{pybasever} \
cb97d2
  "--without-ensurepip" \
55cf58
  true
55cf58
c769a6
# ======================================================
c769a6
# Installing the built code:
c769a6
# ======================================================
a3483f
a3483f
%install
55cf58
topdir=$(pwd)
71040c
rm -fr %{buildroot}
71040c
mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir}
a3483f
55cf58
InstallPython() {
55cf58
Robert Kuska a0e3ab
  ConfName=$1
55cf58
  PyInstSoName=$2
Matej Stuchlik 318f36
  MoreCFlags=$3
55cf58
55cf58
  ConfDir=build/$ConfName
55cf58
55cf58
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
55cf58
  mkdir -p $ConfDir
55cf58
55cf58
  pushd $ConfDir
55cf58
Matej Stuchlik 318f36
make install DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="$MoreCFlags"
a3483f
cfd3e1
  popd
55cf58
cfd3e1
  # We install a collection of hooks for gdb that make it easier to debug
cfd3e1
  # executables linked against libpython3* (such as /usr/bin/python3 itself)
cfd3e1
  #
cfd3e1
  # These hooks are implemented in Python itself (though they are for the version
cfd3e1
  # of python that gdb is linked with, in this case Python 2.7)
cfd3e1
  #
cfd3e1
  # gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
cfd3e1
  # We put them in the debuginfo package by installing them to e.g.:
cfd3e1
  #  /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
cfd3e1
  #
cfd3e1
  # See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
cfd3e1
  # information
cfd3e1
  #
cfd3e1
  # Copy up the gdb hooks into place; the python file will be autoloaded by gdb
cfd3e1
  # when visiting libpython.so, provided that the python file is installed to the
cfd3e1
  # same path as the library (or its .debug file) plus a "-gdb.py" suffix, e.g:
cfd3e1
  #  /usr/lib/debug/usr/lib64/libpython3.2.so.1.0.debug-gdb.py
cfd3e1
  # (note that the debug path is /usr/lib/debug for both 32/64 bit)
cfd3e1
  #
cfd3e1
  # Initially I tried:
cfd3e1
  #  /usr/lib/libpython3.1.so.1.0-gdb.py
cfd3e1
  # but doing so generated noise when ldconfig was rerun (rhbz:562980)
cfd3e1
  #
55cf58
%if 0%{?with_gdb_hooks}
cfd3e1
  DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
cfd3e1
  PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
55cf58
cfd3e1
  mkdir -p %{buildroot}$DirHoldingGdbPy
cfd3e1
  cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
55cf58
%endif # with_gdb_hooks
55cf58
55cf58
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
55cf58
}
55cf58
55cf58
# Use "InstallPython" to support building with different configurations:
55cf58
55cf58
# Install the "debug" build first, so that we can move some files aside
815994
%if 0%{?with_debug_build}
55cf58
InstallPython debug \
Matej Stuchlik 318f36
  %{py_INSTSONAME_debug} \
Matej Stuchlik 8f7e21
  -O0
815994
%endif # with_debug_build
55cf58
55cf58
# Now the optimized build:
55cf58
InstallPython optimized \
55cf58
  %{py_INSTSONAME_optimized}
55cf58
13c4a4
install -d -m 0755 ${RPM_BUILD_ROOT}%{pylibdir}/site-packages/__pycache__
a3483f
4aab45
mv ${RPM_BUILD_ROOT}%{_bindir}/2to3 ${RPM_BUILD_ROOT}%{_bindir}/python3-2to3
a3483f
a3483f
# Development tools
a3483f
install -m755 -d ${RPM_BUILD_ROOT}%{pylibdir}/Tools
a3483f
install Tools/README ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f
cp -ar Tools/freeze ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f
cp -ar Tools/i18n ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f
cp -ar Tools/pynche ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f
cp -ar Tools/scripts ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f
a3483f
# Documentation tools
71040c
install -m755 -d %{buildroot}%{pylibdir}/Doc
71040c
cp -ar Doc/tools %{buildroot}%{pylibdir}/Doc/
a3483f
a3483f
# Demo scripts
34c15c
cp -ar Tools/demo %{buildroot}%{pylibdir}/Tools/
a3483f
a3483f
# Fix for bug #136654
71040c
rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au
a3483f
a3483f
%if "%{_lib}" == "lib64"
Matej Stuchlik 2699e3
install -d -m 0755 %{buildroot}/%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
a3483f
%endif
a3483f
a3483f
# Make python3-devel multilib-ready (bug #192747, #139911)
a3483f
%global _pyconfig32_h pyconfig-32.h
a3483f
%global _pyconfig64_h pyconfig-64.h
a3483f
c3e3d7
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 aarch64 %{mips64} riscv64
a3483f
%global _pyconfig_h %{_pyconfig64_h}
a3483f
%else
a3483f
%global _pyconfig_h %{_pyconfig32_h}
a3483f
%endif
815994
5080ff
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
1c94c1
%global ABIFLAGS_optimized m
1c94c1
%global ABIFLAGS_debug     dm
5080ff
5080ff
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
5080ff
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
5080ff
Robert Kuska 08f373
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu}
Robert Kuska 08f373
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu}
5080ff
815994
%if 0%{?with_debug_build}
5080ff
%global PyIncludeDirs python%{LDVERSION_optimized} python%{LDVERSION_debug}
5080ff
815994
%else
5080ff
%global PyIncludeDirs python%{LDVERSION_optimized}
815994
%endif
815994
815994
for PyIncludeDir in %{PyIncludeDirs} ; do
55cf58
  mv %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h \
55cf58
     %{buildroot}%{_includedir}/$PyIncludeDir/%{_pyconfig_h}
55cf58
  cat > %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h << EOF
a3483f
#include <bits/wordsize.h>
a3483f
a3483f
#if __WORDSIZE == 32
a3483f
#include "%{_pyconfig32_h}"
a3483f
#elif __WORDSIZE == 64
a3483f
#include "%{_pyconfig64_h}"
a3483f
#else
a3483f
#error "Unknown word size"
a3483f
#endif
a3483f
EOF
55cf58
done
a3483f
a3483f
# Fix for bug 201434: make sure distutils looks at the right pyconfig.h file
824c34
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
824c34
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
824c34
# when python starts up (bug 653058)
824c34
#
824c34
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
824c34
# variants:
824c34
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
824c34
  %{buildroot}%{pylibdir}/distutils/sysconfig.py \
824c34
  %{buildroot}%{pylibdir}/sysconfig.py
a3483f
a3483f
# Switch all shebangs to refer to the specific Python version.
55cf58
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
55cf58
  Tools/scripts/pathfix.py \
55cf58
  -i "%{_bindir}/python%{pybasever}" \
55cf58
  %{buildroot}
a3483f
a3483f
# Remove shebang lines from .py files that aren't executable, and
a3483f
# remove executability from .py files that don't have a shebang line:
71040c
find %{buildroot} -name \*.py \
a3483f
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
a3483f
  -print -exec sed -i '1d' {} \; \) -o \( \
a3483f
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
a3483f
  -exec chmod a-x {} \; \) \)
a3483f
a3483f
# .xpm and .xbm files should not be executable:
71040c
find %{buildroot} \
a3483f
  \( -name \*.xbm -o -name \*.xpm -o -name \*.xpm.1 \) \
a3483f
  -exec chmod a-x {} \;
a3483f
a3483f
# Remove executable flag from files that shouldn't have it:
a3483f
chmod a-x \
71040c
  %{buildroot}%{pylibdir}/distutils/tests/Setup.sample \
34c15c
  %{buildroot}%{pylibdir}/Tools/README
a3483f
a3483f
# Get rid of DOS batch files:
71040c
find %{buildroot} -name \*.bat -exec rm {} \;
a3483f
a3483f
# Get rid of backup files:
71040c
find %{buildroot}/ -name "*~" -exec rm -f {} \;
a3483f
find . -name "*~" -exec rm -f {} \;
71040c
rm -f %{buildroot}%{pylibdir}/LICENSE.txt
a3483f
# Junk, no point in putting in -test sub-pkg
a3483f
rm -f ${RPM_BUILD_ROOT}/%{pylibdir}/idlelib/testcode.py*
a3483f
a3483f
# Get rid of stray patch file from buildroot:
71040c
rm -f %{buildroot}%{pylibdir}/test/test_imp.py.apply-our-changes-to-expected-shebang # from patch 4
a3483f
a3483f
# Fix end-of-line encodings:
71040c
find %{buildroot}/ -name \*.py -exec sed -i 's/\r//' {} \;
a3483f
a3483f
# Fix an encoding:
71040c
iconv -f iso8859-1 -t utf-8 %{buildroot}/%{pylibdir}/Demo/rpc/README > README.conv && mv -f README.conv %{buildroot}/%{pylibdir}/Demo/rpc/README
a3483f
Robert Kuska a0e3ab
# Note that
a3483f
#  %{pylibdir}/Demo/distutils/test2to3/setup.py
a3483f
# is in iso-8859-1 encoding, and that this is deliberate; this is test data
a3483f
# for the 2to3 tool, and one of the functions of the 2to3 tool is to fixup
a3483f
# character encodings within python source code
a3483f
Thomas Spura 1c26b6
# Do bytecompilation with the newly installed interpreter.
Thomas Spura e6314e
# This is similar to the script in macros.pybytecompile
Thomas Spura ae2fc1
# compile *.pyc
Thomas Spura ae2fc1
find %{buildroot} -type f -a -name "*.py" -print0 | \
Thomas Spura ae2fc1
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
3dbbc1
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
b2fa00
    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:]]' || :
a3483f
a3483f
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
71040c
find %{buildroot} \
a3483f
    -perm 555 -exec chmod 755 {} \;
a3483f
bd4f5e
# Install macros for rpm:
a39396
mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d/
a39396
install -m 644 %{SOURCE3} %{buildroot}/%{_rpmconfigdir}/macros.d/
60aba0
install -m 644 %{SOURCE9} %{buildroot}/%{_rpmconfigdir}/macros.d/
a3483f
113725
# Ensure that the curses module was linked against libncursesw.so, rather than
113725
# libncurses.so (bug 539917)
71040c
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
113725
    | grep curses \
113725
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
113725
55cf58
# Ensure that the debug modules are linked against the debug libpython, and
55cf58
# likewise for the optimized modules and libpython:
55cf58
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
55cf58
    case $Module in
5080ff
    *.%{SOABI_debug})
55cf58
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
5080ff
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
Robert Kuska a0e3ab
55cf58
        ;;
5080ff
    *.%{SOABI_optimized})
55cf58
        ldd $Module | grep %{py_INSTSONAME_debug} &&
5080ff
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1)
55cf58
        ;;
55cf58
    esac
55cf58
done
b2154f
9640a7
# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
9640a7
# avoid the user having to know the precise version and ABI flags.  (see
9640a7
# e.g. rhbz#676748):
00fd88
%if 0%{?with_debug_build}
9640a7
ln -s \
9640a7
  %{_bindir}/python%{LDVERSION_debug} \
9640a7
  %{buildroot}%{_bindir}/python3-debug
00fd88
%endif
9640a7
c96960
#
c96960
# Systemtap hooks:
c96960
#
c96960
%if 0%{?with_systemtap}
c96960
# Install a tapset for this libpython into tapsetdir, fixing up the path to the
c96960
# library:
c96960
mkdir -p %{buildroot}%{tapsetdir}
4bc70e
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 aarch64 %{mips64}
55cf58
%global libpython_stp_optimized libpython%{pybasever}-64.stp
55cf58
%global libpython_stp_debug     libpython%{pybasever}-debug-64.stp
c96960
%else
55cf58
%global libpython_stp_optimized libpython%{pybasever}-32.stp
55cf58
%global libpython_stp_debug     libpython%{pybasever}-debug-32.stp
c96960
%endif
c96960
c96960
sed \
55cf58
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_optimized}|" \
b0ba5d
   %{_sourcedir}/libpython.stp \
55cf58
   > %{buildroot}%{tapsetdir}/%{libpython_stp_optimized}
55cf58
815994
%if 0%{?with_debug_build}
f011cd
# In Python 3, python3 and python3-debug don't point to the same binary,
f011cd
# so we have to replace "python3" with "python3-debug" to get systemtap
f011cd
# working with debug build
55cf58
sed \
55cf58
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \
f011cd
   -e 's|"python3"|"python3-debug"|' \
b0ba5d
   %{_sourcedir}/libpython.stp \
55cf58
   > %{buildroot}%{tapsetdir}/%{libpython_stp_debug}
815994
%endif # with_debug_build
55cf58
c96960
%endif # with_systemtap
c96960
3d53dc
# Rename the script that differs on different arches to arch specific name
f18888
mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config
8430e6
echo -e '#!/bin/sh\nexec `dirname $0`/python%{LDVERSION_optimized}-`uname -m`-config "$@"' > \
8430e6
  %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
8430e6
echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_optimized}-`uname -m`-config. Look around to see available arches." >&2' >> \
8430e6
  %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
8430e6
  chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
c769a6
60aba0
# System Python: Copy the executable to libexec
60aba0
mkdir -p %{buildroot}%{_libexecdir}
60aba0
cp %{buildroot}%{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/system-python
60aba0
c769a6
# ======================================================
c769a6
# Running the upstream test suite
c769a6
# ======================================================
c769a6
a3483f
%check
3dbbc1
3dbbc1
# first of all, check timestamps of bytecode files
3dbbc1
find %{buildroot} -type f -a -name "*.py" -print0 | \
3dbbc1
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
3dbbc1
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
3dbbc1
    xargs -0 %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE8}
3dbbc1
e3c54b
# For ppc64 we need a larger stack than default (rhbz#1292462)
e3c54b
%ifarch %{power64}
e3c54b
  ulimit -a
e3c54b
  ulimit -s 16384
e3c54b
%endif
3dbbc1
55cf58
topdir=$(pwd)
55cf58
CheckPython() {
Robert Kuska a0e3ab
  ConfName=$1
5080ff
  ConfDir=$(pwd)/build/$ConfName
55cf58
55cf58
  echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
55cf58
5a4896
  # Note that we're running the tests using the version of the code in the
5a4896
  # builddir, not in the buildroot.
5db81f
0c8875
  # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the
0c8875
  # our non-standard decorators take effect on the relevant tests:
0c8875
  #   @unittest._skipInRpmBuild(reason)
0c8875
  #   @unittest._expectedFailureInRpmBuild
29b968
  # test_faulthandler.test_register_chain currently fails on ppc64le and
29b968
  #   aarch64, see upstream bug http://bugs.python.org/issue21131
0c8875
  WITHIN_PYTHON_RPM_BUILD= \
9a778a
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
Matej Stuchlik 174618
    --verbose --findleaks \
Matej Stuchlik 318f36
    -x test_distutils \
29b968
    %ifarch ppc64le aarch64
1b0929
    -x test_faulthandler \
8d5499
    %endif
4bc70e
    %ifarch %{mips64}
1b0929
    -x test_ctypes \
4bc70e
    %endif
4bc70e
    %ifarch %{power64} s390 s390x armv7hl aarch64 %{mips}
1b0929
    -x test_gdb
Matej Stuchlik 174618
    %endif
a3483f
5db81f
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
55cf58
55cf58
}
55cf58
a5cef7
%if 0%{run_selftest_suite}
a5cef7
55cf58
# Check each of the configurations:
815994
%if 0%{?with_debug_build}
55cf58
CheckPython debug
815994
%endif # with_debug_build
55cf58
CheckPython optimized
55cf58
a5cef7
%endif # run_selftest_suite
a5cef7
55cf58
c769a6
# ======================================================
c769a6
# Cleaning up
c769a6
# ======================================================
c769a6
a3483f
%clean
71040c
rm -fr %{buildroot}
a3483f
c769a6
c769a6
# ======================================================
c769a6
# Scriptlets
c769a6
# ======================================================
c769a6
a3483f
%post libs -p /sbin/ldconfig
a3483f
a3483f
%postun libs -p /sbin/ldconfig
a3483f
60aba0
%post -n system-python-libs -p /sbin/ldconfig
60aba0
60aba0
%postun -n system-python-libs -p /sbin/ldconfig
60aba0
c769a6
c769a6
4aab45
%files
a3483f
%defattr(-, root, root)
a3483f
%doc LICENSE README
a3483f
%{_bindir}/pydoc*
a3483f
%{_bindir}/python3
a3483f
%{_bindir}/python%{pybasever}
1c94c1
%{_bindir}/python%{pybasever}m
1c94c1
%{_bindir}/pyvenv
f2d9a8
%{_bindir}/pyvenv-%{pybasever}
a3483f
%{_mandir}/*/*
26c1be
26c1be
%files libs
26c1be
%defattr(-,root,root,-)
26c1be
%doc LICENSE README
60aba0
60aba0
%{pylibdir}/lib2to3
60aba0
%exclude %{pylibdir}/lib2to3/tests
60aba0
60aba0
%dir %{pylibdir}/unittest/
60aba0
%dir %{pylibdir}/unittest/__pycache__/
60aba0
%{pylibdir}/unittest/*.py
60aba0
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes}
60aba0
60aba0
%dir %{pylibdir}/asyncio/
60aba0
%dir %{pylibdir}/asyncio/__pycache__/
60aba0
%{pylibdir}/asyncio/*.py
60aba0
%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes}
60aba0
60aba0
%dir %{pylibdir}/venv/
60aba0
%dir %{pylibdir}/venv/__pycache__/
60aba0
%{pylibdir}/venv/*.py
60aba0
%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes}
60aba0
%{pylibdir}/venv/scripts
60aba0
60aba0
%{pylibdir}/wsgiref
60aba0
%{pylibdir}/xmlrpc
60aba0
60aba0
%dir %{pylibdir}/ensurepip/
60aba0
%dir %{pylibdir}/ensurepip/__pycache__/
60aba0
%{pylibdir}/ensurepip/*.py
60aba0
%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes}
60aba0
%exclude %{pylibdir}/ensurepip/_bundled
60aba0
60aba0
%if 0%{?with_rewheel}
60aba0
%dir %{pylibdir}/ensurepip/rewheel/
60aba0
%dir %{pylibdir}/ensurepip/rewheel/__pycache__/
60aba0
%{pylibdir}/ensurepip/rewheel/*.py
60aba0
%{pylibdir}/ensurepip/rewheel/__pycache__/*%{bytecode_suffixes}
60aba0
%endif
60aba0
60aba0
%{pylibdir}/idlelib
60aba0
60aba0
%dir %{pylibdir}/test/
60aba0
%dir %{pylibdir}/test/__pycache__/
60aba0
%dir %{pylibdir}/test/support/
60aba0
%dir %{pylibdir}/test/support/__pycache__/
60aba0
%{pylibdir}/test/__init__.py
60aba0
%{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
60aba0
%{pylibdir}/test/support/__init__.py
60aba0
%{pylibdir}/test/support/__pycache__/__init__%{bytecode_suffixes}
60aba0
60aba0
%dir %{pylibdir}/concurrent/
60aba0
%dir %{pylibdir}/concurrent/__pycache__/
60aba0
%{pylibdir}/concurrent/*.py
60aba0
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes}
60aba0
60aba0
%dir %{pylibdir}/concurrent/futures/
60aba0
%dir %{pylibdir}/concurrent/futures/__pycache__/
60aba0
%{pylibdir}/concurrent/futures/*.py
60aba0
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes}
60aba0
60aba0
%{pylibdir}/pydoc_data
60aba0
60aba0
##################################################################################
60aba0
60aba0
%files -n system-python
60aba0
%defattr(-,root,root,-)
60aba0
%doc LICENSE README
60aba0
%{_libexecdir}/system-python
60aba0
60aba0
%files -n system-python-libs
60aba0
%defattr(-,root,root,-)
60aba0
%doc LICENSE README
a3483f
%dir %{pylibdir}
4aab45
%dir %{dynload_dir}
f7bd05
1c8e9a
%{dynload_dir}/_blake2.%{SOABI_optimized}.so
f7bd05
%{dynload_dir}/_md5.%{SOABI_optimized}.so
1c8e9a
%{dynload_dir}/_sha1.%{SOABI_optimized}.so
f7bd05
%{dynload_dir}/_sha256.%{SOABI_optimized}.so
1c8e9a
%{dynload_dir}/_sha3.%{SOABI_optimized}.so
f7bd05
%{dynload_dir}/_sha512.%{SOABI_optimized}.so
1c8e9a
1b0929
%{dynload_dir}/_asyncio.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_bisect.%{SOABI_optimized}.so
1c94c1
%{dynload_dir}/_bz2.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so
1c94c1
%{dynload_dir}/_crypt.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_csv.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_curses.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_dbm.%{SOABI_optimized}.so
1c94c1
%{dynload_dir}/_decimal.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so
5fe31d
%if %{with_gdbm}
5080ff
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
5fe31d
%endif
5080ff
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_heapq.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_json.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so
1c94c1
%{dynload_dir}/_lzma.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so
3aee76
%{dynload_dir}/_opcode.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_pickle.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_random.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_socket.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_struct.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/array.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/audioop.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/binascii.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/cmath.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_datetime.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/fcntl.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/grp.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/math.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/mmap.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/nis.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/parser.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/readline.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/resource.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/select.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/spwd.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/syslog.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/termios.%{SOABI_optimized}.so
Matej Stuchlik abb2ff
#%{dynload_dir}/time.%{SOABI_optimized}.so
Matej Stuchlik abb2ff
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/zlib.%{SOABI_optimized}.so
4aab45
13c4a4
%dir %{pylibdir}/site-packages/
13c4a4
%dir %{pylibdir}/site-packages/__pycache__/
a3483f
%{pylibdir}/site-packages/README
1c8e9a
%{pylibdir}/site-packages/README.txt
7eb10c
%{pylibdir}/*.py
e1c7be
%dir %{pylibdir}/__pycache__/
7eb10c
%{pylibdir}/__pycache__/*%{bytecode_suffixes}
1c94c1
1c94c1
%dir %{pylibdir}/collections/
1c94c1
%dir %{pylibdir}/collections/__pycache__/
1c94c1
%{pylibdir}/collections/*.py
1c94c1
%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes}
5080ff
5080ff
%dir %{pylibdir}/ctypes/
e1c7be
%dir %{pylibdir}/ctypes/__pycache__/
7eb10c
%{pylibdir}/ctypes/*.py
7eb10c
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes}
a3483f
%{pylibdir}/ctypes/macholib
5080ff
a3483f
%{pylibdir}/curses
5080ff
5080ff
%dir %{pylibdir}/dbm/
e1c7be
%dir %{pylibdir}/dbm/__pycache__/
7eb10c
%{pylibdir}/dbm/*.py
7eb10c
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes}
5080ff
a6cf42
%dir %{pylibdir}/distutils/
a6cf42
%dir %{pylibdir}/distutils/__pycache__/
a6cf42
%{pylibdir}/distutils/*.py
a6cf42
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
a6cf42
%{pylibdir}/distutils/README
a6cf42
%{pylibdir}/distutils/command
a6cf42
a6cf42
5080ff
%dir %{pylibdir}/email/
e1c7be
%dir %{pylibdir}/email/__pycache__/
7eb10c
%{pylibdir}/email/*.py
7eb10c
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes}
a3483f
%{pylibdir}/email/mime
1c94c1
%doc %{pylibdir}/email/architecture.rst
5080ff
a3483f
%{pylibdir}/encodings
cb97d2
a3483f
%{pylibdir}/html
a3483f
%{pylibdir}/http
5080ff
5080ff
%dir %{pylibdir}/importlib/
e1c7be
%dir %{pylibdir}/importlib/__pycache__/
7eb10c
%{pylibdir}/importlib/*.py
7eb10c
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes}
5080ff
5080ff
%dir %{pylibdir}/json/
e1c7be
%dir %{pylibdir}/json/__pycache__/
7eb10c
%{pylibdir}/json/*.py
7eb10c
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes}
5080ff
a3483f
%{pylibdir}/logging
a3483f
%{pylibdir}/multiprocessing
5080ff
5080ff
%dir %{pylibdir}/sqlite3/
e1c7be
%dir %{pylibdir}/sqlite3/__pycache__/
7eb10c
%{pylibdir}/sqlite3/*.py
7eb10c
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
5080ff
5080ff
%exclude %{pylibdir}/turtle.py
5080ff
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
5080ff
a3483f
%{pylibdir}/urllib
347356
%{pylibdir}/xml
1c94c1
a3483f
%if "%{_lib}" == "lib64"
37de67
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
37de67
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
13c4a4
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
a3483f
%endif
a3483f
a3483f
# "Makefile" and the config-32/64.h file are needed by
a3483f
# distutils/sysconfig.py:_init_posix(), so we include them in the core
a3483f
# package, along with their parent directories (bug 531901):
5080ff
%dir %{pylibdir}/config-%{LDVERSION_optimized}/
5080ff
%{pylibdir}/config-%{LDVERSION_optimized}/Makefile
5080ff
%dir %{_includedir}/python%{LDVERSION_optimized}/
5080ff
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a3483f
Robert Kuska 083745
%{_libdir}/%{py_INSTSONAME_optimized}
34c15c
%{_libdir}/libpython3.so
c96960
%if 0%{?with_systemtap}
11842a
%dir %(dirname %{tapsetdir})
11842a
%dir %{tapsetdir}
55cf58
%{tapsetdir}/%{libpython_stp_optimized}
71040c
%doc systemtap-example.stp pyfuntop.stp
c96960
%endif
a3483f
a3483f
%files devel
a3483f
%defattr(-,root,root)
5080ff
%{pylibdir}/config-%{LDVERSION_optimized}/*
5080ff
%exclude %{pylibdir}/config-%{LDVERSION_optimized}/Makefile
5080ff
%{_includedir}/python%{LDVERSION_optimized}/*.h
5080ff
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a3483f
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
a3483f
%{_bindir}/python3-config
a3483f
%{_bindir}/python%{pybasever}-config
5080ff
%{_bindir}/python%{LDVERSION_optimized}-config
f18888
%{_bindir}/python%{LDVERSION_optimized}-*-config
5080ff
%{_libdir}/libpython%{LDVERSION_optimized}.so
5080ff
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
55cf58
%{_libdir}/pkgconfig/python-%{pybasever}.pc
55cf58
%{_libdir}/pkgconfig/python3.pc
Matej Stuchlik 318f36
%{_rpmconfigdir}/macros.d/macros.pybytecompile%{pybasever}
60aba0
%{_rpmconfigdir}/macros.d/macros.systempython
a3483f
a3483f
%files tools
a3483f
%defattr(-,root,root,755)
4aab45
%{_bindir}/python3-2to3
34c15c
%{_bindir}/2to3-%{pybasever}
a3483f
%{_bindir}/idle*
a3483f
%{pylibdir}/Tools
a3483f
%doc %{pylibdir}/Doc
a3483f
a3483f
%files tkinter
a3483f
%defattr(-,root,root,755)
a3483f
%{pylibdir}/tkinter
a3483f
%exclude %{pylibdir}/tkinter/test
5080ff
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
5080ff
%{pylibdir}/turtle.py
5080ff
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
5080ff
%dir %{pylibdir}/turtledemo
5080ff
%{pylibdir}/turtledemo/*.py
5080ff
%{pylibdir}/turtledemo/*.cfg
5080ff
%dir %{pylibdir}/turtledemo/__pycache__/
5080ff
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}
a3483f
a3483f
%files test
a3483f
%defattr(-, root, root)
a3483f
%{pylibdir}/ctypes/test
a3483f
%{pylibdir}/distutils/tests
a3483f
%{pylibdir}/sqlite3/test
a3483f
%{pylibdir}/test
5080ff
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
1c94c1
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
5080ff
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
b28217
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
a3483f
%{pylibdir}/lib2to3/tests
a3483f
%{pylibdir}/tkinter/test
e1c7be
%{pylibdir}/unittest/test
a3483f
55cf58
55cf58
# We don't bother splitting the debug build out into further subpackages:
55cf58
# if you need it, you're probably a developer.
55cf58
55cf58
# Hence the manifest is the combination of analogous files in the manifests of
55cf58
# all of the other subpackages
55cf58
815994
%if 0%{?with_debug_build}
55cf58
%files debug
55cf58
%defattr(-,root,root,-)
55cf58
55cf58
# Analog of the core subpackage's files:
5080ff
%{_bindir}/python%{LDVERSION_debug}
9640a7
%{_bindir}/python3-debug
55cf58
26c1be
# Analog of the -libs subpackage's files:
55cf58
# ...with debug builds of the built-in "extension" modules:
f7bd05
1c8e9a
%{dynload_dir}/_blake2.%{SOABI_debug}.so
f7bd05
%{dynload_dir}/_md5.%{SOABI_debug}.so
1c8e9a
%{dynload_dir}/_sha1.%{SOABI_debug}.so
f7bd05
%{dynload_dir}/_sha256.%{SOABI_debug}.so
1c8e9a
%{dynload_dir}/_sha3.%{SOABI_debug}.so
f7bd05
%{dynload_dir}/_sha512.%{SOABI_debug}.so
1c8e9a
1b0929
%{dynload_dir}/_asyncio.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_bisect.%{SOABI_debug}.so
1c94c1
%{dynload_dir}/_bz2.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so
1c94c1
%{dynload_dir}/_crypt.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_csv.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_ctypes.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_curses.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_curses_panel.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_dbm.%{SOABI_debug}.so
1c94c1
%{dynload_dir}/_decimal.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_elementtree.%{SOABI_debug}.so
5fe31d
%if %{with_gdbm}
5080ff
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
5fe31d
%endif
5080ff
%{dynload_dir}/_hashlib.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_heapq.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_json.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_lsprof.%{SOABI_debug}.so
1c94c1
%{dynload_dir}/_lzma.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so
3aee76
%{dynload_dir}/_opcode.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_pickle.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_random.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_socket.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_sqlite3.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_ssl.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_struct.%{SOABI_debug}.so
5080ff
%{dynload_dir}/array.%{SOABI_debug}.so
5080ff
%{dynload_dir}/audioop.%{SOABI_debug}.so
5080ff
%{dynload_dir}/binascii.%{SOABI_debug}.so
5080ff
%{dynload_dir}/cmath.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_datetime.%{SOABI_debug}.so
5080ff
%{dynload_dir}/fcntl.%{SOABI_debug}.so
5080ff
%{dynload_dir}/grp.%{SOABI_debug}.so
5080ff
%{dynload_dir}/math.%{SOABI_debug}.so
5080ff
%{dynload_dir}/mmap.%{SOABI_debug}.so
5080ff
%{dynload_dir}/nis.%{SOABI_debug}.so
5080ff
%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
5080ff
%{dynload_dir}/parser.%{SOABI_debug}.so
5080ff
%{dynload_dir}/pyexpat.%{SOABI_debug}.so
5080ff
%{dynload_dir}/readline.%{SOABI_debug}.so
5080ff
%{dynload_dir}/resource.%{SOABI_debug}.so
5080ff
%{dynload_dir}/select.%{SOABI_debug}.so
5080ff
%{dynload_dir}/spwd.%{SOABI_debug}.so
5080ff
%{dynload_dir}/syslog.%{SOABI_debug}.so
5080ff
%{dynload_dir}/termios.%{SOABI_debug}.so
Matej Stuchlik abb2ff
#%{dynload_dir}/time.%{SOABI_debug}.so
Matej Stuchlik abb2ff
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
5080ff
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
5080ff
%{dynload_dir}/zlib.%{SOABI_debug}.so
55cf58
55cf58
# No need to split things out the "Makefile" and the config-32/64.h file as we
55cf58
# do for the regular build above (bug 531901), since they're all in one package
55cf58
# now; they're listed below, under "-devel":
55cf58
Robert Kuska 083745
%{_libdir}/%{py_INSTSONAME_debug}
55cf58
%if 0%{?with_systemtap}
11842a
%dir %(dirname %{tapsetdir})
11842a
%dir %{tapsetdir}
55cf58
%{tapsetdir}/%{libpython_stp_debug}
55cf58
%endif
55cf58
55cf58
# Analog of the -devel subpackage's files:
5080ff
%{pylibdir}/config-%{LDVERSION_debug}
5080ff
%{_includedir}/python%{LDVERSION_debug}
5080ff
%{_bindir}/python%{LDVERSION_debug}-config
5080ff
%{_libdir}/libpython%{LDVERSION_debug}.so
Matej Stuchlik abb2ff
%{_libdir}/libpython%{LDVERSION_debug}.so.1.0
5080ff
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
55cf58
55cf58
# Analog of the -tools subpackage's files:
55cf58
#  None for now; we could build precanned versions that have the appropriate
55cf58
# shebang if needed
55cf58
55cf58
# Analog  of the tkinter subpackage's files:
5080ff
%{dynload_dir}/_tkinter.%{SOABI_debug}.so
55cf58
55cf58
# Analog  of the -test subpackage's files:
5080ff
%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
1c94c1
%{dynload_dir}/_testbuffer.%{SOABI_debug}.so
5080ff
%{dynload_dir}/_testcapi.%{SOABI_debug}.so
b28217
%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so
55cf58
815994
%endif # with_debug_build
815994
d5a5bf
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from
d5a5bf
# ldconfig (rhbz:562980).
Robert Kuska a0e3ab
#
d5a5bf
# The /usr/lib/rpm/redhat/macros defines %__debug_package to use
d5a5bf
# debugfiles.list, and it appears that everything below /usr/lib/debug and
d5a5bf
# (/usr/src/debug) gets added to this file (via LISTFILES) in
d5a5bf
# /usr/lib/rpm/find-debuginfo.sh
Robert Kuska a0e3ab
#
d5a5bf
# Hence by installing it below /usr/lib/debug we ensure it is added to the
d5a5bf
# -debuginfo subpackage
Robert Kuska a0e3ab
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py
d5a5bf
# payload file would be unpackaged)
d5a5bf
d5a5bf
c769a6
# ======================================================
c769a6
# Finally, the changelog:
c769a6
# ======================================================
c769a6
a3483f
%changelog
1abbc7
* Thu Jan 05 2017 Miro Hrončok <mhroncok@redhat.com> - 3.6.0-3
6bb118
- Don't blow up on EL7 kernel (random generator) (rhbz#1410175)
6bb118
e79e90
* Tue Dec 27 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-1
e79e90
- Update to Python 3.6.0 final
e79e90
efda0c
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-0.6.rc1
efda0c
- Enable rewheel
efda0c
97cc10
* Wed Dec 07 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-0.5.rc1
97cc10
- Update to Python 3.6.0 release candidate 1
97cc10
d55596
* Mon Dec 05 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.6.0-0.4.b4
3b1225
- Update to Python 3.6.0 beta 4
3b1225
ddb16c
* Mon Dec 05 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-7
ddb16c
- Set to work with pip version 9.0.1
ddb16c
f7bd05
* Wed Oct 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-6
f7bd05
- Use proper patch numbering and base upstream branch for
f7bd05
porting ssl and hashlib modules to OpenSSL 1.1.0
f7bd05
- Drop hashlib patch for now
f7bd05
- Add riscv64 arch to 64bit and no-valgrind arches
f7bd05
55d65a
* Tue Oct 11 2016 Tomáš Mráz <tmraz@redhat.com> - 3.5.2-5
38b026
- Make it build with OpenSSL-1.1.0 based on upstream patch
38b026
176898
* Wed Sep 14 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-4
176898
- Obsolete and Provide python35 package
176898
5941d2
* Mon Sep 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.2-3
5941d2
- Update %py_byte_compile macro
5941d2
- Remove unused configure flags (rhbz#1374357)
5941d2
b2fa00
* Fri Sep 09 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-2
b2fa00
- Updated .pyc 'bytecompilation with the newly installed interpreter' to also
b2fa00
  recompile optimized .pyc files
b2fa00
- Removed .pyo 'bytecompilation with the newly installed interpreter', as .pyo
b2fa00
  files are no more
b2fa00
- Resolves rhbz#1373635
b2fa00
6cd1c5
* Mon Aug 15 2016 Tomas Orsava <torsava@redhat.com> - 3.5.2-1
6cd1c5
- Rebased to version 3.5.2
6cd1c5
- Set to work with pip version 8.1.2
6cd1c5
- Removed patches 207, 237, 241 as fixes are already contained in Python 3.5.2
6cd1c5
- Removed arch or environment specific patches 194, 196, 203, and 208
6cd1c5
  as test builds indicate they are no longer needed
6cd1c5
- Updated patches 102, 146, and 242 to work with the new Python codebase
6cd1c5
- Removed patches 200, 201, 5000 which weren't even being applied
6cd1c5
77a5f9
* Tue Aug 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-15
77a5f9
- Fix for CVE-2016-1000110 HTTPoxy attack
77a5f9
- SPEC file cleanup
77a5f9
4bc70e
* Mon Aug 01 2016 Michal Toman <mtoman@fedoraproject.org> - 3.5.1-14
4bc70e
- Build properly on MIPS
4bc70e
18346f
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.1-13
18346f
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
18346f
3702d0
* Fri Jul 08 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-12
3702d0
- Refactor patch for properly fixing CVE-2016-5636
3702d0
92512b
* Fri Jul 08 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-11
92512b
- Fix test_pyexpat failure with Expat version of 2.2.0
92512b
347356
* Fri Jul 08 2016 Miro Hrončok <mhroncok@redhat.com> - 3.5.1-10
347356
- Move xml module to system-python-libs
347356
8f231d
* Thu Jun 16 2016 Tomas Orsava <torsava@redhat.com> - 3.5.1-9
8f231d
- Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack
8f231d
- Raise an error when STARTTLS fails
8f231d
- rhbz#1303647: https://bugzilla.redhat.com/show_bug.cgi?id=1303647
8f231d
- rhbz#1346345: https://bugzilla.redhat.com/show_bug.cgi?id=1346345
8f231d
- Fixed upstream: https://hg.python.org/cpython/rev/d590114c2394
8f231d
5279a7
* Mon Jun 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-8
5279a7
- Added patch for fixing possible integer overflow and heap corruption in zipimporter.get_data()
5279a7
a6cf42
* Fri Mar 04 2016 Miro Hrončok <mhroncok@redhat.com> - 3.5.1-7
a6cf42
- Move distutils to system-python-libs
a6cf42
60aba0
* Wed Feb 24 2016 Robert Kuska <rkuska@redhat.com> - 3.5.1-6
Robert Kuska 82c3ce
- Provide python3-enum34
Robert Kuska 82c3ce
60aba0
* Fri Feb 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.5.1-5
60aba0
- Provide System Python packages and macros
60aba0
aa74fe
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-4
aa74fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
aa74fe
Orion Poplawski 1eeebc
* Wed Jan 13 2016 Orion Poplwski <orion@cora.nwra.com> - 3.5.1-2
Orion Poplawski 1eeebc
- Drop python3 macros, require python/python3-rpm-macros
Orion Poplawski 1eeebc
Robert Kuska e24872
* Mon Dec 14 2015 Robert Kuska <rkuska@redhat.com> - 3.5.1-1
Robert Kuska e24872
- Update to 3.5.1
Robert Kuska e24872
- Removed patch 199 and 207 (upstream)
Robert Kuska e24872
Robert Kuska e769a5
* Sun Nov 15 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-5
Robert Kuska e769a5
- Remove versioned libpython from devel package
Robert Kuska e769a5
0efd3d
* Fri Nov 13 2015 Than Ngo <than@redhat.com> 3.5.0-4
0efd3d
- add correct arch for ppc64/ppc64le to fix build failure
0efd3d
Robert Kuska 083745
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-3
Robert Kuska 083745
- Hide the private _Py_atomic_xxx symbols from public header
Robert Kuska 083745
Robert Kuska b0795d
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-2
Robert Kuska b0795d
- Rebuild with wheel set to 1
Robert Kuska b0795d
Matej Stuchlik abb2ff
* Tue Sep 15 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.5.0-1
Matej Stuchlik abb2ff
- Update to 3.5.0
Matej Stuchlik abb2ff
Thomas Spura 8d338b
* Mon Jun 29 2015 Thomas Spura <tomspur@fedoraproject.org> - 3.4.3-4
Thomas Spura 8d338b
- python3-devel: Require python-macros for version independant macros such as
Thomas Spura 8d338b
  python_provide. See fpc#281 and fpc#534.
Thomas Spura 8d338b
6f1b65
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.3-3
6f1b65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6f1b65
Matej Stuchlik 8f7e21
* Wed Jun 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-4
Matej Stuchlik 8f7e21
- Use 1024bit DH key in test_ssl
Matej Stuchlik 8f7e21
- Use -O0 when compiling -debug build
Matej Stuchlik 8f7e21
- Update pip version variable to the version we actually ship
Matej Stuchlik 8f7e21
Matej Stuchlik 2699e3
* Wed Jun 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-3
Matej Stuchlik 2699e3
- Make relocating Python by changing _prefix actually work
Matej Stuchlik 2699e3
Resolves: rhbz#1231801
Matej Stuchlik 2699e3
3b7dce
* Mon May  4 2015 Peter Robinson <pbrobinson@fedoraproject.org> 3.4.3-2
3b7dce
- Disable test_gdb on aarch64 (rhbz#1196181), it joins all other non x86 arches
3b7dce
Matej Stuchlik 318f36
* Thu Mar 12 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-1
Matej Stuchlik 318f36
- Updated to 3.4.3
Matej Stuchlik 318f36
- BuildPython now accepts additional build options
Matej Stuchlik 318f36
- Temporarily disabled test_gdb on arm (rhbz#1196181)
Matej Stuchlik 318f36
Matej Stuchlik aca03e
* Wed Feb 25 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.2-7
Matej Stuchlik aca03e
- Fixed undefined behaviour in faulthandler which caused test to hang on x86_64
Matej Stuchlik aca03e
  (http://bugs.python.org/issue23433)
Matej Stuchlik aca03e
9d940a
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 3.4.2-6
9d940a
- Rebuilt for Fedora 23 Change
9d940a
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
9d940a
11842a
* Tue Feb 17 2015 Ville Skyttä <ville.skytta@iki.fi> - 3.4.2-5
11842a
- Own systemtap dirs (#710733)
11842a
70025c
* Mon Jan 12 2015 Dan Horák <dan[at]danny.cz> - 3.4.2-4
70025c
- build with valgrind on ppc64le
70025c
- disable test_gdb on s390(x) until rhbz#1181034 is resolved
70025c
Robert Kuska 86a9a2
* Tue Dec 16 2014 Robert Kuska <rkuska@redhat.com> - 3.4.2-3
Robert Kuska 86a9a2
- New patches: 170 (gc asserts), 200 (gettext headers),
Robert Kuska 86a9a2
  201 (gdbm memory leak)
Robert Kuska 86a9a2
Robert Kuska 6afc2f
* Thu Dec 11 2014 Robert Kuska <rkuska@redhat.com> - 3.4.2-2
Robert Kuska 6afc2f
- OpenSSL disabled SSLv3 in SSLv23 method
Robert Kuska 6afc2f
Matej Stuchlik a8e96a
* Thu Nov 13 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.2-1
Matej Stuchlik a8e96a
- Update to 3.4.2
Matej Stuchlik a8e96a
- Refreshed patches: 156 (gdb autoload)
Matej Stuchlik a8e96a
- Removed: 195 (Werror declaration), 197 (CVE-2014-4650)
Matej Stuchlik a8e96a
e0539f
* Mon Nov 03 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.4.1-16
e0539f
- Fix CVE-2014-4650 - CGIHTTPServer URL handling
e0539f
Resolves: rhbz#1113529
e0539f
e0539f
* Sun Sep 07 2014 Karsten Hopp <karsten@redhat.com> 3.4.1-15
8d5499
- exclude test_gdb on ppc* (rhbz#1132488)
8d5499
ed631d
* Thu Aug 21 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.4.1-14
ed631d
- Update rewheel patch with fix from https://github.com/bkabrda/rewheel/pull/1
ed631d
2d77c4
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.1-13
2d77c4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2d77c4
901299
* Sun Jun  8 2014 Peter Robinson <pbrobinson@fedoraproject.org> 3.4.1-12
901299
- aarch64 has valgrind, just list those that don't support it
901299
a292e5
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.1-11
a292e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a292e5
cb99f9
* Wed Jun 04 2014 Karsten Hopp <karsten@redhat.com> 3.4.1-10
cb99f9
- bump release and rebuild to link with the correct tcl/tk libs on ppcle
cb99f9
Matej Stuchlik 1014fc
* Tue Jun 03 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-9
Matej Stuchlik 1014fc
- Change paths to bundled projects in rewheel patch
Matej Stuchlik 1014fc
f18888
* Fri May 30 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-8
f18888
- In config script, use uname -m to write the arch
f18888
2a2186
* Thu May 29 2014 Dan Horák <dan[at]danny.cz> - 3.4.1-7
2a2186
- update the arch list where valgrind exists - %%power64 includes also
2a2186
    ppc64le which is not supported yet
2a2186
567c96
* Thu May 29 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-6
567c96
- Forward arguments to the arch specific config script
567c96
Resolves: rhbz#1102683
567c96
3d53dc
* Wed May 28 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-5
3d53dc
- Rename python3.Xm-config script to arch specific.
3d53dc
Resolves: rhbz#1091815
3d53dc
f30edc
* Tue May 27 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.1-4
f30edc
- Use python3-*, not python-* runtime requires on setuptools and pip
aeae72
- rebuild for tcl-8.6
f30edc
Matej Stuchlik cfa9e5
* Tue May 27 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-3
Matej Stuchlik cfa9e5
- Update the rewheel module
c21eb4
c75d3b
* Mon May 26 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-2
c75d3b
- Fix multilib dependencies.
c75d3b
Resolves: rhbz#1091815
3a3feb
Matej Stuchlik e602f7
* Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-1
Matej Stuchlik e602f7
- Update to Python 3.4.1
bdf58d
Matej Stuchlik da5702
* Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-8
Matej Stuchlik da5702
- Fix test_gdb failure on ppc64le
Matej Stuchlik da5702
Resolves: rhbz#1095355
b8daf7
8ab4c2
* Thu May 22 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.0-7
8ab4c2
- Add macro %%python3_version_nodots
a39396
Matej Stuchlik 174618
* Sun May 18 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-6
Matej Stuchlik 174618
- Disable test_faulthandler, test_gdb on aarch64
Matej Stuchlik 174618
Resolves: rhbz#1045193
Matej Stuchlik 174618
Matej Stuchlik 062472
* Fri May 16 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-5
Matej Stuchlik 062472
- Don't add Werror=declaration-after-statement for extension
Matej Stuchlik 062472
  modules through setup.py (PyBT#21121)
Matej Stuchlik 062472
Matej Stuchlik f49801
* Mon May 12 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-4
Matej Stuchlik f49801
- Add setuptools and pip to Requires
Matej Stuchlik f49801
Matej Stuchlik 516eb7
* Tue Apr 29 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-3
Matej Stuchlik 516eb7
- Point __os_install_post to correct brp-* files
Matej Stuchlik 516eb7
Matej Stuchlik 7d579e
* Tue Apr 15 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-2
Matej Stuchlik 7d579e
- Temporarily disable tests requiring SIGHUP (rhbz#1088233)
Matej Stuchlik 7d579e
Matej Stuchlik 11fb59
* Tue Apr 15 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-1
Matej Stuchlik 11fb59
- Update to Python 3.4 final
Matej Stuchlik 11fb59
- Add patch adding the rewheel module
Matej Stuchlik 11fb59
- Merge patches from master
Matej Stuchlik 11fb59
61fd48
* Wed Jan 08 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.0-0.1.b2
61fd48
- Update to Python 3.4 beta 2.
61fd48
- Refreshed patches: 55 (systemtap), 146 (hashlib-fips), 154 (test_gdb noise)
61fd48
- Dropped patches: 114 (statvfs constants), 177 (platform unicode)
61fd48
bf3516
* Mon Nov 25 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.0-0.1.b1
bf3516
- Update to Python 3.4 beta 1.
bf3516
- Refreshed patches: 102 (lib64), 111 (no static lib), 125 (less verbose COUNT
bf3516
ALLOCS), 141 (fix COUNT_ALLOCS in test_module), 146 (hashlib fips),
bf3516
157 (UID+GID overflows), 173 (ENOPROTOOPT in bind_port)
bf3516
- Removed patch 00187 (remove pthread atfork; upstreamed)
bf3516
f5250e
* Mon Nov 04 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.0-0.1.a4
f5250e
- Update to Python 3.4 alpha 4.
f5250e
- Refreshed patches: 55 (systemtap), 102 (lib64), 111 (no static lib),
f5250e
114 (statvfs flags), 132 (unittest rpmbuild hooks), 134 (fix COUNT_ALLOCS in
f5250e
test_sys), 143 (tsc on ppc64), 146 (hashlib fips), 153 (test gdb noise),
f5250e
157 (UID+GID overflows), 173 (ENOPROTOOPT in bind_port), 186 (dont raise
f5250e
from py_compile)
f5250e
- Removed patches: 129 (test_subprocess nonreadable dir - no longer fails in
f5250e
Koji), 142 (the mock issue that caused this is fixed)
f5250e
- Added patch 187 (remove thread atfork) - will be in next version
f5250e
- Refreshed script for checking pyc and pyo timestamps with new ignored files.
f5250e
- The fips patch is disabled for now until upstream makes a final decision
f5250e
what to do with sha3 implementation for 3.4.0.
Matej Stuchlik 54afb0
3dbbc1
* Wed Oct 30 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-7
3dbbc1
- Bytecompile all *.py files properly during build (rhbz#1023607)
3dbbc1
Matej Stuchlik 8aaa11
* Fri Aug 23 2013 Matej Stuchlik <mstuchli@redhat.com> - 3.3.2-6
Matej Stuchlik 8aaa11
- Added fix for CVE-2013-4238 (rhbz#996399)
Matej Stuchlik 8aaa11
fbccd6
* Fri Jul 26 2013 Dennis Gilmore <dennis@ausil.us> - 3.3.2-5
fbccd6
- fix up indentation in arm patch
fbccd6
486eb4
* Fri Jul 26 2013 Dennis Gilmore <dennis@ausil.us> - 3.3.2-4
486eb4
- disable a test that fails on arm
486eb4
- enable valgrind support on arm arches
486eb4
001a27
* Tue Jul 02 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-3
001a27
- Fix build with libffi containing multilib wrapper for ffi.h (rhbz#979696).
001a27
22e1cc
* Mon May 20 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-2
22e1cc
- Add patch for CVE-2013-2099 (rhbz#963261).
22e1cc
a60a84
* Thu May 16 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-1
a60a84
- Updated to Python 3.3.2.
a60a84
- Refreshed patches: 153 (gdb test noise)
d4ea6c
- Dropped patches: 175 (configure -Wformat, fixed upstream), 182 (gdb
d4ea6c
test threads)
a60a84
- Synced patch numbers with python.spec.
a60a84
9d658b
* Thu May  9 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.1-4
9d658b
- fix test.test_gdb.PyBtTests.test_threads on ppc64 (patch 181; rhbz#960010)
9d658b
f9db6e
* Thu May 02 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-3
f9db6e
- Add patch that enables building on ppc64p7 (replace the sed, so that
f9db6e
we get consistent with python2 spec and it's more obvious that we're doing it.
f9db6e
b935d2
* Wed Apr 24 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-2
b935d2
- Add fix for gdb tests failing on arm, rhbz#951802.
b935d2
502323
* Tue Apr 09 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-1
502323
- Updated to Python 3.3.1.
502323
- Refreshed patches: 55 (systemtap), 111 (no static lib), 146 (hashlib fips),
502323
153 (fix test_gdb noise), 157 (uid, gid overflow - fixed upstream, just
502323
keeping few more downstream tests)
502323
- Removed patches: 3 (audiotest.au made it to upstream tarball)
502323
- Removed workaround for http://bugs.python.org/issue14774, discussed in
502323
http://bugs.python.org/issue15298 and fixed in revision 24d52d3060e8.
502323
b4d586
* Mon Mar 25 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-10
b4d586
- fix gcc 4.8 incompatibility (rhbz#927358); regenerate autotool intermediates
b4d586
ff7dfb
* Mon Mar 25 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-9
ff7dfb
- renumber patches to keep them in sync with python.spec
ff7dfb
7c28d2
* Fri Mar 15 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.0-8
7c28d2
- Fix error in platform.platform() when non-ascii byte strings are decoded to
7c28d2
  unicode (rhbz#922149)
7c28d2
7c28d2
* Thu Mar 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.0-7
e72147
- Fix up shared library extension (rhbz#889784)
e72147
42e503
* Thu Mar 07 2013 Karsten Hopp <karsten@redhat.com> 3.3.0-6
42e503
- add ppc64p7 build target, optimized for Power7
42e503
260cee
* Mon Mar  4 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-5
260cee
- add workaround for ENOPROTOOPT seen running selftests in Koji
260cee
(rhbz#913732)
260cee
19e1ad
* Mon Mar  4 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-4
19e1ad
- remove config flag from /etc/rpm/macros.{python3|pybytecompile}
19e1ad
a2f645
* Mon Feb 11 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-3
a2f645
- add aarch64 (rhbz#909783)
a2f645
81ac8c
* Thu Nov 29 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-2
81ac8c
- add BR on bluez-libs-devel (rhbz#879720)
81ac8c
513a26
* Sat Sep 29 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-1
513a26
- 3.3.0rc3 -> 3.3.0; drop alphatag
513a26
3705b6
* Mon Sep 24 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.6.rc3
3705b6
- 3.3.0rc2 -> 3.3.0rc3
3705b6
78727d
* Mon Sep 10 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.5.rc2
78727d
- 3.3.0rc1 -> 3.3.0rc2; refresh patch 55
78727d
92d712
* Mon Aug 27 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.4.rc1
92d712
- 3.3.0b2 -> 3.3.0rc1; refresh patches 3, 55
92d712
62d720
* Mon Aug 13 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.3.b2
62d720
- 3.3b1 -> 3.3b2; drop upstreamed patch 152; refresh patches 3, 102, 111,
62d720
134, 153, 160; regenenerate autotools patch; rework systemtap patch to work
62d720
correctly when LANG=C (patch 55); importlib.test was moved to
62d720
test.test_importlib upstream
62d720
d474ec
* Mon Aug 13 2012 Karsten Hopp <karsten@redhat.com> 3.3.0-0.2.b1
d474ec
- disable some failing checks on PPC* (rhbz#846849)
d474ec
6a3856
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.1.b1
1c94c1
- 3.2 -> 3.3: https://fedoraproject.org/wiki/Features/Python_3.3
1c94c1
- 3.3.0b1: refresh patches 3, 55, 102, 111, 113, 114, 134, 157; drop upstream
1c94c1
patch 147; regenenerate autotools patch; drop "--with-wide-unicode" from
1c94c1
configure (PEP 393); "plat-linux2" -> "plat-linux" (upstream issue 12326);
1c94c1
"bz2" -> "_bz2" and "crypt" -> "_crypt"; egg-info files are no longer shipped
1c94c1
for stdlib (upstream issues 10645 and 12218); email/test moved to
1c94c1
test/test_email; add /usr/bin/pyvenv[-3.3] and venv module (PEP 405); add
1c94c1
_decimal and _lzma modules; make collections modules explicit in payload again
1c94c1
(upstream issue 11085); add _testbuffer module to tests subpackage (added in
823581
upstream commit 3f9b3b6f7ff0); fix test failures (patches 160 and 161);
08ca53
workaround erroneously shared _sysconfigdata.py upstream issue #14774; fix
f2b86e
distutils.sysconfig traceback (patch 162); add BuildRequires: xz-devel (for
48d204
_lzma module); skip some tests within test_socket (patch 163)
1c94c1
992402
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-11
992402
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
992402
6a3856
* Fri Jul 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.1.b1
6a3856
cc2383
* Fri Jun 22 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-10
cc2383
- use macro for power64 (rhbz#834653)
cc2383
a25ec0
* Mon Jun 18 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-9
a25ec0
- fix missing include in uid/gid handling patch (patch 157; rhbz#830405)
a25ec0
f011cd
* Wed May 30 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 3.2.3-8
f011cd
- fix tapset for debug build
f011cd
798936
* Tue May 15 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-7
798936
- update uid/gid handling to avoid int overflows seen with uid/gid
798936
values >= 2^31 on 32-bit architectures (patch 157; rhbz#697470)
798936
8cb91f
* Fri May  4 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-6
8cb91f
- renumber autotools patch from 300 to 5000
8cb91f
- specfile cleanups
8cb91f
938d1d
* Mon Apr 30 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-5
938d1d
- fix test_gdb.py (patch 156; rhbz#817072)
938d1d
8a2810
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-4
8a2810
- avoid allocating thunks in ctypes unless absolutely necessary, to avoid
8a2810
generating SELinux denials on "import ctypes" and "import uuid" when embedding
8a2810
Python within httpd (patch 155; rhbz#814391)
8a2810
5974f1
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-3
5974f1
- add explicit version requirements on expat to avoid linkage problems with
5974f1
XML_SetHashSalt
5974f1
3170c0
* Thu Apr 12 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-2
3170c0
- fix test_gdb (patch 153)
3170c0
288566
* Wed Apr 11 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-1
288566
- 3.2.3; refresh patch 102 (lib64); drop upstream patches 148 (gdbm magic
288566
values), 149 (__pycache__ fix); add patch 152 (test_gdb regex)
288566
Thomas Spura ae2fc1
* Thu Feb  9 2012 Thomas Spura <tomspur@fedoraproject.org> - 3.2.2-13
Thomas Spura ae2fc1
- use newly installed python for byte compiling (now for real)
Thomas Spura e6314e
Thomas Spura 1c26b6
* Sun Feb  5 2012 Thomas Spura <tomspur@fedoraproject.org> - 3.2.2-12
Thomas Spura 1c26b6
- use newly installed python for byte compiling (#787498)
Thomas Spura 1c26b6
8a69a6
* Wed Jan  4 2012 Ville Skyttä <ville.skytta@iki.fi> - 3.2.2-11
8a69a6
- Build with $RPM_LD_FLAGS (#756863).
8a69a6
- Use xz-compressed source tarball.
8a69a6
1af138
* Wed Dec 07 2011 Karsten Hopp <karsten@redhat.com> 3.2.2-10
1af138
- disable rAssertAlmostEqual in test_cmath on PPC (#750811)
1af138
8c9e38
* Mon Oct 17 2011 Rex Dieter <rdieter@fedoraproject.org> - 3.2.2-9
8c9e38
- python3-devel missing autogenerated pkgconfig() provides (#746751)
8c9e38
e2a3db
* Mon Oct 10 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-8
e2a3db
- cherrypick fix for distutils not using __pycache__ when byte-compiling
e2a3db
files (rhbz#722578)
e2a3db
9b8d22
* Fri Sep 30 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-7
9b8d22
- re-enable gdbm (patch 148; rhbz#742242)
9b8d22
ab415c
* Fri Sep 16 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-6
ab415c
- add a sys._debugmallocstats() function (patch 147)
ab415c
b8f92b
* Wed Sep 14 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-5
b8f92b
- support OpenSSL FIPS mode in _hashlib and hashlib; don't build the _md5 and
b8f92b
_sha* modules, relying on _hashlib in hashlib (rhbz#563986; patch 146)
b8f92b
5fe31d
* Tue Sep 13 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-4
5fe31d
- disable gdbm module to prepare for gdbm soname bump
5fe31d
c923b5
* Mon Sep 12 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-3
c923b5
- renumber and rename patches for consistency with python.spec (8 to 55, 106
c923b5
to 104, 6 to 111, 104 to 113, 105 to 114, 125, 131, 130 to 143)
c923b5
0c8875
* Sat Sep 10 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-2
0c8875
- rewrite of "check", introducing downstream-only hooks for skipping specific
0c8875
cases in an rpmbuild (patch 132), and fixing/skipping failing tests in a more
0c8875
fine-grained manner than before; (patches 106, 133-142 sparsely, moving</