Blame SPECS/python.spec

8dc7a2
# ======================================================
8dc7a2
# Conditionals and other variables controlling the build
8dc7a2
# ======================================================
8dc7a2
159b10
# NOTES ON BOOTSTRAPING PYTHON 3.5:
8dc7a2
#
8dc7a2
# Due to dependency cycle between Python, pip, setuptools and
8dc7a2
# wheel caused by the rewheel patch, one has to build in the
8dc7a2
# following order:
8dc7a2
#
8dc7a2
# 1) python3 with with_rewheel set to 0
8dc7a2
# 2) python3-setuptools and python3-pip with with_rewheel set to 0
8dc7a2
# 3) python3-wheel
8dc7a2
# 4) python3-setuptools and python3-pip with with_rewheel set to 1
8dc7a2
# 5) python3 with with_rewheel set to 1
8dc7a2
8dc7a2
%global with_rewheel 1
8dc7a2
8dc7a2
%{!?scl:%global pkg_name %{name}}
8dc7a2
%{?scl:%scl_package python}
8dc7a2
# Turn off default SCL bytecompiling.
8dc7a2
%{?scl:%global _turn_off_bytecompile 1}
8dc7a2
8dc7a2
8dc7a2
%global pybasever 3.5
8dc7a2
8dc7a2
# pybasever without the dot:
8dc7a2
%global pyshortver 35
8dc7a2
8dc7a2
%global pylibdir %{_libdir}/python%{pybasever}
8dc7a2
%global dynload_dir %{pylibdir}/lib-dynload
8dc7a2
8dc7a2
# SOABI is defined in the upstream configure.in from Python-3.2a2 onwards,
8dc7a2
# for PEP 3149:
8dc7a2
#   http://www.python.org/dev/peps/pep-3149/
8dc7a2
8dc7a2
# ("configure.in" became "configure.ac" in Python 3.3 onwards, and in
8dc7a2
# backports)
8dc7a2
8dc7a2
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
8dc7a2
# With Python 3.3, we lose the "u" suffix due to PEP 393
8dc7a2
%global ABIFLAGS_optimized m
8dc7a2
%global ABIFLAGS_debug     dm
8dc7a2
8dc7a2
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
8dc7a2
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
8dc7a2
8dc7a2
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu}
8dc7a2
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu}
8dc7a2
8dc7a2
# All bytecode files are now in a __pycache__ subdirectory, with a name
8dc7a2
# reflecting the version of the bytecode (to permit sharing of python libraries
8dc7a2
# between different runtimes)
8dc7a2
# See http://www.python.org/dev/peps/pep-3147/
8dc7a2
# For example,
8dc7a2
#   foo/bar.py
8dc7a2
# now has bytecode at:
8dc7a2
#   foo/__pycache__/bar.cpython-35.pyc
8dc7a2
#   foo/__pycache__/bar.cpython-35.pyo
8dc7a2
%global bytecode_suffixes .cpython-35*.py?
8dc7a2
8dc7a2
# Python's configure script defines SOVERSION, and this is used in the Makefile
8dc7a2
# to determine INSTSONAME, the name of the libpython DSO:
8dc7a2
#   LDLIBRARY='libpython$(VERSION).so'
8dc7a2
#   INSTSONAME="$LDLIBRARY".$SOVERSION
8dc7a2
# We mirror this here in order to make it easier to add the -gdb.py hooks.
8dc7a2
# (if these get out of sync, the payload of the libs subpackage will fail
8dc7a2
# and halt the build)
8dc7a2
%global py_SOVERSION %{scl}-1.0
8dc7a2
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
8dc7a2
%global py_INSTSONAME_debug     libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
8dc7a2
8dc7a2
%global with_debug_build 1
8dc7a2
8dc7a2
%global with_gdb_hooks 1
8dc7a2
8dc7a2
%global with_systemtap 1
8dc7a2
8dc7a2
# some arches don't have valgrind so we need to disable its support on them
8dc7a2
%ifarch s390
8dc7a2
%global with_valgrind 1
8dc7a2
%else
8dc7a2
%global with_valgrind 0
8dc7a2
%endif
8dc7a2
8dc7a2
%global with_gdbm 1
8dc7a2
8dc7a2
# Change from yes to no to turn this off
8dc7a2
%global with_computed_gotos yes
8dc7a2
8dc7a2
# Turn this to 0 to turn off the "check" phase:
8dc7a2
%global run_selftest_suite 1
8dc7a2
8dc7a2
# We want to byte-compile the .py files within the packages using the new
8dc7a2
# python3 binary.
8dc7a2
#
8dc7a2
# Unfortunately, rpmbuild's infrastructure requires us to jump through some
8dc7a2
# hoops to avoid byte-compiling with the system python 2 version:
8dc7a2
#   /usr/lib/rpm/redhat/macros sets up build policy that (amongst other things)
8dc7a2
# defines __os_install_post.  In particular, "brp-python-bytecompile" is
8dc7a2
# invoked without an argument thus using the wrong version of python
8dc7a2
# (/usr/bin/python, rather than the freshly built python), thus leading to
8dc7a2
# numerous syntax errors, and incorrect magic numbers in the .pyc files.  We
8dc7a2
# thus override __os_install_post to avoid invoking this script:
8dc7a2
%global __os_install_post /usr/lib/rpm/brp-%{?scl:scl-}compress %{?_scl_root}\
8dc7a2
  %{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
8dc7a2
  /usr/lib/rpm/brp-strip-static-archive %{__strip} \
8dc7a2
  /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
8dc7a2
  /usr/lib/rpm/redhat/brp-python-hardlink
8dc7a2
# to remove the invocation of brp-python-bytecompile, whilst keeping the
8dc7a2
# invocation of brp-python-hardlink (since this should still work for python3
8dc7a2
# pyc/pyo files)
8dc7a2
8dc7a2
8dc7a2
# We need to get a newer configure generated out of configure.in for the following
8dc7a2
# patches:
8dc7a2
#   patch 55 (systemtap)
8dc7a2
#   patch 113 (more config flags)
8dc7a2
#
8dc7a2
# For patch 55 (systemtap), we need to get a new header for configure to use
8dc7a2
#
8dc7a2
# configure.in requires autoconf-2.65, but the version in Fedora is currently
8dc7a2
# autoconf-2.66
8dc7a2
#
8dc7a2
# For now, we'll generate a patch to the generated configure script and
8dc7a2
# pyconfig.h.in on a machine that has a local copy of autoconf 2.65
8dc7a2
#
8dc7a2
# Instructions on obtaining such a copy can be seen at
8dc7a2
#   http://bugs.python.org/issue7997
8dc7a2
#
8dc7a2
# To make it easy to regenerate the patch, this specfile can be run in two
8dc7a2
# ways:
8dc7a2
# (i) regenerate_autotooling_patch  0 : the normal approach: prep the
8dc7a2
# source tree using a pre-generated patch to the "configure" script, and do a
8dc7a2
# full build
8dc7a2
# (ii) regenerate_autotooling_patch 1 : intended to be run on a developer's
8dc7a2
# workstation: prep the source tree without patching configure, then rerun a
8dc7a2
# local copy of autoconf-2.65, regenerate the patch, then exit, without doing
8dc7a2
# the rest of the build
8dc7a2
%global regenerate_autotooling_patch 0
8dc7a2
8dc7a2
8dc7a2
# ==================
8dc7a2
# Top-level metadata
8dc7a2
# ==================
8dc7a2
Summary: Version 3 of the Python programming language aka Python 3000
8dc7a2
Name: %{?scl_prefix}python
8dc7a2
Version: %{pybasever}.1
cdcbdc
Release: 13%{?dist}
8dc7a2
License: Python
8dc7a2
Group: Development/Languages
8dc7a2
8dc7a2
8dc7a2
# =======================
8dc7a2
# Build-time requirements
8dc7a2
# =======================
8dc7a2
8dc7a2
# (keep this list alphabetized)
8dc7a2
8dc7a2
%{?scl:BuildRequires: %{scl}-runtime}
8dc7a2
BuildRequires: autoconf
8dc7a2
BuildRequires: bluez-libs-devel
8dc7a2
BuildRequires: bzip2
8dc7a2
BuildRequires: bzip2-devel
8dc7a2
BuildRequires: libdb-devel
8dc7a2
8dc7a2
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
8dc7a2
# it (in pyexpat) in order to enable the fix in Python-3.2.3 for CVE-2012-0876:
8dc7a2
BuildRequires: expat-devel
8dc7a2
8dc7a2
BuildRequires: findutils
8dc7a2
BuildRequires: gcc-c++
8dc7a2
%if %{with_gdbm}
8dc7a2
BuildRequires: gdbm-devel
8dc7a2
%endif
8dc7a2
BuildRequires: glibc-devel
8dc7a2
BuildRequires: gmp-devel
8dc7a2
BuildRequires: libffi-devel
8dc7a2
BuildRequires: libGL-devel
8dc7a2
BuildRequires: libX11-devel
8dc7a2
BuildRequires: ncurses-devel
8dc7a2
# workaround http://bugs.python.org/issue19804 (test_uuid requires ifconfig)
8dc7a2
BuildRequires: net-tools
8dc7a2
BuildRequires: openssl-devel
8dc7a2
BuildRequires: pkgconfig
8dc7a2
BuildRequires: readline-devel
8dc7a2
BuildRequires: sqlite-devel
8dc7a2
8dc7a2
%if 0%{?with_systemtap}
8dc7a2
BuildRequires: systemtap-sdt-devel
8dc7a2
# (this introduces a dependency on "python", in that systemtap-sdt-devel's
8dc7a2
# /usr/bin/dtrace is a python 2 script)
8dc7a2
%global tapsetdir      %{_datadir}/systemtap/tapset
8dc7a2
%endif # with_systemtap
8dc7a2
8dc7a2
BuildRequires: tar
8dc7a2
BuildRequires: tcl-devel
8dc7a2
BuildRequires: tix-devel
8dc7a2
BuildRequires: tk-devel
8dc7a2
8dc7a2
%if 0%{?with_valgrind}
8dc7a2
BuildRequires: valgrind-devel
8dc7a2
%endif
8dc7a2
8dc7a2
BuildRequires: xz-devel
8dc7a2
BuildRequires: zlib-devel
8dc7a2
8dc7a2
%if 0%{?with_rewheel}
8dc7a2
BuildRequires: %{?scl_prefix}python-setuptools
8dc7a2
BuildRequires: %{?scl_prefix}python-pip
8dc7a2
%endif
8dc7a2
8dc7a2
8dc7a2
# =======================
8dc7a2
# Source code and patches
8dc7a2
# =======================
8dc7a2
8dc7a2
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
8dc7a2
8dc7a2
# Avoid having various bogus auto-generated Provides lines for the various
8dc7a2
# python c modules' SONAMEs:
8dc7a2
8dc7a2
# Supply various useful macros for building python 3 modules:
8dc7a2
#  __python3, python3_sitelib, python3_sitearch
8dc7a2
Source2: macros.python3
8dc7a2
8dc7a2
# Supply an RPM macro "py_byte_compile" for the python3-devel subpackage
8dc7a2
# to enable specfiles to selectively byte-compile individual files and paths
8dc7a2
# with different Python runtimes as necessary:
8dc7a2
Source3: macros.pybytecompile
8dc7a2
8dc7a2
# Systemtap tapset to make it easier to use the systemtap static probes
8dc7a2
# (actually a template; LIBRARY_PATH will get fixed up during install)
8dc7a2
# Written by dmalcolm; not yet sent upstream
8dc7a2
Source5: libpython.stp
8dc7a2
8dc7a2
# Example systemtap script using the tapset
8dc7a2
# Written by wcohen, mjw, dmalcolm; not yet sent upstream
8dc7a2
Source6: systemtap-example.stp
8dc7a2
8dc7a2
# Another example systemtap script that uses the tapset
8dc7a2
# Written by dmalcolm; not yet sent upstream
8dc7a2
Source7: pyfuntop.stp
8dc7a2
8dc7a2
# SCL-custom version of pythondeps.sh
8dc7a2
# Append 35 to not collide with python27 SCL
8dc7a2
8dc7a2
# Append 35 for the same reason here
8dc7a2
Source9: brp-python-bytecompile-with-scl-python-35
8dc7a2
8dc7a2
Source10:  check-pyc-and-pyo-timestamps.py
8dc7a2
8dc7a2
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
8dc7a2
# Was Patch0 in ivazquez' python3000 specfile:
8dc7a2
Patch1:         Python-3.1.1-rpath.patch
8dc7a2
8dc7a2
# Some tests were removed due to audiotest.au not being packaged. This was
8dc7a2
# however added to the archive in 3.3.1, so we no longer delete the tests.
8dc7a2
#  Patch3: 00003-remove-mimeaudio-tests.patch
8dc7a2
8dc7a2
# 00055 #
8dc7a2
# Systemtap support: add statically-defined probe points
8dc7a2
# Patch sent upstream as http://bugs.python.org/issue14776
8dc7a2
# with some subsequent reworking to cope with LANG=C in an rpmbuild
8dc7a2
# (where sys.getfilesystemencoding() == 'ascii')
8dc7a2
Patch55: 00055-systemtap.patch
8dc7a2
8dc7a2
Patch102: 00102-lib64.patch
8dc7a2
8dc7a2
# 00104 #
8dc7a2
# Only used when "%%{_lib}" == "lib64"
8dc7a2
# Another lib64 fix, for distutils/tests/test_install.py; not upstream:
8dc7a2
Patch104: 00104-lib64-fix-for-test_install.patch
8dc7a2
8dc7a2
# 00111 #
8dc7a2
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
8dc7a2
# a libpythonMAJOR.MINOR.a (bug 550692):
8dc7a2
# Downstream only: not appropriate for upstream
8dc7a2
Patch111: 00111-no-static-lib.patch
8dc7a2
8dc7a2
# 00112 #
8dc7a2
# Patch112: python-2.7rc1-debug-build.patch: this is not relevant to Python 3,
8dc7a2
# for 3.2 onwards
8dc7a2
8dc7a2
# 00114 #
8dc7a2
# Upstream as of Python 3.4.0.b2
8dc7a2
#  Patch114: 00114-statvfs-f_flag-constants.patch
8dc7a2
8dc7a2
# 00130 #
8dc7a2
# Python 2's:
8dc7a2
#   Patch130: python-2.7.2-add-extension-suffix-to-python-config.patch
8dc7a2
# is not relevant to Python 3 (for 3.2 onwards)
8dc7a2
8dc7a2
# 00131 #
8dc7a2
# The four tests in test_io built on top of check_interrupted_write_retry
8dc7a2
# fail when built in Koji, for ppc and ppc64; for some reason, the SIGALRM
8dc7a2
# handlers are never called, and the call to write runs to completion
8dc7a2
# (rhbz#732998)
8dc7a2
Patch131: 00131-disable-tests-in-test_io.patch
8dc7a2
8dc7a2
# 00132 #
8dc7a2
# Add non-standard hooks to unittest for use in the "check" phase below, when
8dc7a2
# running selftests within the build:
8dc7a2
#   @unittest._skipInRpmBuild(reason)
8dc7a2
# for tests that hang or fail intermittently within the build environment, and:
8dc7a2
#   @unittest._expectedFailureInRpmBuild
8dc7a2
# for tests that always fail within the build environment
8dc7a2
#
8dc7a2
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the
8dc7a2
# environment, which we set manually in the appropriate portion of the "check"
8dc7a2
# phase below (and which potentially other python-* rpms could set, to reuse
8dc7a2
# these unittest hooks in their own "check" phases)
8dc7a2
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
8dc7a2
8dc7a2
# 00133 #
8dc7a2
# 00133-skip-test_dl.patch is not relevant for python3: the "dl" module no
8dc7a2
# longer exists
8dc7a2
8dc7a2
# 00136 #
8dc7a2
# Patch136: 00136-skip-tests-of-seeking-stdin-in-rpmbuild.patch does not seem
8dc7a2
# to be needed by python3
8dc7a2
8dc7a2
# 00137 #
8dc7a2
# Some tests within distutils fail when run in an rpmbuild:
8dc7a2
Patch137: 00137-skip-distutils-tests-that-fail-in-rpmbuild.patch
8dc7a2
8dc7a2
# 00138 #
8dc7a2
# Patch138: 00138-fix-distutils-tests-in-debug-build.patch is not relevant for
8dc7a2
# python3
8dc7a2
8dc7a2
# 00139 #
8dc7a2
# ARM-specific: skip known failure in test_float:
8dc7a2
#  http://bugs.python.org/issue8265 (rhbz#706253)
8dc7a2
Patch139: 00139-skip-test_float-known-failure-on-arm.patch
8dc7a2
8dc7a2
# ideally short lived patch disabling a test thats fragile on different arches
8dc7a2
Patch140: python3-arm-skip-failing-fragile-test.patch
8dc7a2
8dc7a2
# Patch140: 00140-skip-test_ctypes-known-failure-on-sparc.patch does not appear
8dc7a2
# to be relevant for python3
8dc7a2
8dc7a2
# 00143 #
8dc7a2
# Fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid
8dc7a2
# aliasing violations (rhbz#698726)
8dc7a2
# Sent upstream as http://bugs.python.org/issue12872
8dc7a2
Patch143: 00143-tsc-on-ppc.patch
8dc7a2
8dc7a2
# 00144 #
8dc7a2
# (Optionally) disable the gdbm module:
8dc7a2
# python.spec's
8dc7a2
#   Patch144: 00144-no-gdbm.patch
8dc7a2
# is not needed in python3.spec
8dc7a2
8dc7a2
# 00145 #
8dc7a2
# python.spec's
8dc7a2
#   Patch145: 00145-force-sys-platform-to-be-linux2.patch
8dc7a2
# is upstream for Python 3 as of 3.2.2
8dc7a2
8dc7a2
# 00146 #
8dc7a2
# Support OpenSSL FIPS mode (e.g. when OPENSSL_FORCE_FIPS_MODE=1 is set)
8dc7a2
# - handle failures from OpenSSL (e.g. on attempts to use MD5 in a
8dc7a2
#   FIPS-enforcing environment)
8dc7a2
# - add a new "usedforsecurity" keyword argument to the various digest
8dc7a2
#   algorithms in hashlib so that you can whitelist a callsite with
8dc7a2
#   "usedforsecurity=False"
8dc7a2
# (sent upstream for python 3 as http://bugs.python.org/issue9216 ; see RHEL6
8dc7a2
# python patch 119)
8dc7a2
# - enforce usage of the _hashlib implementation: don't fall back to the _md5
8dc7a2
#   and _sha* modules (leading to clearer error messages if fips selftests
8dc7a2
#   fail)
8dc7a2
# - don't build the _md5 and _sha* modules; rely on the _hashlib implementation
8dc7a2
#   of hashlib
8dc7a2
# (rhbz#563986)
8dc7a2
# Note: Up to Python 3.4.0.b1, upstream had their own implementation of what
8dc7a2
# they assumed would become sha3. This patch was adapted to give it the
8dc7a2
# usedforsecurity argument, even though it did nothing (OpenSSL didn't have
8dc7a2
# sha3 implementation at that time).In 3.4.0.b2, sha3 implementation was reverted
8dc7a2
# (see http://bugs.python.org/issue16113), but the alterations were left in the
8dc7a2
# patch, since they may be useful again if upstream decides to rerevert sha3
8dc7a2
# implementation and OpenSSL still doesn't support it. For now, they're harmless.
8dc7a2
Patch146: 00146-hashlib-fips.patch
8dc7a2
8dc7a2
# 00147 #
8dc7a2
# Add a sys._debugmallocstats() function
8dc7a2
# Sent upstream as http://bugs.python.org/issue14785
8dc7a2
# Upstream as of Python 3.3.0
8dc7a2
#  Patch147: 00147-add-debug-malloc-stats.patch
8dc7a2
8dc7a2
# 00148 #
8dc7a2
# Upstream as of Python 3.2.3:
8dc7a2
#  Patch148: 00148-gdbm-1.9-magic-values.patch
8dc7a2
8dc7a2
# 00149 #
8dc7a2
# Upstream as of Python 3.2.3:
8dc7a2
#  Patch149: 00149-backport-issue11254-pycache-bytecompilation-fix.patch
8dc7a2
8dc7a2
# 00150 #
8dc7a2
# temporarily disable rAssertAlmostEqual in test_cmath on PPC (bz #750811)
8dc7a2
# caused by a glibc bug. This patch can be removed when we have a glibc with
8dc7a2
# the patch mentioned here:
8dc7a2
#   http://sourceware.org/bugzilla/show_bug.cgi?id=13472
8dc7a2
Patch150: 00150-disable-rAssertAlmostEqual-cmath-on-ppc.patch
8dc7a2
8dc7a2
# 00151 #
8dc7a2
# python.spec had:
8dc7a2
#  Patch151: 00151-fork-deadlock.patch
8dc7a2
8dc7a2
# 00152 #
8dc7a2
# Fix a regex in test_gdb so that it doesn't choke when gdb provides a full
8dc7a2
# path to Python/bltinmodule.c:
8dc7a2
# Committed upstream as 77824:abcd29c9a791 as part of fix for
8dc7a2
# http://bugs.python.org/issue12605
8dc7a2
#  Patch152: 00152-fix-test-gdb-regex.patch
8dc7a2
8dc7a2
# 00153 #
8dc7a2
# Strip out lines of the form "warning: Unable to open ..." from gdb's stderr
8dc7a2
# when running test_gdb.py; also cope with change to gdb in F17 onwards in
8dc7a2
# which values are printed as "v@entry" rather than just "v":
8dc7a2
# Not yet sent upstream
8dc7a2
# Upstream as of 3.4.3
8dc7a2
#  Patch153: 00153-fix-test_gdb-noise.patch
8dc7a2
8dc7a2
# 00154 #
8dc7a2
# python3.spec on f15 has:
8dc7a2
#  Patch154: 00154-skip-urllib-test-requiring-working-DNS.patch
8dc7a2
8dc7a2
# 00155 #
8dc7a2
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
8dc7a2
# generating SELinux denials on "import ctypes" and "import uuid" when
8dc7a2
# embedding Python within httpd (rhbz#814391)
8dc7a2
Patch155: 00155-avoid-ctypes-thunks.patch
8dc7a2
8dc7a2
# 00156 #
8dc7a2
# Recent builds of gdb will only auto-load scripts from certain safe
8dc7a2
# locations.  Turn off this protection when running test_gdb in the selftest
8dc7a2
# suite to ensure that it can load our -gdb.py script (rhbz#817072):
8dc7a2
# Upsream as of 3.4.3
8dc7a2
#  Patch156: 00156-gdb-autoload-safepath.patch
8dc7a2
8dc7a2
# 00157 #
8dc7a2
# Update uid/gid handling throughout the standard library: uid_t and gid_t are
8dc7a2
# unsigned 32-bit values, but existing code often passed them through C long
8dc7a2
# values, which are signed 32-bit values on 32-bit architectures, leading to
8dc7a2
# negative int objects for uid/gid values >= 2^31 on 32-bit architectures.
8dc7a2
#
8dc7a2
# Introduce _PyObject_FromUid/Gid to convert uid_t/gid_t values to python
8dc7a2
# objects, using int objects where the value will fit (long objects otherwise),
8dc7a2
# and _PyArg_ParseUid/Gid to convert int/long to uid_t/gid_t, with -1 allowed
8dc7a2
# as a special case (since this is given special meaning by the chown syscall)
8dc7a2
#
8dc7a2
# Update standard library to use this throughout for uid/gid values, so that
8dc7a2
# very large uid/gid values are round-trippable, and -1 remains usable.
8dc7a2
# (rhbz#697470)
8dc7a2
Patch157: 00157-uid-gid-overflows.patch
8dc7a2
8dc7a2
# 00158 #
8dc7a2
# Upstream as of Python 3.3.1
8dc7a2
8dc7a2
# 00159 #
8dc7a2
#  Patch159: 00159-correct-libdb-include-path.patch
8dc7a2
# in python.spec
8dc7a2
# TODO: python3 status?
8dc7a2
8dc7a2
# 00160 #
8dc7a2
# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the
8dc7a2
# header files in the build chroot, but may not be supported in the running
8dc7a2
# kernel, hence we disable this test in an rpm build.
8dc7a2
# Adding these was upstream issue http://bugs.python.org/issue10142
8dc7a2
# Not yet sent upstream
8dc7a2
Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
8dc7a2
8dc7a2
# 00161 #
8dc7a2
# (Was only needed for Python 3.3.0b1)
8dc7a2
8dc7a2
# 00162 #
8dc7a2
# (Was only needed for Python 3.3.0b1)
8dc7a2
8dc7a2
# 00163 #
8dc7a2
# Some tests within test_socket fail intermittently when run inside Koji;
8dc7a2
# disable them using unittest._skipInRpmBuild
8dc7a2
# Not yet sent upstream
8dc7a2
Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch
8dc7a2
8dc7a2
# 0164 #
8dc7a2
# some tests in test._io interrupted_write-* fail on PPC (rhbz#846849)
8dc7a2
# testChainingDescriptors  test in test_exceptions fails on PPc, too (rhbz#846849)
8dc7a2
# disable those tests so that rebuilds on PPC can continue
8dc7a2
Patch164: 00164-disable-interrupted_write-tests-on-ppc.patch
8dc7a2
8dc7a2
# 00165 #
8dc7a2
# python.spec has:
8dc7a2
#   Patch165: 00165-crypt-module-salt-backport.patch
8dc7a2
# which is a backport from 3.3 and thus not relevant to "python3"
8dc7a2
8dc7a2
# 00166 #
8dc7a2
#  Patch166: 00166-fix-fake-repr-in-gdb-hooks.patch
8dc7a2
# in python.spec
8dc7a2
# TODO: python3 status?
8dc7a2
8dc7a2
# 00167 #
8dc7a2
#  Patch167: 00167-disable-stack-navigation-tests-when-optimized-in-test_gdb.patch
8dc7a2
# in python.spec
8dc7a2
# TODO: python3 status?
8dc7a2
8dc7a2
# 00168 #
8dc7a2
#  Patch168: 00168-distutils-cflags.patch
8dc7a2
# in python.spec
8dc7a2
# TODO: python3 status?
8dc7a2
8dc7a2
# 00169 #
8dc7a2
#  Patch169: 00169-avoid-implicit-usage-of-md5-in-multiprocessing.patch
8dc7a2
# in python.spec
8dc7a2
# TODO: python3 status?
8dc7a2
8dc7a2
# 00170 #
8dc7a2
# In debug builds, try to print repr() when a C-level assert fails in the
8dc7a2
# garbage collector (typically indicating a reference-counting error
8dc7a2
# somewhere else e.g in an extension module)
8dc7a2
# Backported to 2.7 from a patch I sent upstream for py3k
8dc7a2
#   http://bugs.python.org/issue9263  (rhbz#614680)
8dc7a2
# hiding the proposed new macros/functions within gcmodule.c to avoid exposing
8dc7a2
# them within the extension API.
8dc7a2
# (rhbz#850013
8dc7a2
Patch170: 00170-gc-assertions.patch
8dc7a2
8dc7a2
# 00171 #
8dc7a2
# python.spec had:
8dc7a2
#  Patch171: 00171-raise-correct-exception-when-dev-urandom-is-missing.patch
8dc7a2
# TODO: python3 status?
8dc7a2
8dc7a2
# 00172 #
8dc7a2
# python.spec had:
8dc7a2
#  Patch172: 00172-use-poll-for-multiprocessing-socket-connection.patch
8dc7a2
# TODO: python3 status?
8dc7a2
8dc7a2
# 00173 #
8dc7a2
# Workaround for ENOPROTOOPT seen in Koji withi test.support.bind_port()
8dc7a2
# (rhbz#913732)
8dc7a2
Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch
8dc7a2
8dc7a2
# 00174 #
8dc7a2
#  Patch174: 00174-fix-for-usr-move.patch
8dc7a2
# TODO: python3 status?
8dc7a2
8dc7a2
# 00175 #
8dc7a2
# Upstream as of Python 3.3.2
8dc7a2
#  Patch175: 00175-fix-configure-Wformat.patch
8dc7a2
8dc7a2
# 00176 #
8dc7a2
# Fixed upstream as of Python 3.3.1
8dc7a2
#  Patch176: 00176-upstream-issue16754-so-extension.patch
8dc7a2
8dc7a2
# 00177 #
8dc7a2
# Fixed upstream as of Python 3.4.0.b2
8dc7a2
#  Patch177: 00177-platform-unicode.patch
8dc7a2
8dc7a2
# 00178 #
8dc7a2
# Don't duplicate various FLAGS in sysconfig values
8dc7a2
# http://bugs.python.org/issue17679
8dc7a2
# Does not affect python2 AFAICS (different sysconfig values initialization)
8dc7a2
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
8dc7a2
8dc7a2
# 00179 #
8dc7a2
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=951802
8dc7a2
# Reported upstream in http://bugs.python.org/issue17737
8dc7a2
# This patch basically looks at every frame and if it is somehow corrupted,
8dc7a2
# it just stops printing the traceback - it doesn't fix the actual bug.
8dc7a2
# This bug seems to only affect ARM.
8dc7a2
# Doesn't seem to affect Python 2 AFAICS.
8dc7a2
Patch179: 00179-dont-raise-error-on-gdb-corrupted-frames-in-backtrace.patch
8dc7a2
8dc7a2
# 00180 #
8dc7a2
# Enable building on ppc64p7
8dc7a2
# Not appropriate for upstream, Fedora-specific naming
8dc7a2
Patch180: 00180-python-add-support-for-ppc64p7.patch
8dc7a2
8dc7a2
# 00181 #
8dc7a2
# python.spec has
8dc7a2
#  Patch181: 00181-allow-arbitrary-timeout-in-condition-wait.patch
8dc7a2
# Does not affect python3
8dc7a2
8dc7a2
# 00182 #
8dc7a2
# Fixed upstream as of Python 3.3.2
8dc7a2
#  Patch182: 00182-fix-test_gdb-test_threads.patch
8dc7a2
8dc7a2
# 00183 #
8dc7a2
# Fixed upstream as of Python 3.4.0a4
8dc7a2
#  Patch183: 00183-cve-2013-2099-fix-ssl-match_hostname-dos.patch
8dc7a2
8dc7a2
# 00184 #
8dc7a2
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=979696
8dc7a2
# Fixes build of ctypes against libffi with multilib wrapper
8dc7a2
# Python recognizes ffi.h only if it contains "#define LIBFFI_H",
8dc7a2
# but the wrapper doesn't contain that, which makes the build fail
8dc7a2
# We patch this by also accepting "#define ffi_wrapper_h"
8dc7a2
Patch184: 00184-ctypes-should-build-with-libffi-multilib-wrapper.patch
8dc7a2
8dc7a2
# 00185 #
8dc7a2
# Fixed upstream as of Python 3.4.0a4
8dc7a2
#  Patch185: 00185-CVE-2013-4238-hostname-check-bypass-in-SSL-module.patch
8dc7a2
8dc7a2
# 00186 #
8dc7a2
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1023607
8dc7a2
# Previously, this fixed a problem where some *.py files were not being
8dc7a2
# bytecompiled properly during build. This was result of py_compile.compile
8dc7a2
# raising exception when trying to convert test file with bad encoding, and
8dc7a2
# thus not continuing bytecompilation for other files.
8dc7a2
# This was fixed upstream, but the test hasn't been merged yet, so we keep it
8dc7a2
Patch186: 00186-dont-raise-from-py_compile.patch
8dc7a2
8dc7a2
# 00187 #
8dc7a2
# Fixed upstream as of Python 3.4.0b1
8dc7a2
#  Patch187: 00187-remove-pthread-atfork.patch
8dc7a2
8dc7a2
# 00188 #
8dc7a2
# Downstream only patch that should be removed when we compile all guaranteed
8dc7a2
# hashlib algorithms properly. The problem is this:
8dc7a2
# - during tests, test_hashlib is imported and executed before test_lib2to3
8dc7a2
# - if at least one hash function has failed, trying to import it triggers an
8dc7a2
#   exception that is being caught and exception is logged:
8dc7a2
#   http://hg.python.org/cpython/file/2de806c8b070/Lib/hashlib.py#l217
8dc7a2
# - logging the exception makes logging module run basicConfig
8dc7a2
# - when lib2to3 tests are run again, lib2to3 runs basicConfig again, which
8dc7a2
#   doesn't do anything, because it was run previously
8dc7a2
#   (logging.root.handlers != []), which means that the default setup
8dc7a2
#   (most importantly logging level) is not overriden. That means that a test
8dc7a2
#   relying on this will fail (test_filename_changing_on_output_single_dir)
8dc7a2
Patch188: 00188-fix-lib2to3-tests-when-hashlib-doesnt-compile-properly.patch
8dc7a2
8dc7a2
# 00189 #
8dc7a2
#
8dc7a2
# Add the rewheel module, allowing to recreate wheels from already installed
8dc7a2
# ones
8dc7a2
# https://github.com/bkabrda/rewheel
8dc7a2
%if 0%{with_rewheel}
8dc7a2
Patch189: 00189-add-rewheel-module.patch
8dc7a2
%endif
8dc7a2
8dc7a2
# 00190 #
8dc7a2
#
8dc7a2
# Fix tests with SQLite >= 3.8.4
8dc7a2
# http://bugs.python.org/issue20901
8dc7a2
# http://hg.python.org/cpython/rev/4d626a9df062
8dc7a2
# FIXED UPSTREAM
8dc7a2
# Patch190: 00190-fix-tests-with-sqlite-3.8.4.patch
8dc7a2
8dc7a2
# 00193
8dc7a2
#
8dc7a2
# Skip correct number of *.pyc file bytes in ModuleFinder.load_module
8dc7a2
# rhbz#1060338
8dc7a2
# http://bugs.python.org/issue20778
8dc7a2
# FIXED UPSTREAM
8dc7a2
# Patch193: 00193-skip-correct-num-of-pycfile-bytes-in-modulefinder.patch
8dc7a2
8dc7a2
# Tests requiring SIGHUP to work don't work in Koji
8dc7a2
# see rhbz#1088233
8dc7a2
Patch194: temporarily-disable-tests-requiring-SIGHUP.patch
8dc7a2
8dc7a2
# 00195
8dc7a2
#
8dc7a2
# Don't declare Werror=declaration-after-statement for extension
8dc7a2
# modules through setup.py
8dc7a2
# http://bugs.python.org/issue21121
8dc7a2
# FIXED UPSTREAM
8dc7a2
# Patch195: 00195-dont-add-Werror-declaration-after-statement.patch
8dc7a2
8dc7a2
# 00196
8dc7a2
#
8dc7a2
#  Fix test_gdb failure on ppc64le
8dc7a2
Patch196: 00196-test-gdb-match-addr-before-builtin.patch
8dc7a2
8dc7a2
# 00197
8dc7a2
#
8dc7a2
# The CGIHTTPServer Python module did not properly handle URL-encoded
8dc7a2
# path separators in URLs. This may have enabled attackers to disclose a CGI
8dc7a2
# script's source code or execute arbitrary scripts in the server's
8dc7a2
# document root.
8dc7a2
# FIXED UPSTREAM
8dc7a2
# Patch197: 00197-fix-CVE-2014-4650.patch
8dc7a2
8dc7a2
# 00201 #
8dc7a2
# Fixes memory leak in gdbm module (rhbz#977308)
8dc7a2
# This was upstreamed as a part of bigger patch, but for our purposes
8dc7a2
# this is ok: http://bugs.python.org/issue18404
8dc7a2
# Note: Backported from scl
8dc7a2
Patch201: 00201-fix-memory-leak-in-gdbm.patch
8dc7a2
8dc7a2
# 00202 #
8dc7a2
# Fixes undefined behaviour in faulthandler which caused test to hang on x86_64
8dc7a2
# http://bugs.python.org/issue23433
8dc7a2
# FIXED UPSTREAM
8dc7a2
#Patch202: 00202-fix-undefined-behaviour-in-faulthandler.patch
8dc7a2
8dc7a2
# test_threading fails in koji dues to it's handling of signals
8dc7a2
Patch203: 00203-disable-threading-test-koji.patch
8dc7a2
8dc7a2
# openssl requires DH keys to be > 768bits
8dc7a2
# FIXED UPSTREAM
8dc7a2
# Patch204: 00204-increase-dh-keys-size.patch
8dc7a2
8dc7a2
# LIBPL variable in makefile takes LIBPL from configure.ac
8dc7a2
# but the LIBPL variable defined there doesn't respect libdir macro
8dc7a2
Patch205: 00205-make-libpl-respect-lib64.patch
8dc7a2
8dc7a2
# Remove hf flag from arm triplet which is used
8dc7a2
# by debian but fedora infra uses only eabi without hf
8dc7a2
Patch206: 00206-remove-hf-from-arm-triplet.patch
8dc7a2
8dc7a2
# rhbz968928
8dc7a2
# Fix for gettext plural form headers (lines that begin with "#")
8dc7a2
Patch207: 00207-gettext-plural-fix.patch
8dc7a2
8dc7a2
# 00231 #
8dc7a2
# Add choices for sort option of cProfile for better output message
8dc7a2
# http://bugs.python.org/issue23420
8dc7a2
# Resolves: rhbz#1326287
8dc7a2
Patch231: 00231-cprofile-sort-option.patch
8dc7a2
159b10
# 00237 #
159b10
# CVE-2016-0772 python: smtplib StartTLS stripping attack
159b10
#   https://bugzilla.redhat.com/show_bug.cgi?id=1303647
159b10
#   FIXED UPSTREAM: https://hg.python.org/cpython/rev/d590114c2394
159b10
# Raise an error when STARTTLS fails
159b10
# Resolves: rhbz#1346361
159b10
Patch237: 00237-CVE-2016-0772-smtplib.patch
159b10
159b10
# 00242 #
159b10
# HTTPoxy attack (CVE-2016-1000110)
159b10
# https://httpoxy.org/
159b10
# FIXED UPSTREAM: http://bugs.python.org/issue27568
159b10
# Based on a patch by Rémi Rampin
52fd9b
# Resolves: rhbz#1359174
159b10
Patch242: 00242-CVE-2016-1000110-httpoxy.patch
159b10
8dc7a2
8dc7a2
Patch300: 00300-change-so-version-scl.patch
8dc7a2
459902
# 00320 #
459902
# Security fix for CVE-2019-9636: Information Disclosure due to urlsplit improper NFKC normalization
cdcbdc
# FIXED UPSTREAM: https://bugs.python.org/issue36216 and and https://bugs.python.org/issue36742
459902
# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689322
459902
Patch320: 00320-CVE-2019-9636.patch
159b10
8dc7a2
# (New patches go here ^^^)
8dc7a2
#
8dc7a2
# When adding new patches to "python" and "python3" in Fedora 17 onwards,
8dc7a2
# please try to keep the patch numbers in-sync between the two specfiles:
8dc7a2
#
8dc7a2
#   - use the same patch number across both specfiles for conceptually-equivalent
8dc7a2
#     fixes, ideally with the same name
8dc7a2
#
8dc7a2
#   - when a patch is relevant to both specfiles, use the same introductory
8dc7a2
#     comment in both specfiles where possible (to improve "diff" output when
8dc7a2
#     comparing them)
8dc7a2
#
8dc7a2
#   - when a patch is only relevant for one of the two specfiles, leave a gap
8dc7a2
#     in the patch numbering in the other specfile, adding a comment when
8dc7a2
#     omitting a patch, both in the manifest section here, and in the "prep"
8dc7a2
#     phase below
8dc7a2
#
8dc7a2
# Hopefully this will make it easier to ensure that all relevant fixes are
8dc7a2
# applied to both versions.
8dc7a2
8dc7a2
# This is the generated patch to "configure"; see the description of
8dc7a2
#   %%{regenerate_autotooling_patch}
8dc7a2
# above:
8dc7a2
Patch5000: 05000-autotool-intermediates.patch
8dc7a2
8dc7a2
# add correct arch for ppc64/ppc64le
8dc7a2
# it should be ppc64le-linux-gnu/ppc64-linux-gnu instead powerpc64le-linux-gnu/powerpc64-linux-gnu
8dc7a2
Patch5001: python3-powerppc-arch.patch
8dc7a2
8dc7a2
BuildRoot: %{_tmppath}/%{name}-%{version}-root
8dc7a2
8dc7a2
# ======================================================
8dc7a2
# Additional metadata, and subpackages
8dc7a2
# ======================================================
8dc7a2
8dc7a2
URL: http://www.python.org/
8dc7a2
8dc7a2
Provides: %{?scl_prefix}python(abi) = %{pybasever}
8dc7a2
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
8dc7a2
%{?scl:Requires: %{scl}-runtime}
8dc7a2
%if 0%{with_rewheel}
8dc7a2
Requires: %{?scl_prefix}python-setuptools
8dc7a2
Requires: %{?scl_prefix}python-pip
8dc7a2
%endif
8dc7a2
8dc7a2
%description
8dc7a2
Python 3 is a new version of the language that is incompatible with the 2.x
8dc7a2
line of releases. The language is mostly the same, but many details, especially
8dc7a2
how built-in objects like dictionaries and strings work, have changed
8dc7a2
considerably, and a lot of deprecated features have finally been removed.
8dc7a2
8dc7a2
%package libs
8dc7a2
Summary:        Python 3 runtime libraries
8dc7a2
Group:          Development/Libraries
8dc7a2
%{?scl:Requires:       %{scl}-runtime}
8dc7a2
#Requires:       %%{name} = %%{version}-%%{release}
8dc7a2
8dc7a2
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
8dc7a2
# this symbol (in pyexpat), so we must explicitly state this dependency to
8dc7a2
# prevent "import pyexpat" from failing with a linker error if someone hasn't
8dc7a2
# yet upgraded expat:
8dc7a2
Requires: expat >= 2.1.0
8dc7a2
8dc7a2
%description libs
8dc7a2
This package contains files used to embed Python 3 into applications.
8dc7a2
8dc7a2
%package devel
8dc7a2
Summary: Libraries and header files needed for Python 3 development
8dc7a2
Group: Development/Libraries
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}%{?_isa} = %{version}-%{release}
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
8dc7a2
# we filtered provides of pkgconfig on rhel7 so we need to manully re add them
8dc7a2
Provides: %{?scl_prefix}pkgconfig(python) = %{version}-%{release}
8dc7a2
Provides: %{?scl_prefix}pkgconfig(python-3.5m) = %{version}-%{release}
8dc7a2
Provides: %{?scl_prefix}pkgconfig(python-3.5) = %{version}-%{release}
8dc7a2
Provides: %{?scl_prefix}pkgconfig(python3) = %{version}-%{release}
8dc7a2
Conflicts: %{?scl_prefix}%{pkg_name} < %{version}-%{release}
8dc7a2
8dc7a2
# Fix for rhbz#1144601
8dc7a2
Requires:       scl-utils-build
8dc7a2
8dc7a2
%description devel
8dc7a2
This package contains libraries and header files used to build applications
8dc7a2
with and native libraries for Python 3
8dc7a2
8dc7a2
%package tools
8dc7a2
Summary: A collection of tools included with Python 3
8dc7a2
Group: Development/Tools
8dc7a2
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-tkinter = %{version}-%{release}
8dc7a2
8dc7a2
%description tools
8dc7a2
This package contains several tools included with Python 3
8dc7a2
8dc7a2
%package tkinter
8dc7a2
Summary: A GUI toolkit for Python 3
8dc7a2
Group: Development/Languages
8dc7a2
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
8dc7a2
8dc7a2
%description tkinter
8dc7a2
The Tkinter (Tk interface) program is an graphical user interface for
8dc7a2
the Python scripting language.
8dc7a2
8dc7a2
%package test
8dc7a2
Summary: The test modules from the main python 3 package
8dc7a2
Group: Development/Languages
8dc7a2
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-tools = %{version}-%{release}
8dc7a2
8dc7a2
%description test
8dc7a2
The test modules from the main %{name} package.
8dc7a2
These are in a separate package to save space, as they are almost never used
8dc7a2
in production.
8dc7a2
8dc7a2
You might want to install the python3-test package if you're developing
8dc7a2
python 3 code that uses more than just unittest and/or test_support.py.
8dc7a2
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
%package debug
8dc7a2
Summary: Debug version of the Python 3 runtime
8dc7a2
Group: Applications/System
8dc7a2
8dc7a2
# The debug build is an all-in-one package version of the regular build, and
8dc7a2
# shares the same .py/.pyc files and directories as the regular build.  Hence
8dc7a2
# we depend on all of the subpackages of the regular build:
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}%{?_isa} = %{version}-%{release}
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-devel%{?_isa} = %{version}-%{release}
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-test%{?_isa} = %{version}-%{release}
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-tkinter%{?_isa} = %{version}-%{release}
8dc7a2
Requires: %{?scl_prefix}%{pkg_name}-tools%{?_isa} = %{version}-%{release}
8dc7a2
# we filtered provides of pkgconfig on rhel7 so we need to manully re add them
8dc7a2
Provides: %{?scl_prefix}pkgconfig(python-3.5dm) = %{version}-%{release}
8dc7a2
8dc7a2
%description debug
8dc7a2
python3-debug provides a version of the Python 3 runtime with numerous debugging
8dc7a2
features enabled, aimed at advanced Python users, such as developers of Python
8dc7a2
extension modules.
8dc7a2
8dc7a2
This version uses more memory and will be slower than the regular Python 3 build,
8dc7a2
but is useful for tracking down reference-counting issues, and other bugs.
8dc7a2
8dc7a2
The bytecodes are unchanged, so that .pyc files are compatible between the two
8dc7a2
versions of Python 3, but the debugging features mean that C/C++ extension
8dc7a2
modules are ABI-incompatible with those built for the standard runtime.
8dc7a2
8dc7a2
It shares installation directories with the standard Python 3 runtime, so that
8dc7a2
.py and .pyc files can be shared.  All compiled extension modules gain a "_d"
8dc7a2
suffix ("foo_d.so" rather than "foo.so") so that each Python 3 implementation
8dc7a2
can load its own extensions.
8dc7a2
%endif # with_debug_build
8dc7a2
8dc7a2
# ======================================================
8dc7a2
# The prep phase of the build:
8dc7a2
# ======================================================
8dc7a2
8dc7a2
%prep
8dc7a2
%setup -q -n Python-%{version}
8dc7a2
#chmod +x %{SOURCE1}
8dc7a2
8dc7a2
%if 0%{?with_systemtap}
8dc7a2
# Provide an example of usage of the tapset:
8dc7a2
cp -a %{SOURCE6} .
8dc7a2
cp -a %{SOURCE7} .
8dc7a2
%endif # with_systemtap
8dc7a2
8dc7a2
# Ensure that we're using the system copy of various libraries, rather than
8dc7a2
# copies shipped by upstream in the tarball:
8dc7a2
#   Remove embedded copy of expat:
8dc7a2
rm -r Modules/expat || exit 1
8dc7a2
8dc7a2
#   Remove embedded copy of libffi:
8dc7a2
for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx ; do
8dc7a2
  rm -r Modules/_ctypes/$SUBDIR || exit 1 ;
8dc7a2
done
8dc7a2
8dc7a2
#   Remove embedded copy of zlib:
8dc7a2
rm -r Modules/zlib || exit 1
8dc7a2
8dc7a2
# Don't build upstream Python's implementation of these crypto algorithms;
8dc7a2
# instead rely on _hashlib and OpenSSL.
8dc7a2
#
8dc7a2
# For example, in our builds hashlib.md5 is implemented within _hashlib via
8dc7a2
# OpenSSL (and thus respects FIPS mode), and does not fall back to _md5
8dc7a2
# TODO: there seems to be no OpenSSL support in Python for sha3 so far
8dc7a2
# when it is there, also remove _sha3/ dir
8dc7a2
for f in md5module.c sha1module.c sha256module.c sha512module.c; do
8dc7a2
    rm Modules/$f
8dc7a2
done
8dc7a2
8dc7a2
%if 0%{with_rewheel}
8dc7a2
%global pip_version 7.1.0
8dc7a2
sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/ensurepip/__init__.py
8dc7a2
%endif
8dc7a2
8dc7a2
#
8dc7a2
# Apply patches:
8dc7a2
#
8dc7a2
%patch1 -p1
8dc7a2
# 3: upstream as of Python 3.3.1
8dc7a2
8dc7a2
%if 0%{?with_systemtap}
8dc7a2
%patch55 -p1 -b .systemtap
8dc7a2
%endif
8dc7a2
8dc7a2
%if "%{_lib}" == "lib64"
8dc7a2
%patch102 -p1
8dc7a2
%patch104 -p1
8dc7a2
%endif
8dc7a2
8dc7a2
8dc7a2
%patch111 -p1
8dc7a2
# 112: not for python3
8dc7a2
# 00114: Upstream as of Python 3.4.0.b2
8dc7a2
8dc7a2
%ifarch ppc %{power64}
8dc7a2
%patch131 -p1
8dc7a2
%endif
8dc7a2
8dc7a2
%patch132 -p1
8dc7a2
# 00133: not for python3
8dc7a2
# 00136: not for python3
8dc7a2
%patch137 -p1
8dc7a2
# 00138: not for python3
8dc7a2
%ifarch %{arm}
8dc7a2
%patch139 -p1
8dc7a2
%patch140 -p1
8dc7a2
%endif
8dc7a2
# 00140: not for python3
8dc7a2
%patch143 -p1 -b .tsc-on-ppc
8dc7a2
# 00144: not for python3
8dc7a2
# 00145: not for python3
8dc7a2
%patch146 -p1
8dc7a2
# 00147: upstream as of Python 3.3.0
8dc7a2
# 00148: upstream as of Python 3.2.3
8dc7a2
# 00149: upstream as of Python 3.2.3
8dc7a2
%ifarch ppc %{power64}
8dc7a2
%patch150 -p1
8dc7a2
%endif
8dc7a2
# 00151: not for python3
8dc7a2
# 00152: upstream as of Python 3.3.0b2
8dc7a2
# 00153: upstream as of Python 3.4.3
8dc7a2
# 00154: not for this branch
8dc7a2
%patch155 -p1
8dc7a2
# 00156: upstream as of 3.4.3
8dc7a2
%patch157 -p1
8dc7a2
#00158: FIXME
8dc7a2
#00159: FIXME
8dc7a2
%patch160 -p1
8dc7a2
# 00161: was only needed for Python 3.3.0b1
8dc7a2
# 00162: was only needed for Python 3.3.0b1
8dc7a2
%patch163 -p1
8dc7a2
%ifarch ppc %{power64}
8dc7a2
%patch164 -p1
8dc7a2
%endif
8dc7a2
#00165: TODO
8dc7a2
#00166: TODO
8dc7a2
#00167: TODO
8dc7a2
#00168: TODO
8dc7a2
#00169: TODO
8dc7a2
%patch170 -p0
8dc7a2
#00171: TODO
8dc7a2
#00172: TODO
8dc7a2
%patch173 -p1
8dc7a2
#00174: TODO
8dc7a2
# 00175: upstream as of Python 3.3.2
8dc7a2
# 00176: upstream as of Python 3.3.1
8dc7a2
# 00177: upstream as of Python 3.4.0.b2
8dc7a2
%patch178 -p1
8dc7a2
%patch179 -p1
8dc7a2
%patch180 -p1
8dc7a2
# 00181: not for python3
8dc7a2
# 00182: upstream as of Python 3.3.2
8dc7a2
# 00183  upstream as of Python 3.4.0a4
8dc7a2
%patch184  -p1
8dc7a2
# 00185  upstream as of Python 3.4.0a4
8dc7a2
%patch186 -p1
8dc7a2
# 00187: upstream as of Python 3.4.0b1
8dc7a2
%patch188 -p1
8dc7a2
8dc7a2
%if 0%{with_rewheel}
8dc7a2
%patch189 -p1
8dc7a2
%endif
8dc7a2
8dc7a2
# 00190: upstream as of Python 3.4.1
8dc7a2
# 00193: upstream as of Python 3.4.1
8dc7a2
%patch194 -p1
8dc7a2
# 00195: upstream as of Python 3.4.2
8dc7a2
%patch196 -p1
8dc7a2
# 00197: upstream as of Python 3.4.2
8dc7a2
%patch201 -p0
8dc7a2
# 00202: upstream as of 3.5.0b3
8dc7a2
%patch203 -p1
8dc7a2
# 00204: upstream as of 3.5.0b3
8dc7a2
%patch205 -p1
8dc7a2
%patch206 -p1
8dc7a2
%patch207 -p1
8dc7a2
%patch231 -p1
159b10
%patch237 -p1
159b10
%patch242 -p1
8dc7a2
459902
%patch320 -p1
459902
8dc7a2
cat %{PATCH300} | sed -e "s/__SCL_NAME__/%{?scl}/" \
8dc7a2
                | patch -p1
8dc7a2
8dc7a2
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
8dc7a2
# are many differences between 2.6 and the Python 3 library.
8dc7a2
#
8dc7a2
# Fix up the URLs within pydoc to point at the documentation for this
8dc7a2
# MAJOR.MINOR version:
8dc7a2
#
8dc7a2
sed --in-place \
8dc7a2
    --expression="s|http://docs.python.org/library|http://docs.python.org/%{pybasever}/library|g" \
8dc7a2
    Lib/pydoc.py || exit 1
8dc7a2
8dc7a2
%if ! 0%{regenerate_autotooling_patch}
8dc7a2
# Normally we apply the patch to "configure"
8dc7a2
# We don't apply the patch if we're working towards regenerating it
8dc7a2
%patch5000 -p0 -b .autotool-intermediates
8dc7a2
%endif
8dc7a2
8dc7a2
%patch5001 -p1
8dc7a2
8dc7a2
# ======================================================
8dc7a2
# Configuring and building the code:
8dc7a2
# ======================================================
8dc7a2
8dc7a2
8dc7a2
# filter pkgconfig Requires/Provides on rhel7 as filter_from doesnt work there
8dc7a2
%global __provides_exclude ^pkgconfig\\(.*$
8dc7a2
8dc7a2
%build
8dc7a2
export topdir=$(pwd)
8dc7a2
export CFLAGS="-I%{_includedir} $RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
8dc7a2
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
8dc7a2
export CPPFLAGS="-I%{_includedir}`pkg-config --cflags-only-I libffi`"
8dc7a2
export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
8dc7a2
export LINKCC="gcc"
8dc7a2
export CFLAGS="$CFLAGS `pkg-config --cflags openssl`"
8dc7a2
export LDFLAGS="-L%{_libdir}$RPM_LD_FLAGS `pkg-config --libs-only-L openssl`"
8dc7a2
8dc7a2
%if 0%{regenerate_autotooling_patch}
8dc7a2
# If enabled, this code regenerates the patch to "configure", using a
8dc7a2
# local copy of autoconf-2.65, then exits the build
8dc7a2
#
8dc7a2
# The following assumes that the copy is installed to ~/autoconf-2.65/bin
8dc7a2
# as per these instructions:
8dc7a2
#   http://bugs.python.org/issue7997
8dc7a2
8dc7a2
for f in pyconfig.h.in configure ; do
8dc7a2
    cp $f $f.autotool-intermediates ;
8dc7a2
done
8dc7a2
8dc7a2
# Rerun the autotools:
8dc7a2
autoreconf
8dc7a2
8dc7a2
# Regenerate the patch:
8dc7a2
gendiff . .autotool-intermediates > %{PATCH5000}
8dc7a2
8dc7a2
8dc7a2
# Exit the build
8dc7a2
exit 1
8dc7a2
%endif
8dc7a2
8dc7a2
# Define a function, for how to perform a "build" of python for a given
8dc7a2
# configuration:
8dc7a2
BuildPython() {
8dc7a2
  ConfName=$1
8dc7a2
  BinaryName=$2
8dc7a2
  SymlinkName=$3
8dc7a2
  ExtraConfigArgs=$4
8dc7a2
  PathFixWithThisBinary=$5
8dc7a2
  MoreCFlags=$6
8dc7a2
8dc7a2
  ConfDir=build/$ConfName
8dc7a2
8dc7a2
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName
8dc7a2
  mkdir -p $ConfDir
8dc7a2
8dc7a2
  pushd $ConfDir
8dc7a2
8dc7a2
  # Use the freshly created "configure" script, but in the directory two above:
8dc7a2
  %global _configure $topdir/configure
8dc7a2
8dc7a2
%configure \
8dc7a2
  --enable-ipv6 \
8dc7a2
  --enable-shared \
8dc7a2
  --with-computed-gotos=%{with_computed_gotos} \
8dc7a2
  --with-dbmliborder=gdbm:ndbm:bdb \
8dc7a2
  --with-system-expat \
8dc7a2
  --with-system-ffi \
8dc7a2
  --enable-loadable-sqlite-extensions \
8dc7a2
%if 0%{?with_systemtap}
8dc7a2
  --with-systemtap \
8dc7a2
%endif
8dc7a2
%if 0%{?with_valgrind}
8dc7a2
  --with-valgrind \
8dc7a2
%endif
8dc7a2
  $ExtraConfigArgs \
8dc7a2
  %{nil}
8dc7a2
8dc7a2
  # Set EXTRA_CFLAGS to our CFLAGS (rather than overriding OPT, as we've done
8dc7a2
  # in the past).
8dc7a2
  # This should fix a problem with --with-valgrind where it adds
8dc7a2
  #   -DDYNAMIC_ANNOTATIONS_ENABLED=1
8dc7a2
  # to OPT which must be passed to all compilation units in the build,
8dc7a2
  # otherwise leading to linker errors, e.g.
8dc7a2
  #    missing symbol AnnotateRWLockDestroy
8dc7a2
  #
8dc7a2
  # Invoke the build:
8dc7a2
  make EXTRA_CFLAGS="$CFLAGS $MoreCFlags" %{?_smp_mflags}
8dc7a2
8dc7a2
  popd
8dc7a2
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir
8dc7a2
}
8dc7a2
8dc7a2
export -f BuildPython
8dc7a2
# Use "BuildPython" to support building with different configurations:
8dc7a2
8dc7a2
%{?scl:scl enable %scl - << \EOF}
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
BuildPython debug \
8dc7a2
  python-debug \
8dc7a2
  python%{pybasever}-debug \
8dc7a2
%ifarch %{ix86} x86_64 ppc %{power64}
8dc7a2
  "--with-pydebug --with-tsc --with-count-allocs --with-call-profile --without-ensurepip" \
8dc7a2
%else
8dc7a2
  "--with-pydebug --with-count-allocs --with-call-profile --without-ensurepip" \
8dc7a2
%endif
8dc7a2
  false \
8dc7a2
  -O0
8dc7a2
%endif # with_debug_build
8dc7a2
8dc7a2
BuildPython optimized \
8dc7a2
  python \
8dc7a2
  python%{pybasever} \
8dc7a2
  "--without-ensurepip" \
8dc7a2
  true
8dc7a2
%{?scl:EOF}
8dc7a2
8dc7a2
# ======================================================
8dc7a2
# Installing the built code:
8dc7a2
# ======================================================
8dc7a2
8dc7a2
%install
8dc7a2
topdir=$(pwd)
8dc7a2
rm -fr %{buildroot}
8dc7a2
mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir}
8dc7a2
8dc7a2
# install SCL custom RPM scripts
8dc7a2
%{?scl:mkdir -p %{buildroot}%{_root_prefix}/lib/rpm/redhat}
8dc7a2
%{?scl:cp -a %{SOURCE9} %{buildroot}%{_root_prefix}/lib/rpm/redhat}
8dc7a2
8dc7a2
InstallPython() {
8dc7a2
8dc7a2
  ConfName=$1
8dc7a2
  PyInstSoName=$2
8dc7a2
  MoreCFlags=$3
8dc7a2
8dc7a2
  ConfDir=build/$ConfName
8dc7a2
8dc7a2
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
8dc7a2
  mkdir -p $ConfDir
8dc7a2
8dc7a2
  pushd $ConfDir
8dc7a2
8dc7a2
make install DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="$MoreCFlags"
8dc7a2
8dc7a2
  popd
8dc7a2
8dc7a2
  # We install a collection of hooks for gdb that make it easier to debug
8dc7a2
  # executables linked against libpython3* (such as /usr/bin/python3 itself)
8dc7a2
  #
8dc7a2
  # These hooks are implemented in Python itself (though they are for the version
8dc7a2
  # of python that gdb is linked with, in this case Python 2.7)
8dc7a2
  #
8dc7a2
  # gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
8dc7a2
  # We put them in the debuginfo package by installing them to e.g.:
8dc7a2
  #  /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
8dc7a2
  #
8dc7a2
  # See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
8dc7a2
  # information
8dc7a2
  #
8dc7a2
  # Copy up the gdb hooks into place; the python file will be autoloaded by gdb
8dc7a2
  # when visiting libpython.so, provided that the python file is installed to the
8dc7a2
  # same path as the library (or its .debug file) plus a "-gdb.py" suffix, e.g:
8dc7a2
  #  /usr/lib/debug/usr/lib64/libpython3.2.so.1.0.debug-gdb.py
8dc7a2
  # (note that the debug path is /usr/lib/debug for both 32/64 bit)
8dc7a2
  #
8dc7a2
  # Initially I tried:
8dc7a2
  #  /usr/lib/libpython3.1.so.1.0-gdb.py
8dc7a2
  # but doing so generated noise when ldconfig was rerun (rhbz:562980)
8dc7a2
  #
8dc7a2
%if 0%{?with_gdb_hooks}
8dc7a2
  DirHoldingGdbPy=%{?scl:%_root_prefix}%{!?scl:%_prefix}/lib/debug/%{_libdir}
8dc7a2
  PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
8dc7a2
8dc7a2
  mkdir -p %{buildroot}$DirHoldingGdbPy
8dc7a2
  cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
8dc7a2
%endif # with_gdb_hooks
8dc7a2
8dc7a2
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
8dc7a2
}
8dc7a2
8dc7a2
# Use "InstallPython" to support building with different configurations:
8dc7a2
8dc7a2
# Install the "debug" build first, so that we can move some files aside
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
InstallPython debug \
8dc7a2
  %{py_INSTSONAME_debug} \
8dc7a2
  -O0
8dc7a2
%endif # with_debug_build
8dc7a2
8dc7a2
# Now the optimized build:
8dc7a2
InstallPython optimized \
8dc7a2
  %{py_INSTSONAME_optimized}
8dc7a2
8dc7a2
install -d -m 0755 ${RPM_BUILD_ROOT}%{pylibdir}/site-packages/__pycache__
8dc7a2
8dc7a2
ln -s %{_bindir}/2to3 ${RPM_BUILD_ROOT}%{_bindir}/python3-2to3
8dc7a2
8dc7a2
# Development tools
8dc7a2
install -m755 -d ${RPM_BUILD_ROOT}%{pylibdir}/Tools
8dc7a2
install Tools/README ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
8dc7a2
cp -ar Tools/freeze ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
8dc7a2
cp -ar Tools/i18n ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
8dc7a2
cp -ar Tools/pynche ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
8dc7a2
cp -ar Tools/scripts ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
8dc7a2
8dc7a2
# pynche
8dc7a2
cat > ${RPM_BUILD_ROOT}%{_bindir}/pynche << EOF
8dc7a2
#!/bin/bash
8dc7a2
exec %{pylibdir}/Tools/pynche/pynche
8dc7a2
EOF
8dc7a2
chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/pynche
8dc7a2
8dc7a2
# Documentation tools
8dc7a2
install -m755 -d %{buildroot}%{pylibdir}/Doc
8dc7a2
cp -ar Doc/tools %{buildroot}%{pylibdir}/Doc/
8dc7a2
8dc7a2
# Demo scripts
8dc7a2
cp -ar Tools/demo %{buildroot}%{pylibdir}/Tools/
8dc7a2
8dc7a2
# Fix for bug #136654
8dc7a2
rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au
8dc7a2
8dc7a2
%if "%{_lib}" == "lib64"
8dc7a2
install -d -m 0755 %{buildroot}/%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
8dc7a2
%endif
8dc7a2
8dc7a2
# Make python3-devel multilib-ready (bug #192747, #139911)
8dc7a2
%global _pyconfig32_h pyconfig-32.h
8dc7a2
%global _pyconfig64_h pyconfig-64.h
8dc7a2
8dc7a2
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 aarch64
8dc7a2
%global _pyconfig_h %{_pyconfig64_h}
8dc7a2
%else
8dc7a2
%global _pyconfig_h %{_pyconfig32_h}
8dc7a2
%endif
8dc7a2
8dc7a2
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
8dc7a2
%global ABIFLAGS_optimized m
8dc7a2
%global ABIFLAGS_debug     dm
8dc7a2
8dc7a2
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
8dc7a2
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
8dc7a2
8dc7a2
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}-%{_arch}-linux%{_gnu}
8dc7a2
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}-%{_arch}-linux%{_gnu}
8dc7a2
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
%global PyIncludeDirs python%{LDVERSION_optimized} python%{LDVERSION_debug}
8dc7a2
8dc7a2
%else
8dc7a2
%global PyIncludeDirs python%{LDVERSION_optimized}
8dc7a2
%endif
8dc7a2
8dc7a2
for PyIncludeDir in %{PyIncludeDirs} ; do
8dc7a2
  mv %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h \
8dc7a2
     %{buildroot}%{_includedir}/$PyIncludeDir/%{_pyconfig_h}
8dc7a2
  cat > %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h << EOF
8dc7a2
#include <bits/wordsize.h>
8dc7a2
8dc7a2
#if __WORDSIZE == 32
8dc7a2
#include "%{_pyconfig32_h}"
8dc7a2
#elif __WORDSIZE == 64
8dc7a2
#include "%{_pyconfig64_h}"
8dc7a2
#else
8dc7a2
#error "Unknown word size"
8dc7a2
#endif
8dc7a2
EOF
8dc7a2
done
8dc7a2
8dc7a2
# Fix for bug 201434: make sure distutils looks at the right pyconfig.h file
8dc7a2
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
8dc7a2
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
8dc7a2
# when python starts up (bug 653058)
8dc7a2
#
8dc7a2
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
8dc7a2
# variants:
8dc7a2
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
8dc7a2
  %{buildroot}%{pylibdir}/distutils/sysconfig.py \
8dc7a2
  %{buildroot}%{pylibdir}/sysconfig.py
8dc7a2
8dc7a2
# Switch all shebangs to refer to the specific Python version.
8dc7a2
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
8dc7a2
  Tools/scripts/pathfix.py \
8dc7a2
  -i "%{_bindir}/python%{pybasever}" \
8dc7a2
  %{buildroot}
8dc7a2
8dc7a2
# Remove shebang lines from .py files that aren't executable, and
8dc7a2
# remove executability from .py files that don't have a shebang line:
8dc7a2
find %{buildroot} -name \*.py \
8dc7a2
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
8dc7a2
  -print -exec sed -i '1d' {} \; \) -o \( \
8dc7a2
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
8dc7a2
  -exec chmod a-x {} \; \) \)
8dc7a2
8dc7a2
# .xpm and .xbm files should not be executable:
8dc7a2
find %{buildroot} \
8dc7a2
  \( -name \*.xbm -o -name \*.xpm -o -name \*.xpm.1 \) \
8dc7a2
  -exec chmod a-x {} \;
8dc7a2
8dc7a2
# Remove executable flag from files that shouldn't have it:
8dc7a2
chmod a-x \
8dc7a2
  %{buildroot}%{pylibdir}/distutils/tests/Setup.sample \
8dc7a2
  %{buildroot}%{pylibdir}/Tools/README
8dc7a2
8dc7a2
# Get rid of DOS batch files:
8dc7a2
find %{buildroot} -name \*.bat -exec rm {} \;
8dc7a2
8dc7a2
# Get rid of backup files:
8dc7a2
find %{buildroot}/ -name "*~" -exec rm -f {} \;
8dc7a2
find . -name "*~" -exec rm -f {} \;
8dc7a2
rm -f %{buildroot}%{pylibdir}/LICENSE.txt
8dc7a2
# Junk, no point in putting in -test sub-pkg
8dc7a2
rm -f ${RPM_BUILD_ROOT}/%{pylibdir}/idlelib/testcode.py*
8dc7a2
8dc7a2
# Get rid of stray patch file from buildroot:
8dc7a2
rm -f %{buildroot}%{pylibdir}/test/test_imp.py.apply-our-changes-to-expected-shebang # from patch 4
8dc7a2
8dc7a2
# Fix end-of-line encodings:
8dc7a2
find %{buildroot}/ -name \*.py -exec sed -i 's/\r//' {} \;
8dc7a2
8dc7a2
# Fix an encoding:
8dc7a2
iconv -f iso8859-1 -t utf-8 %{buildroot}/%{pylibdir}/Demo/rpc/README > README.conv && mv -f README.conv %{buildroot}/%{pylibdir}/Demo/rpc/README
8dc7a2
8dc7a2
# Note that
8dc7a2
#  %{pylibdir}/Demo/distutils/test2to3/setup.py
8dc7a2
# is in iso-8859-1 encoding, and that this is deliberate; this is test data
8dc7a2
# for the 2to3 tool, and one of the functions of the 2to3 tool is to fixup
8dc7a2
# character encodings within python source code
8dc7a2
8dc7a2
# Do bytecompilation with the newly installed interpreter.
8dc7a2
# This is similar to the script in macros.pybytecompile
8dc7a2
# compile *.pyc
8dc7a2
find %{buildroot} -type f -a -name "*.py" -print0 | \
8dc7a2
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
8dc7a2
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
52fd9b
    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:]]' || :
8dc7a2
8dc7a2
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
8dc7a2
find %{buildroot} \
8dc7a2
    -perm 555 -exec chmod 755 {} \;
8dc7a2
8dc7a2
# Install macros for rpm:
8dc7a2
mkdir -p %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
8dc7a2
install -m 644 %{SOURCE2} %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
8dc7a2
install -m 644 %{SOURCE3} %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
8dc7a2
# Optionally rename macro files by appending scl name
8dc7a2
pushd %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}
8dc7a2
find -type f -name 'macros.py*' -exec mv {} {}%{?scl:.%{scl}} \;
8dc7a2
popd
8dc7a2
8dc7a2
%{?scl:sed -i 's|^\(%@scl@__python3\)|\1 %{_bindir}/python3|' %{buildroot}%{_root_sysconfdir}/rpm/macros.python3.%{scl}}
8dc7a2
# We replace @scl@ with scl_no_vendor macro from build meta subpackage because macros names cant contain
8dc7a2
# dash, scl_no_vendor is scl macro without vendor prefix
8dc7a2
%{?scl:sed -i 's|@scl@|%{scl_no_vendor}|g' %{buildroot}%{_root_sysconfdir}/rpm/macros.python3.%{scl}}
8dc7a2
# when using scl enable we have to pass original scl macro with vendor prefix
8dc7a2
%{?scl:sed -i 's|@vendorscl@|%{scl}|g' %{buildroot}%{_root_sysconfdir}/rpm/macros.python3.%{scl}}
8dc7a2
8dc7a2
# Ensure that the curses module was linked against libncursesw.so, rather than
8dc7a2
# libncurses.so (bug 539917)
8dc7a2
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
8dc7a2
    | grep curses \
8dc7a2
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
8dc7a2
8dc7a2
# Ensure that the debug modules are linked against the debug libpython, and
8dc7a2
# likewise for the optimized modules and libpython:
8dc7a2
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
8dc7a2
    case $Module in
8dc7a2
    *.%{SOABI_debug})
8dc7a2
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
8dc7a2
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
8dc7a2
8dc7a2
        ;;
8dc7a2
    *.%{SOABI_optimized})
8dc7a2
        ldd $Module | grep %{py_INSTSONAME_debug} &&
8dc7a2
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1)
8dc7a2
        ;;
8dc7a2
    esac
8dc7a2
done
8dc7a2
8dc7a2
# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
8dc7a2
# avoid the user having to know the precise version and ABI flags.  (see
8dc7a2
# e.g. rhbz#676748):
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
ln -s \
8dc7a2
  %{_bindir}/python%{LDVERSION_debug} \
8dc7a2
  %{buildroot}%{_bindir}/python3-debug
8dc7a2
%endif
8dc7a2
8dc7a2
#
8dc7a2
# Systemtap hooks:
8dc7a2
#
8dc7a2
%if 0%{?with_systemtap}
8dc7a2
# Install a tapset for this libpython into tapsetdir, fixing up the path to the
8dc7a2
# library:
8dc7a2
mkdir -p %{buildroot}%{tapsetdir}
8dc7a2
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64 aarch64
8dc7a2
%global libpython_stp_optimized libpython%{pybasever}-64.stp
8dc7a2
%global libpython_stp_debug     libpython%{pybasever}-debug-64.stp
8dc7a2
%else
8dc7a2
%global libpython_stp_optimized libpython%{pybasever}-32.stp
8dc7a2
%global libpython_stp_debug     libpython%{pybasever}-debug-32.stp
8dc7a2
%endif
8dc7a2
8dc7a2
sed \
8dc7a2
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_optimized}|" \
8dc7a2
   %{_sourcedir}/libpython.stp \
8dc7a2
   > %{buildroot}%{tapsetdir}/%{libpython_stp_optimized}
8dc7a2
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
# In Python 3, python3 and python3-debug don't point to the same binary,
8dc7a2
# so we have to replace "python3" with "python3-debug" to get systemtap
8dc7a2
# working with debug build
8dc7a2
sed \
8dc7a2
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \
8dc7a2
   -e 's|"python3"|"python3-debug"|' \
8dc7a2
   %{_sourcedir}/libpython.stp \
8dc7a2
   > %{buildroot}%{tapsetdir}/%{libpython_stp_debug}
8dc7a2
%endif # with_debug_build
8dc7a2
8dc7a2
%endif # with_systemtap
8dc7a2
8dc7a2
# Create symlinks python* for python3* binaries (and similar)
8dc7a2
pushd %{buildroot}%{_bindir}
8dc7a2
for versioned_binary in idle3 pydoc3 python3-2to3 python3 python3-config; do
8dc7a2
  non_versioned_binary=$(echo $versioned_binary | sed -e 's/python3/python/' -e 's/idle3/idle/' -e 's/pydoc3/pydoc/')
8dc7a2
  ln -s $versioned_binary $non_versioned_binary
8dc7a2
done
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
  ln -s python3-debug python-debug
8dc7a2
%endif
8dc7a2
popd
8dc7a2
8dc7a2
# Create symlink python.pc for python3.pc
8dc7a2
pushd %{buildroot}%{_libdir}/pkgconfig
8dc7a2
ln -s python3.pc python.pc
8dc7a2
popd
8dc7a2
8dc7a2
# Create a python manpage (rhbz#1072522)
8dc7a2
cp %{buildroot}%{_mandir}/man1/python%{pybasever}.1 %{buildroot}%{_mandir}/man1/python.1
8dc7a2
8dc7a2
# Rename the script that differs on different arches to arch specific name
8dc7a2
mv %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-{,`uname -m`-}config
8dc7a2
echo -e '#!/bin/sh\nexec `dirname $0`/python%{LDVERSION_optimized}-`uname -m`-config "$@"' > \
8dc7a2
  %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
8dc7a2
echo '[ $? -eq 127 ] && echo "Could not find python%{LDVERSION_optimized}-`uname -m`-config. Look around to see available arches." >&2' >> \
8dc7a2
  %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
8dc7a2
  chmod +x %{buildroot}%{_bindir}/python%{LDVERSION_optimized}-config
8dc7a2
8dc7a2
# ======================================================
8dc7a2
# Running the upstream test suite
8dc7a2
# ======================================================
8dc7a2
8dc7a2
%check
8dc7a2
8dc7a2
# first of all, check timestamps of bytecode files
8dc7a2
find %{buildroot} -type f -a -name "*.py" -print0 | \
8dc7a2
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
8dc7a2
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \
8dc7a2
    xargs -0 %{buildroot}%{_bindir}/python%{pybasever} %{SOURCE10}
8dc7a2
8dc7a2
8dc7a2
topdir=$(pwd)
8dc7a2
CheckPython() {
8dc7a2
  ConfName=$1
8dc7a2
  ConfDir=$(pwd)/build/$ConfName
8dc7a2
8dc7a2
  echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
8dc7a2
8dc7a2
  # Note that we're running the tests using the version of the code in the
8dc7a2
  # builddir, not in the buildroot.
8dc7a2
8dc7a2
  # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the
8dc7a2
  # our non-standard decorators take effect on the relevant tests:
8dc7a2
  #   @unittest._skipInRpmBuild(reason)
8dc7a2
  #   @unittest._expectedFailureInRpmBuild
8dc7a2
  # test_faulthandler.test_register_chain currently fails on ppc64le and
8dc7a2
  #   aarch64, see upstream bug http://bugs.python.org/issue21131
8dc7a2
  WITHIN_PYTHON_RPM_BUILD= \
8dc7a2
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest \
8dc7a2
    --verbose --findleaks \
8dc7a2
    -x test_distutils \
8dc7a2
    -x test_readline \
8dc7a2
    %ifarch ppc64le aarch64
8dc7a2
    -x test_faulthandler \
8dc7a2
    %endif
8dc7a2
    %ifarch %{power64} s390 s390x armv7hl aarch64
8dc7a2
    -x test_gdb
8dc7a2
    %endif
8dc7a2
8dc7a2
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
8dc7a2
8dc7a2
}
8dc7a2
8dc7a2
export -f CheckPython
8dc7a2
8dc7a2
%if 0%{run_selftest_suite}
8dc7a2
8dc7a2
%{?scl:scl enable %scl - << \EOF}
8dc7a2
set -e
8dc7a2
# Check each of the configurations:
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
CheckPython debug
8dc7a2
%endif # with_debug_build
8dc7a2
CheckPython optimized
8dc7a2
%{?scl:EOF}
8dc7a2
8dc7a2
%endif # run_selftest_suite
8dc7a2
8dc7a2
8dc7a2
# ======================================================
8dc7a2
# Cleaning up
8dc7a2
# ======================================================
8dc7a2
8dc7a2
%clean
8dc7a2
rm -fr %{buildroot}
8dc7a2
8dc7a2
8dc7a2
# ======================================================
8dc7a2
# Scriptlets
8dc7a2
# ======================================================
8dc7a2
8dc7a2
%post libs -p /sbin/ldconfig
8dc7a2
8dc7a2
%postun libs -p /sbin/ldconfig
8dc7a2
8dc7a2
8dc7a2
8dc7a2
%files
8dc7a2
%defattr(-, root, root)
8dc7a2
%doc LICENSE README
8dc7a2
%{_bindir}/pydoc*
8dc7a2
%{_bindir}/python
8dc7a2
%{_bindir}/python3
8dc7a2
%{_bindir}/python%{pybasever}
8dc7a2
%{_bindir}/python%{pybasever}m
8dc7a2
%{_bindir}/pyvenv
8dc7a2
%{_bindir}/pyvenv-%{pybasever}
8dc7a2
%{_mandir}/*/*
8dc7a2
8dc7a2
%files libs
8dc7a2
%defattr(-,root,root,-)
8dc7a2
%doc LICENSE README
8dc7a2
%dir %{pylibdir}
8dc7a2
%dir %{dynload_dir}
8dc7a2
%{dynload_dir}/_bisect.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_bz2.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_crypt.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_csv.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_curses.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_dbm.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_decimal.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so
8dc7a2
%if %{with_gdbm}
8dc7a2
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
8dc7a2
%endif
8dc7a2
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_heapq.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_json.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_lzma.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_opcode.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_pickle.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_random.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_socket.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_struct.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/array.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/audioop.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/binascii.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/cmath.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_datetime.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/fcntl.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/grp.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/math.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/mmap.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/nis.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/parser.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/readline.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/resource.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/select.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/spwd.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/syslog.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/termios.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_testmultiphase.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/zlib.%{SOABI_optimized}.so
8dc7a2
8dc7a2
%dir %{pylibdir}/site-packages/
8dc7a2
%dir %{pylibdir}/site-packages/__pycache__/
8dc7a2
%{pylibdir}/site-packages/README
8dc7a2
%{pylibdir}/*.py
8dc7a2
%dir %{pylibdir}/__pycache__/
8dc7a2
%{pylibdir}/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/asyncio/
8dc7a2
%dir %{pylibdir}/asyncio/__pycache__/
8dc7a2
%{pylibdir}/asyncio/*.py
8dc7a2
%{pylibdir}/asyncio/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/collections/
8dc7a2
%dir %{pylibdir}/collections/__pycache__/
8dc7a2
%{pylibdir}/collections/*.py
8dc7a2
%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/concurrent/
8dc7a2
%dir %{pylibdir}/concurrent/__pycache__/
8dc7a2
%{pylibdir}/concurrent/*.py
8dc7a2
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/concurrent/futures/
8dc7a2
%dir %{pylibdir}/concurrent/futures/__pycache__/
8dc7a2
%{pylibdir}/concurrent/futures/*.py
8dc7a2
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/ctypes/
8dc7a2
%dir %{pylibdir}/ctypes/__pycache__/
8dc7a2
%{pylibdir}/ctypes/*.py
8dc7a2
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes}
8dc7a2
%{pylibdir}/ctypes/macholib
8dc7a2
8dc7a2
%{pylibdir}/curses
8dc7a2
8dc7a2
%dir %{pylibdir}/dbm/
8dc7a2
%dir %{pylibdir}/dbm/__pycache__/
8dc7a2
%{pylibdir}/dbm/*.py
8dc7a2
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/distutils/
8dc7a2
%dir %{pylibdir}/distutils/__pycache__/
8dc7a2
%{pylibdir}/distutils/*.py
8dc7a2
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
8dc7a2
%{pylibdir}/distutils/README
8dc7a2
%{pylibdir}/distutils/command
8dc7a2
8dc7a2
%dir %{pylibdir}/email/
8dc7a2
%dir %{pylibdir}/email/__pycache__/
8dc7a2
%{pylibdir}/email/*.py
8dc7a2
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes}
8dc7a2
%{pylibdir}/email/mime
8dc7a2
%doc %{pylibdir}/email/architecture.rst
8dc7a2
8dc7a2
%{pylibdir}/encodings
8dc7a2
%{pylibdir}/html
8dc7a2
%{pylibdir}/http
8dc7a2
%{pylibdir}/idlelib
8dc7a2
8dc7a2
%dir %{pylibdir}/ensurepip/
8dc7a2
%dir %{pylibdir}/ensurepip/__pycache__/
8dc7a2
%{pylibdir}/ensurepip/*.py
8dc7a2
%{pylibdir}/ensurepip/__pycache__/*%{bytecode_suffixes}
8dc7a2
%exclude %{pylibdir}/ensurepip/_bundled
8dc7a2
8dc7a2
%if 0%{?with_rewheel}
8dc7a2
%dir %{pylibdir}/ensurepip/rewheel/
8dc7a2
%dir %{pylibdir}/ensurepip/rewheel/__pycache__/
8dc7a2
%{pylibdir}/ensurepip/rewheel/*.py
8dc7a2
%{pylibdir}/ensurepip/rewheel/__pycache__/*%{bytecode_suffixes}
8dc7a2
%endif
8dc7a2
8dc7a2
%dir %{pylibdir}/importlib/
8dc7a2
%dir %{pylibdir}/importlib/__pycache__/
8dc7a2
%{pylibdir}/importlib/*.py
8dc7a2
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/json/
8dc7a2
%dir %{pylibdir}/json/__pycache__/
8dc7a2
%{pylibdir}/json/*.py
8dc7a2
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%{pylibdir}/lib2to3
8dc7a2
%exclude %{pylibdir}/lib2to3/tests
8dc7a2
%{pylibdir}/logging
8dc7a2
%{pylibdir}/multiprocessing
8dc7a2
%{pylibdir}/plat-linux
8dc7a2
%{pylibdir}/pydoc_data
8dc7a2
8dc7a2
%dir %{pylibdir}/sqlite3/
8dc7a2
%dir %{pylibdir}/sqlite3/__pycache__/
8dc7a2
%{pylibdir}/sqlite3/*.py
8dc7a2
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/test/
8dc7a2
%dir %{pylibdir}/test/__pycache__/
8dc7a2
%dir %{pylibdir}/test/support/
8dc7a2
%dir %{pylibdir}/test/support/__pycache__/
8dc7a2
%{pylibdir}/test/__init__.py
8dc7a2
%{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
8dc7a2
%{pylibdir}/test/support/__init__.py
8dc7a2
%{pylibdir}/test/support/__pycache__/__init__%{bytecode_suffixes}
8dc7a2
8dc7a2
%exclude %{pylibdir}/turtle.py
8dc7a2
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
8dc7a2
8dc7a2
%dir %{pylibdir}/unittest/
8dc7a2
%dir %{pylibdir}/unittest/__pycache__/
8dc7a2
%{pylibdir}/unittest/*.py
8dc7a2
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%{pylibdir}/urllib
8dc7a2
8dc7a2
%dir %{pylibdir}/venv/
8dc7a2
%dir %{pylibdir}/venv/__pycache__/
8dc7a2
%{pylibdir}/venv/*.py
8dc7a2
%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes}
8dc7a2
%{pylibdir}/venv/scripts
8dc7a2
8dc7a2
%{pylibdir}/wsgiref
8dc7a2
%{pylibdir}/xml
8dc7a2
%{pylibdir}/xmlrpc
8dc7a2
8dc7a2
%if "%{_lib}" == "lib64"
8dc7a2
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
8dc7a2
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
8dc7a2
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
8dc7a2
%endif
8dc7a2
8dc7a2
# "Makefile" and the config-32/64.h file are needed by
8dc7a2
# distutils/sysconfig.py:_init_posix(), so we include them in the core
8dc7a2
# package, along with their parent directories (bug 531901):
8dc7a2
%dir %{pylibdir}/config-%{LDVERSION_optimized}/
8dc7a2
%{pylibdir}/config-%{LDVERSION_optimized}/Makefile
8dc7a2
%dir %{_includedir}/python%{LDVERSION_optimized}/
8dc7a2
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
8dc7a2
8dc7a2
%{_libdir}/%{py_INSTSONAME_optimized}
8dc7a2
%{_libdir}/libpython3.so.%{scl}
8dc7a2
%if 0%{?with_systemtap}
8dc7a2
%{?scl:%dir %{_datadir}/systemtap}
8dc7a2
%{?scl:%dir %{tapsetdir}}
8dc7a2
%{tapsetdir}/%{libpython_stp_optimized}
8dc7a2
%doc systemtap-example.stp pyfuntop.stp
8dc7a2
%endif
8dc7a2
8dc7a2
%files devel
8dc7a2
%defattr(-,root,root)
8dc7a2
%{?scl:%{_root_prefix}/lib/rpm/redhat/brp-python-bytecompile-with-scl-python-35}
8dc7a2
%{pylibdir}/config-%{LDVERSION_optimized}/*
8dc7a2
%exclude %{pylibdir}/config-%{LDVERSION_optimized}/Makefile
8dc7a2
%{_includedir}/python%{LDVERSION_optimized}/*.h
8dc7a2
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
8dc7a2
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
8dc7a2
%{_bindir}/python-config
8dc7a2
%{_bindir}/python3-config
8dc7a2
%{_bindir}/python%{pybasever}-config
8dc7a2
%{_bindir}/python%{LDVERSION_optimized}-config
8dc7a2
%{_bindir}/python%{LDVERSION_optimized}-*-config
8dc7a2
%{_libdir}/libpython%{LDVERSION_optimized}.so
8dc7a2
%{?scl:%dir %{_libdir}/pkgconfig}
8dc7a2
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
8dc7a2
%{_libdir}/pkgconfig/python-%{pybasever}.pc
8dc7a2
%{_libdir}/pkgconfig/python.pc
8dc7a2
%{_libdir}/pkgconfig/python3.pc
8dc7a2
%config(noreplace) %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm/macros.python3%{?scl:.%{scl}}
8dc7a2
%config(noreplace) %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm/macros.pybytecompile%{?scl:.%{scl}}
8dc7a2
8dc7a2
%files tools
8dc7a2
%defattr(-,root,root,755)
8dc7a2
%{_bindir}/python3-2to3
8dc7a2
%{_bindir}/python-2to3
8dc7a2
%{_bindir}/2to3-%{pybasever}
8dc7a2
%{_bindir}/2to3
8dc7a2
%{_bindir}/idle*
8dc7a2
%{_bindir}/pynche
8dc7a2
%{pylibdir}/Tools
8dc7a2
%doc %{pylibdir}/Doc
8dc7a2
8dc7a2
%files tkinter
8dc7a2
%defattr(-,root,root,755)
8dc7a2
%{pylibdir}/tkinter
8dc7a2
%exclude %{pylibdir}/tkinter/test
8dc7a2
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
8dc7a2
%{pylibdir}/turtle.py
8dc7a2
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
8dc7a2
%dir %{pylibdir}/turtledemo
8dc7a2
%{pylibdir}/turtledemo/*.py
8dc7a2
%{pylibdir}/turtledemo/*.cfg
8dc7a2
%dir %{pylibdir}/turtledemo/__pycache__/
8dc7a2
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}
8dc7a2
8dc7a2
%files test
8dc7a2
%defattr(-, root, root)
8dc7a2
%{pylibdir}/ctypes/test
8dc7a2
%{pylibdir}/distutils/tests
8dc7a2
%{pylibdir}/sqlite3/test
8dc7a2
%{pylibdir}/test
8dc7a2
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
8dc7a2
%{dynload_dir}/_testimportmultiple.%{SOABI_optimized}.so
8dc7a2
%{pylibdir}/lib2to3/tests
8dc7a2
%{pylibdir}/tkinter/test
8dc7a2
%{pylibdir}/unittest/test
8dc7a2
8dc7a2
8dc7a2
# We don't bother splitting the debug build out into further subpackages:
8dc7a2
# if you need it, you're probably a developer.
8dc7a2
8dc7a2
# Hence the manifest is the combination of analogous files in the manifests of
8dc7a2
# all of the other subpackages
8dc7a2
8dc7a2
%if 0%{?with_debug_build}
8dc7a2
%files debug
8dc7a2
%defattr(-,root,root,-)
8dc7a2
8dc7a2
# Analog of the core subpackage's files:
8dc7a2
%{_bindir}/python%{LDVERSION_debug}
8dc7a2
%{_bindir}/python-debug
8dc7a2
%{_bindir}/python3-debug
8dc7a2
8dc7a2
# Analog of the -libs subpackage's files:
8dc7a2
# ...with debug builds of the built-in "extension" modules:
8dc7a2
%{dynload_dir}/_bisect.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_bz2.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_crypt.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_csv.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_ctypes.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_curses.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_curses_panel.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_dbm.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_decimal.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_elementtree.%{SOABI_debug}.so
8dc7a2
%if %{with_gdbm}
8dc7a2
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
8dc7a2
%endif
8dc7a2
%{dynload_dir}/_hashlib.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_heapq.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_json.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_lsprof.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_lzma.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_opcode.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_pickle.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_random.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_socket.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_sqlite3.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_ssl.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_struct.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/array.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/audioop.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/binascii.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/cmath.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_datetime.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/fcntl.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/grp.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/math.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/mmap.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/nis.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/parser.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/pyexpat.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/readline.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/resource.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/select.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/spwd.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/syslog.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/termios.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_testmultiphase.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/zlib.%{SOABI_debug}.so
8dc7a2
8dc7a2
# No need to split things out the "Makefile" and the config-32/64.h file as we
8dc7a2
# do for the regular build above (bug 531901), since they're all in one package
8dc7a2
# now; they're listed below, under "-devel":
8dc7a2
8dc7a2
%{_libdir}/%{py_INSTSONAME_debug}
8dc7a2
%if 0%{?with_systemtap}
8dc7a2
%dir %(dirname %{tapsetdir})
8dc7a2
%dir %{tapsetdir}
8dc7a2
%{tapsetdir}/%{libpython_stp_debug}
8dc7a2
%endif
8dc7a2
8dc7a2
# Analog of the -devel subpackage's files:
8dc7a2
%{pylibdir}/config-%{LDVERSION_debug}
8dc7a2
%{_includedir}/python%{LDVERSION_debug}
8dc7a2
%{_bindir}/python%{LDVERSION_debug}-config
8dc7a2
%{_libdir}/libpython%{LDVERSION_debug}.so
8dc7a2
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
8dc7a2
8dc7a2
# Analog of the -tools subpackage's files:
8dc7a2
#  None for now; we could build precanned versions that have the appropriate
8dc7a2
# shebang if needed
8dc7a2
8dc7a2
# Analog  of the tkinter subpackage's files:
8dc7a2
%{dynload_dir}/_tkinter.%{SOABI_debug}.so
8dc7a2
8dc7a2
# Analog  of the -test subpackage's files:
8dc7a2
%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_testbuffer.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_testcapi.%{SOABI_debug}.so
8dc7a2
%{dynload_dir}/_testimportmultiple.%{SOABI_debug}.so
8dc7a2
8dc7a2
%endif # with_debug_build
8dc7a2
8dc7a2
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from
8dc7a2
# ldconfig (rhbz:562980).
8dc7a2
#
8dc7a2
# The /usr/lib/rpm/redhat/macros defines %%__debug_package to use
8dc7a2
# debugfiles.list, and it appears that everything below /usr/lib/debug and
8dc7a2
# (/usr/src/debug) gets added to this file (via LISTFILES) in
8dc7a2
# /usr/lib/rpm/find-debuginfo.sh
8dc7a2
#
8dc7a2
# Hence by installing it below /usr/lib/debug we ensure it is added to the
8dc7a2
# -debuginfo subpackage
8dc7a2
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py
8dc7a2
# payload file would be unpackaged)
8dc7a2
8dc7a2
8dc7a2
# ======================================================
8dc7a2
# Finally, the changelog:
8dc7a2
# ======================================================
8dc7a2
8dc7a2
%changelog
cdcbdc
* Fri May 10 2019 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-13
cdcbdc
- Updated fix for CVE-2019-9636
cdcbdc
Resolves: rhbz#1709331
cdcbdc
459902
* Tue Apr 09 2019 Tomas Orsava <torsava@redhat.com> - 3.5.1-12
459902
- Security fix for CVE-2019-9636
459902
Resolves: rhbz#1689319
459902
52fd9b
* Wed Sep 14 2016 Tomas Orsava <torsava@redhat.com> - 3.5.1-11
52fd9b
- Updated .pyc 'bytecompilation with the newly installed interpreter' to also
52fd9b
  recompile optimized .pyc files
52fd9b
- Removed .pyo 'bytecompilation with the newly installed interpreter', as .pyo
52fd9b
  files are no more
52fd9b
- Updated %py_byte_compile macro
52fd9b
Resolves rhbz#1374667
52fd9b
52fd9b
* Fri Aug 05 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-10
52fd9b
- Bump release number for rebuild
52fd9b
Resolves: rhbz#1359174
159b10
159b10
* Fri Aug 05 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-8
159b10
- Fix for CVE-2016-1000110 HTTPoxy attack
52fd9b
Resolves: rhbz#1359174
159b10
159b10
* Tue Jun 21 2016 Tomas Orsava <torsava@redhat.com> - 3.5.1-7
159b10
- Fix for CVE-2016-0772 python: smtplib StartTLS stripping attack (rhbz#1303647)
159b10
  Raise an error when STARTTLS fails (upstream patch)
159b10
Resolves: rhbz#1346361
159b10
8dc7a2
* Tue Apr 26 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-6
8dc7a2
- Modify cprofile-sort-option.patch for Python 3
8dc7a2
Resolves: rhbz#1326287
8dc7a2
8dc7a2
* Thu Apr 14 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.5.1-5
8dc7a2
- Add choices for sort option of cProfile for better output
8dc7a2
Resolves: rhbz#1326287
8dc7a2
8dc7a2
* Wed Feb 17 2016 Robert Kuska <rkuska@redhat.com> - 3.5.1-4
8dc7a2
- Properly apply patches 170&201, remove duplicated Patch200(207)
8dc7a2
8dc7a2
* Sat Feb 13 2016 Robert Kuska <rkuska@redhat.com> - 3.5.1-3
8dc7a2
- Rebuild with rewheel, enable tests
8dc7a2
8dc7a2
* Sat Feb 13 2016 Robert Kuska <rkuska@redhat.com> - 3.5.1-2
8dc7a2
- Fix bytecompile macro name in macros.python3
8dc7a2
- Temporary disable tests for faster rebuild
8dc7a2
8dc7a2
* Thu Feb 11 2016 Robert Kuska <rkuska@redhat.com> - 3.5.1-1
8dc7a2
- Update to 3.5.1
8dc7a2
8dc7a2
* Tue Nov 24 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-6
8dc7a2
- Build python3 for scl
8dc7a2
8dc7a2
* Sun Nov 15 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-5
8dc7a2
- Remove versioned libpython from devel package
8dc7a2
8dc7a2
* Fri Nov 13 2015 Than Ngo <than@redhat.com> 3.5.0-4
8dc7a2
- add correct arch for ppc64/ppc64le to fix build failure
8dc7a2
8dc7a2
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-3
8dc7a2
- Hide the private _Py_atomic_xxx symbols from public header
8dc7a2
8dc7a2
* Wed Oct 14 2015 Robert Kuska <rkuska@redhat.com> - 3.5.0-2
8dc7a2
- Rebuild with wheel set to 1
8dc7a2
8dc7a2
* Tue Sep 15 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.5.0-1
8dc7a2
- Update to 3.5.0
8dc7a2
8dc7a2
* Mon Jun 29 2015 Thomas Spura <tomspur@fedoraproject.org> - 3.4.3-4
8dc7a2
- python3-devel: Require python-macros for version independant macros such as
8dc7a2
  python_provide. See fpc#281 and fpc#534.
8dc7a2
8dc7a2
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.3-3
8dc7a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8dc7a2
8dc7a2
* Wed Jun 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-4
8dc7a2
- Use 1024bit DH key in test_ssl
8dc7a2
- Use -O0 when compiling -debug build
8dc7a2
- Update pip version variable to the version we actually ship
8dc7a2
8dc7a2
* Wed Jun 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-3
8dc7a2
- Make relocating Python by changing _prefix actually work
8dc7a2
Resolves: rhbz#1231801
8dc7a2
8dc7a2
* Mon May  4 2015 Peter Robinson <pbrobinson@fedoraproject.org> 3.4.3-2
8dc7a2
- Disable test_gdb on aarch64 (rhbz#1196181), it joins all other non x86 arches
8dc7a2
8dc7a2
* Thu Mar 12 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.3-1
8dc7a2
- Updated to 3.4.3
8dc7a2
- BuildPython now accepts additional build options
8dc7a2
- Temporarily disabled test_gdb on arm (rhbz#1196181)
8dc7a2
8dc7a2
* Wed Feb 25 2015 Matej Stuchlik <mstuchli@redhat.com> - 3.4.2-7
8dc7a2
- Fixed undefined behaviour in faulthandler which caused test to hang on x86_64
8dc7a2
  (http://bugs.python.org/issue23433)
8dc7a2
8dc7a2
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 3.4.2-6
8dc7a2
- Rebuilt for Fedora 23 Change
8dc7a2
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
8dc7a2
8dc7a2
* Tue Feb 17 2015 Ville Skyttä <ville.skytta@iki.fi> - 3.4.2-5
8dc7a2
- Own systemtap dirs (#710733)
8dc7a2
8dc7a2
* Mon Jan 12 2015 Dan Horák <dan[at]danny.cz> - 3.4.2-4
8dc7a2
- build with valgrind on ppc64le
8dc7a2
- disable test_gdb on s390(x) until rhbz#1181034 is resolved
8dc7a2
8dc7a2
* Tue Dec 16 2014 Robert Kuska <rkuska@redhat.com> - 3.4.2-3
8dc7a2
- New patches: 170 (gc asserts), 200 (gettext headers),
8dc7a2
  201 (gdbm memory leak)
8dc7a2
8dc7a2
* Thu Dec 11 2014 Robert Kuska <rkuska@redhat.com> - 3.4.2-2
8dc7a2
- OpenSSL disabled SSLv3 in SSLv23 method
8dc7a2
8dc7a2
* Thu Nov 13 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.2-1
8dc7a2
- Update to 3.4.2
8dc7a2
- Refreshed patches: 156 (gdb autoload)
8dc7a2
- Removed: 195 (Werror declaration), 197 (CVE-2014-4650)
8dc7a2
8dc7a2
* Mon Nov 03 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.4.1-16
8dc7a2
- Fix CVE-2014-4650 - CGIHTTPServer URL handling
8dc7a2
Resolves: rhbz#1113529
8dc7a2
8dc7a2
* Sun Sep 07 2014 Karsten Hopp <karsten@redhat.com> 3.4.1-15
8dc7a2
- exclude test_gdb on ppc* (rhbz#1132488)
8dc7a2
8dc7a2
* Thu Aug 21 2014 Slavek Kabrda <bkabrda@redhat.com> - 3.4.1-14
8dc7a2
- Update rewheel patch with fix from https://github.com/bkabrda/rewheel/pull/1
8dc7a2
8dc7a2
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.1-13
8dc7a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
8dc7a2
8dc7a2
* Sun Jun  8 2014 Peter Robinson <pbrobinson@fedoraproject.org> 3.4.1-12
8dc7a2
- aarch64 has valgrind, just list those that don't support it
8dc7a2
8dc7a2
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.1-11
8dc7a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8dc7a2
8dc7a2
* Wed Jun 04 2014 Karsten Hopp <karsten@redhat.com> 3.4.1-10
8dc7a2
- bump release and rebuild to link with the correct tcl/tk libs on ppcle
8dc7a2
8dc7a2
* Tue Jun 03 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-9
8dc7a2
- Change paths to bundled projects in rewheel patch
8dc7a2
8dc7a2
* Fri May 30 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-8
8dc7a2
- In config script, use uname -m to write the arch
8dc7a2
8dc7a2
* Thu May 29 2014 Dan Horák <dan[at]danny.cz> - 3.4.1-7
8dc7a2
- update the arch list where valgrind exists - %%power64 includes also
8dc7a2
    ppc64le which is not supported yet
8dc7a2
8dc7a2
* Thu May 29 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-6
8dc7a2
- Forward arguments to the arch specific config script
8dc7a2
Resolves: rhbz#1102683
8dc7a2
8dc7a2
* Wed May 28 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-5
8dc7a2
- Rename python3.Xm-config script to arch specific.
8dc7a2
Resolves: rhbz#1091815
8dc7a2
8dc7a2
* Tue May 27 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.1-4
8dc7a2
- Use python3-*, not python-* runtime requires on setuptools and pip
8dc7a2
- rebuild for tcl-8.6
8dc7a2
8dc7a2
* Tue May 27 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-3
8dc7a2
- Update the rewheel module
8dc7a2
8dc7a2
* Mon May 26 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.1-2
8dc7a2
- Fix multilib dependencies.
8dc7a2
Resolves: rhbz#1091815
8dc7a2
8dc7a2
* Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.1-1
8dc7a2
- Update to Python 3.4.1
8dc7a2
8dc7a2
* Sun May 25 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-8
8dc7a2
- Fix test_gdb failure on ppc64le
8dc7a2
Resolves: rhbz#1095355
8dc7a2
8dc7a2
* Thu May 22 2014 Miro Hrončok <mhroncok@redhat.com> - 3.4.0-7
8dc7a2
- Add macro %%python3_version_nodots
8dc7a2
8dc7a2
* Sun May 18 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-6
8dc7a2
- Disable test_faulthandler, test_gdb on aarch64
8dc7a2
Resolves: rhbz#1045193
8dc7a2
8dc7a2
* Fri May 16 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-5
8dc7a2
- Don't add Werror=declaration-after-statement for extension
8dc7a2
  modules through setup.py (PyBT#21121)
8dc7a2
8dc7a2
* Mon May 12 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-4
8dc7a2
- Add setuptools and pip to Requires
8dc7a2
8dc7a2
* Tue Apr 29 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-3
8dc7a2
- Point __os_install_post to correct brp-* files
8dc7a2
8dc7a2
* Tue Apr 15 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-2
8dc7a2
- Temporarily disable tests requiring SIGHUP (rhbz#1088233)
8dc7a2
8dc7a2
* Tue Apr 15 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.4.0-1
8dc7a2
- Update to Python 3.4 final
8dc7a2
- Add patch adding the rewheel module
8dc7a2
- Merge patches from master
8dc7a2
8dc7a2
* Wed Jan 08 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.0-0.1.b2
8dc7a2
- Update to Python 3.4 beta 2.
8dc7a2
- Refreshed patches: 55 (systemtap), 146 (hashlib-fips), 154 (test_gdb noise)
8dc7a2
- Dropped patches: 114 (statvfs constants), 177 (platform unicode)
8dc7a2
8dc7a2
* Mon Nov 25 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.0-0.1.b1
8dc7a2
- Update to Python 3.4 beta 1.
8dc7a2
- Refreshed patches: 102 (lib64), 111 (no static lib), 125 (less verbose COUNT
8dc7a2
ALLOCS), 141 (fix COUNT_ALLOCS in test_module), 146 (hashlib fips),
8dc7a2
157 (UID+GID overflows), 173 (ENOPROTOOPT in bind_port)
8dc7a2
- Removed patch 00187 (remove pthread atfork; upstreamed)
8dc7a2
8dc7a2
* Mon Nov 04 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.4.0-0.1.a4
8dc7a2
- Update to Python 3.4 alpha 4.
8dc7a2
- Refreshed patches: 55 (systemtap), 102 (lib64), 111 (no static lib),
8dc7a2
114 (statvfs flags), 132 (unittest rpmbuild hooks), 134 (fix COUNT_ALLOCS in
8dc7a2
test_sys), 143 (tsc on ppc64), 146 (hashlib fips), 153 (test gdb noise),
8dc7a2
157 (UID+GID overflows), 173 (ENOPROTOOPT in bind_port), 186 (dont raise
8dc7a2
from py_compile)
8dc7a2
- Removed patches: 129 (test_subprocess nonreadable dir - no longer fails in
8dc7a2
Koji), 142 (the mock issue that caused this is fixed)
8dc7a2
- Added patch 187 (remove thread atfork) - will be in next version
8dc7a2
- Refreshed script for checking pyc and pyo timestamps with new ignored files.
8dc7a2
- The fips patch is disabled for now until upstream makes a final decision
8dc7a2
what to do with sha3 implementation for 3.4.0.
8dc7a2
8dc7a2
* Wed Oct 30 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-7
8dc7a2
- Bytecompile all *.py files properly during build (rhbz#1023607)
8dc7a2
8dc7a2
* Fri Aug 23 2013 Matej Stuchlik <mstuchli@redhat.com> - 3.3.2-6
8dc7a2
- Added fix for CVE-2013-4238 (rhbz#996399)
8dc7a2
8dc7a2
* Fri Jul 26 2013 Dennis Gilmore <dennis@ausil.us> - 3.3.2-5
8dc7a2
- fix up indentation in arm patch
8dc7a2
8dc7a2
* Fri Jul 26 2013 Dennis Gilmore <dennis@ausil.us> - 3.3.2-4
8dc7a2
- disable a test that fails on arm
8dc7a2
- enable valgrind support on arm arches
8dc7a2
8dc7a2
* Tue Jul 02 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-3
8dc7a2
- Fix build with libffi containing multilib wrapper for ffi.h (rhbz#979696).
8dc7a2
8dc7a2
* Mon May 20 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-2
8dc7a2
- Add patch for CVE-2013-2099 (rhbz#963261).
8dc7a2
8dc7a2
* Thu May 16 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-1
8dc7a2
- Updated to Python 3.3.2.
8dc7a2
- Refreshed patches: 153 (gdb test noise)
8dc7a2
- Dropped patches: 175 (configure -Wformat, fixed upstream), 182 (gdb
8dc7a2
test threads)
8dc7a2
- Synced patch numbers with python.spec.
8dc7a2
8dc7a2
* Thu May  9 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.1-4
8dc7a2
- fix test.test_gdb.PyBtTests.test_threads on ppc64 (patch 181; rhbz#960010)
8dc7a2
8dc7a2
* Thu May 02 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-3
8dc7a2
- Add patch that enables building on ppc64p7 (replace the sed, so that
8dc7a2
we get consistent with python2 spec and it's more obvious that we're doing it.
8dc7a2
8dc7a2
* Wed Apr 24 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-2
8dc7a2
- Add fix for gdb tests failing on arm, rhbz#951802.
8dc7a2
8dc7a2
* Tue Apr 09 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-1
8dc7a2
- Updated to Python 3.3.1.
8dc7a2
- Refreshed patches: 55 (systemtap), 111 (no static lib), 146 (hashlib fips),
8dc7a2
153 (fix test_gdb noise), 157 (uid, gid overflow - fixed upstream, just
8dc7a2
keeping few more downstream tests)
8dc7a2
- Removed patches: 3 (audiotest.au made it to upstream tarball)
8dc7a2
- Removed workaround for http://bugs.python.org/issue14774, discussed in
8dc7a2
http://bugs.python.org/issue15298 and fixed in revision 24d52d3060e8.
8dc7a2
8dc7a2
* Mon Mar 25 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-10
8dc7a2
- fix gcc 4.8 incompatibility (rhbz#927358); regenerate autotool intermediates
8dc7a2
8dc7a2
* Mon Mar 25 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-9
8dc7a2
- renumber patches to keep them in sync with python.spec
8dc7a2
8dc7a2
* Fri Mar 15 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.0-8
8dc7a2
- Fix error in platform.platform() when non-ascii byte strings are decoded to
8dc7a2
  unicode (rhbz#922149)
8dc7a2
8dc7a2
* Thu Mar 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.3.0-7
8dc7a2
- Fix up shared library extension (rhbz#889784)
8dc7a2
8dc7a2
* Thu Mar 07 2013 Karsten Hopp <karsten@redhat.com> 3.3.0-6
8dc7a2
- add ppc64p7 build target, optimized for Power7
8dc7a2
8dc7a2
* Mon Mar  4 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-5
8dc7a2
- add workaround for ENOPROTOOPT seen running selftests in Koji
8dc7a2
(rhbz#913732)
8dc7a2
8dc7a2
* Mon Mar  4 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-4
8dc7a2
- remove config flag from /etc/rpm/macros.{python3|pybytecompile}
8dc7a2
8dc7a2
* Mon Feb 11 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-3
8dc7a2
- add aarch64 (rhbz#909783)
8dc7a2
8dc7a2
* Thu Nov 29 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-2
8dc7a2
- add BR on bluez-libs-devel (rhbz#879720)
8dc7a2
8dc7a2
* Sat Sep 29 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-1
8dc7a2
- 3.3.0rc3 -> 3.3.0; drop alphatag
8dc7a2
8dc7a2
* Mon Sep 24 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.6.rc3
8dc7a2
- 3.3.0rc2 -> 3.3.0rc3
8dc7a2
8dc7a2
* Mon Sep 10 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.5.rc2
8dc7a2
- 3.3.0rc1 -> 3.3.0rc2; refresh patch 55
8dc7a2
8dc7a2
* Mon Aug 27 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.4.rc1
8dc7a2
- 3.3.0b2 -> 3.3.0rc1; refresh patches 3, 55
8dc7a2
8dc7a2
* Mon Aug 13 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.3.b2
8dc7a2
- 3.3b1 -> 3.3b2; drop upstreamed patch 152; refresh patches 3, 102, 111,
8dc7a2
134, 153, 160; regenenerate autotools patch; rework systemtap patch to work
8dc7a2
correctly when LANG=C (patch 55); importlib.test was moved to
8dc7a2
test.test_importlib upstream
8dc7a2
8dc7a2
* Mon Aug 13 2012 Karsten Hopp <karsten@redhat.com> 3.3.0-0.2.b1
8dc7a2
- disable some failing checks on PPC* (rhbz#846849)
8dc7a2
8dc7a2
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.1.b1
8dc7a2
- 3.2 -> 3.3: https://fedoraproject.org/wiki/Features/Python_3.3
8dc7a2
- 3.3.0b1: refresh patches 3, 55, 102, 111, 113, 114, 134, 157; drop upstream
8dc7a2
patch 147; regenenerate autotools patch; drop "--with-wide-unicode" from
8dc7a2
configure (PEP 393); "plat-linux2" -> "plat-linux" (upstream issue 12326);
8dc7a2
"bz2" -> "_bz2" and "crypt" -> "_crypt"; egg-info files are no longer shipped
8dc7a2
for stdlib (upstream issues 10645 and 12218); email/test moved to
8dc7a2
test/test_email; add /usr/bin/pyvenv[-3.3] and venv module (PEP 405); add
8dc7a2
_decimal and _lzma modules; make collections modules explicit in payload again
8dc7a2
(upstream issue 11085); add _testbuffer module to tests subpackage (added in
8dc7a2
upstream commit 3f9b3b6f7ff0); fix test failures (patches 160 and 161);
8dc7a2
workaround erroneously shared _sysconfigdata.py upstream issue #14774; fix
8dc7a2
distutils.sysconfig traceback (patch 162); add BuildRequires: xz-devel (for
8dc7a2
_lzma module); skip some tests within test_socket (patch 163)
8dc7a2
8dc7a2
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-11
8dc7a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8dc7a2
8dc7a2
* Fri Jul 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.1.b1
8dc7a2
8dc7a2
* Fri Jun 22 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-10
8dc7a2
- use macro for power64 (rhbz#834653)
8dc7a2
8dc7a2
* Mon Jun 18 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-9
8dc7a2
- fix missing include in uid/gid handling patch (patch 157; rhbz#830405)
8dc7a2
8dc7a2
* Wed May 30 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 3.2.3-8
8dc7a2
- fix tapset for debug build
8dc7a2
8dc7a2
* Tue May 15 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-7
8dc7a2
- update uid/gid handling to avoid int overflows seen with uid/gid
8dc7a2
values >= 2^31 on 32-bit architectures (patch 157; rhbz#697470)
8dc7a2
8dc7a2
* Fri May  4 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-6
8dc7a2
- renumber autotools patch from 300 to 5000
8dc7a2
- specfile cleanups
8dc7a2
8dc7a2
* Mon Apr 30 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-5
8dc7a2
- fix test_gdb.py (patch 156; rhbz#817072)
8dc7a2
8dc7a2
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-4
8dc7a2
- avoid allocating thunks in ctypes unless absolutely necessary, to avoid
8dc7a2
generating SELinux denials on "import ctypes" and "import uuid" when embedding
8dc7a2
Python within httpd (patch 155; rhbz#814391)
8dc7a2
8dc7a2
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-3
8dc7a2
- add explicit version requirements on expat to avoid linkage problems with
8dc7a2
XML_SetHashSalt
8dc7a2
8dc7a2
* Thu Apr 12 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-2
8dc7a2
- fix test_gdb (patch 153)
8dc7a2
8dc7a2
* Wed Apr 11 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-1
8dc7a2
- 3.2.3; refresh patch 102 (lib64); drop upstream patches 148 (gdbm magic
8dc7a2
values), 149 (__pycache__ fix); add patch 152 (test_gdb regex)
8dc7a2
8dc7a2
* Thu Feb  9 2012 Thomas Spura <tomspur@fedoraproject.org> - 3.2.2-13
8dc7a2
- use newly installed python for byte compiling (now for real)
8dc7a2
8dc7a2
* Sun Feb  5 2012 Thomas Spura <tomspur@fedoraproject.org> - 3.2.2-12
8dc7a2
- use newly installed python for byte compiling (#787498)
8dc7a2
8dc7a2
* Wed Jan  4 2012 Ville Skyttä <ville.skytta@iki.fi> - 3.2.2-11
8dc7a2
- Build with $RPM_LD_FLAGS (#756863).
8dc7a2
- Use xz-compressed source tarball.
8dc7a2
8dc7a2
* Wed Dec 07 2011 Karsten Hopp <karsten@redhat.com> 3.2.2-10
8dc7a2
- disable rAssertAlmostEqual in test_cmath on PPC (#750811)
8dc7a2
8dc7a2
* Mon Oct 17 2011 Rex Dieter <rdieter@fedoraproject.org> - 3.2.2-9
8dc7a2
- python3-devel missing autogenerated pkgconfig() provides (#746751)
8dc7a2
8dc7a2
* Mon Oct 10 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-8
8dc7a2
- cherrypick fix for distutils not using __pycache__ when byte-compiling
8dc7a2
files (rhbz#722578)
8dc7a2
8dc7a2
* Fri Sep 30 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-7
8dc7a2
- re-enable gdbm (patch 148; rhbz#742242)
8dc7a2
8dc7a2
* Fri Sep 16 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-6
8dc7a2
- add a sys._debugmallocstats() function (patch 147)
8dc7a2
8dc7a2
* Wed Sep 14 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-5
8dc7a2
- support OpenSSL FIPS mode in _hashlib and hashlib; don't build the _md5 and
8dc7a2
_sha* modules, relying on _hashlib in hashlib (rhbz#563986; patch 146)
8dc7a2
8dc7a2
* Tue Sep 13 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-4
8dc7a2
- disable gdbm module to prepare for gdbm soname bump
8dc7a2
8dc7a2
* Mon Sep 12 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-3
8dc7a2
- renumber and rename patches for consistency with python.spec (8 to 55, 106
8dc7a2
to 104, 6 to 111, 104 to 113, 105 to 114, 125, 131, 130 to 143)
8dc7a2
8dc7a2
* Sat Sep 10 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-2
8dc7a2
- rewrite of "check", introducing downstream-only hooks for skipping specific
8dc7a2
cases in an rpmbuild (patch 132), and fixing/skipping failing tests in a more
8dc7a2
fine-grained manner than before; (patches 106, 133-142 sparsely, moving
8dc7a2
patches for consistency with python.spec: 128 to 134, 126 to 135, 127 to 141)
8dc7a2
8dc7a2
* Tue Sep  6 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-1
8dc7a2
- 3.2.2
8dc7a2
8dc7a2
* Thu Sep  1 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-7
8dc7a2
- run selftests with "--verbose"
8dc7a2
- disable parts of test_io on ppc (rhbz#732998)
8dc7a2
8dc7a2
* Wed Aug 31 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-6
8dc7a2
- use "--findleaks --verbose3" when running test suite
8dc7a2
8dc7a2
* Tue Aug 23 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-5
8dc7a2
- re-enable and fix the --with-tsc option on ppc64, and rework it on 32-bit
8dc7a2
ppc to avoid aliasing violations (patch 130; rhbz#698726)
8dc7a2
8dc7a2
* Tue Aug 23 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-4
8dc7a2
- don't use --with-tsc on ppc64 debug builds (rhbz#698726)
8dc7a2
8dc7a2
* Thu Aug 18 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-3
8dc7a2
- add %%python3_version to the rpm macros (rhbz#719082)
8dc7a2
8dc7a2
* Mon Jul 11 2011 Dennis Gilmore <dennis@ausil.us> - 3.2.1-2
8dc7a2
- disable some tests on sparc arches
8dc7a2
8dc7a2
* Mon Jul 11 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-1
8dc7a2
- 3.2.1; refresh lib64 patch (102), subprocess unit test patch (129), disabling
8dc7a2
of static library build (due to Modules/_testembed; patch 6), autotool
8dc7a2
intermediates (patch 300)
8dc7a2
8dc7a2
* Fri Jul  8 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-5
8dc7a2
- use the gdb hooks from the upstream tarball, rather than keeping our own copy
8dc7a2
8dc7a2
* Fri Jul  8 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-4
8dc7a2
- don't run test_openpty and test_pty in %%check
8dc7a2
8dc7a2
* Fri Jul  8 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-3
8dc7a2
- cleanup of BuildRequires; add comment headings to specfile sections
8dc7a2
8dc7a2
* Tue Apr 19 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-2
8dc7a2
- fix the libpython.stp systemtap tapset (rhbz#697730)
8dc7a2
8dc7a2
* Mon Feb 21 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-1
8dc7a2
- 3.2
8dc7a2
- drop alphatag
8dc7a2
- regenerate autotool patch
8dc7a2
8dc7a2
* Mon Feb 14 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.13.rc3
8dc7a2
- add a /usr/bin/python3-debug symlink within the debug subpackage
8dc7a2
8dc7a2
* Mon Feb 14 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.12.rc3
8dc7a2
- 3.2rc3
8dc7a2
- regenerate autotool patch
8dc7a2
8dc7a2
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-0.11.rc2
8dc7a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8dc7a2
8dc7a2
* Mon Jan 31 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.10.rc2
8dc7a2
- 3.2rc2
8dc7a2
8dc7a2
* Mon Jan 17 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.9.rc1
8dc7a2
- 3.2rc1
8dc7a2
- rework patch 6 (static lib removal)
8dc7a2
- remove upstreamed patch 130 (ppc debug build)
8dc7a2
- regenerate patch 300 (autotool intermediates)
8dc7a2
- updated packaging to reflect upstream rewrite of "Demo" (issue 7962)
8dc7a2
- added libpython3.so and 2to3-3.2
8dc7a2
8dc7a2
* Wed Jan  5 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.8.b2
8dc7a2
- set EXTRA_CFLAGS to our CFLAGS, rather than overriding OPT, fixing a linker
8dc7a2
error with dynamic annotations (when configured using --with-valgrind)
8dc7a2
- fix the ppc build of the debug configuration (patch 130; rhbz#661510)
8dc7a2
8dc7a2
* Tue Jan  4 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.7.b2
8dc7a2
- add --with-valgrind to configuration (on architectures that support this)
8dc7a2
8dc7a2
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.6.b2
8dc7a2
- work around test_subprocess failure seen in koji (patch 129)
8dc7a2
8dc7a2
* Tue Dec 28 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.5.b2
8dc7a2
- 3.2b2
8dc7a2
- rework patch 3 (removal of mimeaudio tests), patch 6 (no static libs),
8dc7a2
patch 8 (systemtap), patch 102 (lib64)
8dc7a2
- remove patch 4 (rendered redundant by upstream r85537), patch 103 (PEP 3149),
8dc7a2
patch 110 (upstreamed expat fix), patch 111 (parallel build fix for grammar
8dc7a2
fixed upstream)
8dc7a2
- regenerate patch 300 (autotool intermediates)
8dc7a2
- workaround COUNT_ALLOCS weakref issues in test suite (patch 126, patch 127,
8dc7a2
patch 128)
8dc7a2
- stop using runtest.sh in %%check (dropped by upstream), replacing with
8dc7a2
regrtest; fixup list of failing tests
8dc7a2
- introduce "pyshortver", "SOABI_optimized" and "SOABI_debug" macros
8dc7a2
- rework manifests of shared libraries to use "SOABI_" macros, reflecting
8dc7a2
PEP 3149
8dc7a2
- drop itertools, operator and _collections modules from the manifests as py3k
8dc7a2
commit r84058 moved these inside libpython; json/tests moved to test/json_tests
8dc7a2
- move turtle code into the tkinter subpackage
8dc7a2
8dc7a2
* Wed Nov 17 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.5.a1
8dc7a2
- fix sysconfig to not rely on the -devel subpackage (rhbz#653058)
8dc7a2
8dc7a2
* Thu Sep  9 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.4.a1
8dc7a2
- move most of the content of the core package to the libs subpackage, given
8dc7a2
that the libs aren't meaningfully usable without the standard libraries
8dc7a2
8dc7a2
* Wed Sep  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.3.a1
8dc7a2
- Move test.support to core package (rhbz#596258)
8dc7a2
- Add various missing __pycache__ directories to payload
8dc7a2
8dc7a2
* Sun Aug 22 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2-0.2.a1
8dc7a2
- Add __pycache__ directory for site-packages
8dc7a2
8dc7a2
* Sun Aug 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 3.2-0.1.a1
8dc7a2
- on 64bit "stdlib" was still "/usr/lib/python*" (modify *lib64.patch)
8dc7a2
- make find-provides-without-python-sonames.sh 64bit aware
8dc7a2
8dc7a2
* Sat Aug 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.0.a1
8dc7a2
- 3.2a1; add alphatag
8dc7a2
- rework %%files in the light of PEP 3147 (__pycache__)
8dc7a2
- drop our configuration patch to Setup.dist (patch 0): setup.py should do a
8dc7a2
better job of things, and the %%files explicitly lists our modules (r82746
8dc7a2
appears to break the old way of doing things).  This leads to various modules
8dc7a2
changing from "foomodule.so" to "foo.so".  It also leads to the optimized build
8dc7a2
dropping the _sha1, _sha256 and _sha512 modules, but these are provided by
8dc7a2
_hashlib; _weakref becomes a builtin module; xxsubtype goes away (it's only for
8dc7a2
testing/devel purposes)
8dc7a2
- fixup patches 3, 4, 6, 8, 102, 103, 105, 111 for the rebase
8dc7a2
- remove upstream patches: 7 (system expat), 106, 107, 108 (audioop reformat
8dc7a2
plus CVE-2010-1634 and CVE-2010-2089), 109 (CVE-2008-5983)
8dc7a2
- add machinery for rebuilding "configure" and friends, using the correct
8dc7a2
version of autoconf (patch 300)
8dc7a2
- patch the debug build's usage of COUNT_ALLOCS to be less verbose (patch 125)
8dc7a2
- "modulator" was removed upstream
8dc7a2
- drop "-b" from patch applications affecting .py files to avoid littering the
8dc7a2
installation tree
8dc7a2
8dc7a2
* Thu Aug 19 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.1.2-13
8dc7a2
- Turn on computed-gotos.
8dc7a2
- Fix for parallel make and graminit.c
8dc7a2
8dc7a2
* Fri Jul  2 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-12
8dc7a2
- rebuild
8dc7a2
8dc7a2
* Fri Jul  2 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-11
8dc7a2
- Fix an incompatibility between pyexpat and the system expat-2.0.1 that led to
8dc7a2
a segfault running test_pyexpat.py (patch 110; upstream issue 9054; rhbz#610312)
8dc7a2
8dc7a2
* Fri Jun  4 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-10
8dc7a2
- ensure that the compiler is invoked with "-fwrapv" (rhbz#594819)
8dc7a2
- reformat whitespace in audioop.c (patch 106)
8dc7a2
- CVE-2010-1634: fix various integer overflow checks in the audioop
8dc7a2
module (patch 107)
8dc7a2
- CVE-2010-2089: further checks within the audioop module (patch 108)
8dc7a2
- CVE-2008-5983: the new PySys_SetArgvEx entry point from r81399 (patch 109)
8dc7a2
8dc7a2
* Thu May 27 2010 Dan Horák <dan[at]danny.cz> - 3.1.2-9
8dc7a2
- reading the timestamp counter is available only on some arches (see Python/ceval.c)
8dc7a2
8dc7a2
* Wed May 26 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-8
8dc7a2
- add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
8dc7a2
(patch 105)
8dc7a2
8dc7a2
* Tue May 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-7
8dc7a2
- add configure-time support for COUNT_ALLOCS and CALL_PROFILE debug options
8dc7a2
(patch 104); enable them and the WITH_TSC option within the debug build
8dc7a2
8dc7a2
* Mon May 24 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-6
8dc7a2
- build and install two different configurations of Python 3: debug and
8dc7a2
standard, packaging the debug build in a new "python3-debug" subpackage
8dc7a2
(patch 103)
8dc7a2
8dc7a2
* Tue Apr 13 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-5
8dc7a2
- exclude test_http_cookies when running selftests, due to hang seen on
8dc7a2
http://koji.fedoraproject.org/koji/taskinfo?taskID=2088463 (cancelled after
8dc7a2
11 hours)
8dc7a2
- update python-gdb.py from v5 to py3k version submitted upstream
8dc7a2
8dc7a2
* Wed Mar 31 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-4
8dc7a2
- update python-gdb.py from v4 to v5 (improving performance and stability,
8dc7a2
adding commands)
8dc7a2
8dc7a2
* Thu Mar 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-3
8dc7a2
- update python-gdb.py from v3 to v4 (fixing infinite recursion on reference
8dc7a2
cycles and tracebacks on bytes 0x80-0xff in strings, adding handlers for sets
8dc7a2
and exceptions)
8dc7a2
8dc7a2
* Wed Mar 24 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-2
8dc7a2
- refresh gdb hooks to v3 (reworking how they are packaged)
8dc7a2
8dc7a2
* Sun Mar 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-1
8dc7a2
- update to 3.1.2: http://www.python.org/download/releases/3.1.2/
8dc7a2
- drop upstreamed patch 2 (.pyc permissions handling)
8dc7a2
- drop upstream patch 5 (fix for the test_tk and test_ttk_* selftests)
8dc7a2
- drop upstreamed patch 200 (path-fixing script)
8dc7a2
8dc7a2
* Sat Mar 20 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-28
8dc7a2
- fix typo in libpython.stp (rhbz:575336)
8dc7a2
8dc7a2
* Fri Mar 12 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-27
8dc7a2
- add pyfuntop.stp example (source 7)
8dc7a2
- convert usage of $$RPM_BUILD_ROOT to %%{buildroot} throughout, for
8dc7a2
consistency with python.spec
8dc7a2
8dc7a2
* Mon Feb 15 2010 Thomas Spura <tomspur@fedoraproject.org> - 3.1.1-26
8dc7a2
- rebuild for new package of redhat-rpm-config (rhbz:564527)
8dc7a2
- use 'install -p' when running 'make install'
8dc7a2
8dc7a2
* Fri Feb 12 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-25
8dc7a2
- split configure options into multiple lines for easy of editing
8dc7a2
- add systemtap static markers (wcohen, mjw, dmalcolm; patch 8), a systemtap
8dc7a2
tapset defining "python.function.entry" and "python.function.return" to make
8dc7a2
the markers easy to use (dmalcolm; source 5), and an example of using the
8dc7a2
tapset to the docs (dmalcolm; source 6) (rhbz:545179)
8dc7a2
8dc7a2
* Mon Feb  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-24
8dc7a2
- move the -gdb.py file from %%{_libdir}/INSTSONAME-gdb.py to
8dc7a2
%%{_prefix}/lib/debug/%%{_libdir}/INSTSONAME.debug-gdb.py to avoid noise from
8dc7a2
ldconfig (bug 562980), and which should also ensure it becomes part of the
8dc7a2
debuginfo subpackage, rather than the libs subpackage
8dc7a2
- introduce %%{py_SOVERSION} and %%{py_INSTSONAME} to reflect the upstream
8dc7a2
configure script, and to avoid fragile scripts that try to figure this out
8dc7a2
dynamically (e.g. for the -gdb.py change)
8dc7a2
8dc7a2
* Mon Feb  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-23
8dc7a2
- add gdb hooks for easier debugging (Source 4)
8dc7a2
8dc7a2
* Thu Jan 28 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-22
8dc7a2
- update python-3.1.1-config.patch to remove downstream customization of build
8dc7a2
of pyexpat and elementtree modules
8dc7a2
- add patch adapted from upstream (patch 7) to add support for building against
8dc7a2
system expat; add --with-system-expat to "configure" invocation
8dc7a2
- remove embedded copies of expat and zlib from source tree during "prep"
8dc7a2
8dc7a2
* Mon Jan 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-21
8dc7a2
- introduce %%{dynload_dir} macro
8dc7a2
- explicitly list all lib-dynload files, rather than dynamically gathering the
8dc7a2
payload into a temporary text file, so that we can be sure what we are
8dc7a2
shipping
8dc7a2
- introduce a macros.pybytecompile source file, to help with packaging python3
8dc7a2
modules (Source3; written by Toshio)
8dc7a2
- rename "2to3-3" to "python3-2to3" to better reflect python 3 module packaging
8dc7a2
plans
8dc7a2
8dc7a2
* Mon Jan 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-20
8dc7a2
- change python-3.1.1-config.patch to remove our downstream change to curses
8dc7a2
configuration in Modules/Setup.dist, so that the curses modules are built using
8dc7a2
setup.py with the downstream default (linking against libncursesw.so, rather
8dc7a2
than libncurses.so), rather than within the Makefile; add a test to %%install
8dc7a2
to verify the dso files that the curses module is linked against the correct
8dc7a2
DSO (bug 539917; changes _cursesmodule.so -> _curses.so)
8dc7a2
8dc7a2
* Fri Jan 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-19
8dc7a2
- add %%py3dir macro to macros.python3 (to be used during unified python 2/3
8dc7a2
builds for setting up the python3 copy of the source tree)
8dc7a2
8dc7a2
* Wed Jan 20 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-18
8dc7a2
- move lib2to3 from -tools subpackage to main package (bug 556667)
8dc7a2
8dc7a2
* Sun Jan 17 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-17
8dc7a2
- patch Makefile.pre.in to avoid building static library (patch 6, bug 556092)
8dc7a2
8dc7a2
* Fri Jan 15 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-16
8dc7a2
- use the %%{_isa} macro to ensure that the python-devel dependency on python
8dc7a2
is for the correct multilib arch (#555943)
8dc7a2
- delete bundled copy of libffi to make sure we use the system one
8dc7a2
8dc7a2
* Fri Jan 15 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-15
8dc7a2
- fix the URLs output by pydoc so they point at python.org's 3.1 build of the
8dc7a2
docs, rather than the 2.6 build
8dc7a2
8dc7a2
* Wed Jan 13 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-14
8dc7a2
- replace references to /usr with %%{_prefix}; replace references to
8dc7a2
/usr/include with %%{_includedir} (Toshio)
8dc7a2
8dc7a2
* Mon Jan 11 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-13
8dc7a2
- fix permission on find-provides-without-python-sonames.sh from 775 to 755
8dc7a2
8dc7a2
* Mon Jan 11 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-12
8dc7a2
- remove build-time requirements on tix and tk, since we already have
8dc7a2
build-time requirements on the -devel subpackages for each of these (Thomas
8dc7a2
Spura)
8dc7a2
- replace usage of %%define with %%global (Thomas Spura)
8dc7a2
- remove forcing of CC=gcc as this old workaround for bug 109268 appears to
8dc7a2
longer be necessary
8dc7a2
- move various test files from the "tools"/"tkinter" subpackages to the "test"
8dc7a2
subpackage
8dc7a2
8dc7a2
* Thu Jan  7 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-11
8dc7a2
- add %%check section (thanks to Thomas Spura)
8dc7a2
- update patch 4 to use correct shebang line
8dc7a2
- get rid of stray patch file from buildroot
8dc7a2
8dc7a2
* Tue Nov 17 2009 Andrew McNabb <amcnabb@mcnabbs.org> - 3.1.1-10
8dc7a2
- switched a few instances of "find |xargs" to "find -exec" for consistency.
8dc7a2
- made the description of __os_install_post more accurate.
8dc7a2
8dc7a2
* Wed Nov  4 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-9
8dc7a2
- add macros.python3 to the -devel subpackage, containing common macros for use
8dc7a2
when packaging python3 modules
8dc7a2
8dc7a2
* Tue Nov  3 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-8
8dc7a2
- add a provides of "python(abi)" (see bug 532118)
8dc7a2
- fix issues identified by a.badger in package review (bug 526126, comment 39):
8dc7a2
  - use "3" thoughout metadata, rather than "3.*"
8dc7a2
  - remove conditional around "pkg-config openssl"
8dc7a2
  - use standard cleanup of RPM_BUILD_ROOT
8dc7a2
  - replace hardcoded references to /usr with _prefix macro
8dc7a2
  - stop removing egg-info files
8dc7a2
  - use /usr/bin/python3.1 rather than /use/bin/env python3.1 when fixing
8dc7a2
up shebang lines
8dc7a2
  - stop attempting to remove no-longer-present .cvsignore files
8dc7a2
  - move the post/postun sections above the "files" sections
8dc7a2
8dc7a2
* Thu Oct 29 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-7
8dc7a2
- remove commented-away patch 51 (python-2.6-distutils_rpm.patch): the -O1
8dc7a2
flag is used by default in the upstream code
8dc7a2
- "Makefile" and the config-32/64.h file are needed by distutils/sysconfig.py
8dc7a2
_init_posix(), so we include them in the core package, along with their parent
8dc7a2
directories (bug 531901)
8dc7a2
8dc7a2
* Tue Oct 27 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-6
8dc7a2
- reword description, based on suggestion by amcnabb
8dc7a2
- fix the test_email and test_imp selftests (patch 3 and patch 4 respectively)
8dc7a2
- fix the test_tk and test_ttk_* selftests (patch 5)
8dc7a2
- fix up the specfile's handling of shebang/perms to avoid corrupting
8dc7a2
test_httpservers.py (sed command suggested by amcnabb)
8dc7a2
8dc7a2
* Thu Oct 22 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-5
8dc7a2
- fixup importlib/_bootstrap.py so that it correctly handles being unable to
8dc7a2
open .pyc files for writing (patch 2, upstream issue 7187)
8dc7a2
- actually apply the rpath patch (patch 1)
8dc7a2
8dc7a2
* Thu Oct 22 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-4
8dc7a2
- update patch0's setup of the crypt module to link it against libcrypt
8dc7a2
- update patch0 to comment "datetimemodule" back out, so that it is built
8dc7a2
using setup.py (see Setup, option 3), thus linking it statically against
8dc7a2
timemodule.c and thus avoiding a run-time "undefined symbol:
8dc7a2
_PyTime_DoubleToTimet" failure on "import datetime"
8dc7a2
8dc7a2
* Wed Oct 21 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-3
8dc7a2
- remove executable flag from various files that shouldn't have it
8dc7a2
- fix end-of-line encodings
8dc7a2
- fix a character encoding
8dc7a2
8dc7a2
* Tue Oct 20 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-2
8dc7a2
- disable invocation of brp-python-bytecompile in postprocessing, since
8dc7a2
it would be with the wrong version of python (adapted from ivazquez'
8dc7a2
python3000 specfile)
8dc7a2
- use a custom implementation of __find_provides in order to filter out bogus
8dc7a2
provides lines for the various .so modules
8dc7a2
- fixup distutils/unixccompiler.py to remove standard library path from rpath
8dc7a2
(patch 1, was Patch0 in ivazquez' python3000 specfile)
8dc7a2
- split out libraries into a -libs subpackage
8dc7a2
- update summaries and descriptions, basing content on ivazquez' specfile
8dc7a2
- fixup executable permissions on .py, .xpm and .xbm files, based on work in
8dc7a2
ivazquez's specfile
8dc7a2
- get rid of DOS batch files
8dc7a2
- fixup permissions for shared libraries from non-standard 555 to standard 755
8dc7a2
- move /usr/bin/python*-config to the -devel subpackage
8dc7a2
- mark various directories as being documentation
8dc7a2
8dc7a2
* Thu Sep 24 2009 Andrew McNabb <amcnabb@mcnabbs.org> 3.1.1-1
8dc7a2
- Initial package for Python 3.
8dc7a2