Blame SPECS/python.spec

c8504f
# ======================================================
c8504f
# Conditionals and other variables controlling the build
c8504f
# ======================================================
c8504f
%{!?scl:%global pkg_name %{name}}
c8504f
%{?scl:%scl_package python}
c8504f
# Turn off default SCL bytecompiling.
c8504f
%{?scl:%global _turn_off_bytecompile 1}
c8504f
c8504f
%global pybasever 3.3
c8504f
c8504f
# pybasever without the dot:
c8504f
%global pyshortver 33
c8504f
c8504f
%global pylibdir %{_libdir}/python%{pybasever}
c8504f
%global dynload_dir %{pylibdir}/lib-dynload
c8504f
c8504f
# SOABI is defined in the upstream configure.in from Python-3.2a2 onwards,
c8504f
# for PEP 3149:
c8504f
#   http://www.python.org/dev/peps/pep-3149/
c8504f
c8504f
# ("configure.in" became "configure.ac" in Python 3.3 onwards, and in
c8504f
# backports)
c8504f
c8504f
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
c8504f
# With Python 3.3, we lose the "u" suffix due to PEP 393
c8504f
%global ABIFLAGS_optimized m
c8504f
%global ABIFLAGS_debug     dm
c8504f
c8504f
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
c8504f
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
c8504f
c8504f
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}
c8504f
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}
c8504f
c8504f
# All bytecode files are now in a __pycache__ subdirectory, with a name
c8504f
# reflecting the version of the bytecode (to permit sharing of python libraries
c8504f
# between different runtimes)
c8504f
# See http://www.python.org/dev/peps/pep-3147/
c8504f
# For example,
c8504f
#   foo/bar.py
c8504f
# now has bytecode at:
c8504f
#   foo/__pycache__/bar.cpython-33.pyc
c8504f
#   foo/__pycache__/bar.cpython-33.pyo
c8504f
%global bytecode_suffixes .cpython-33.py?
c8504f
c8504f
# Python's configure script defines SOVERSION, and this is used in the Makefile
c8504f
# to determine INSTSONAME, the name of the libpython DSO:
c8504f
#   LDLIBRARY='libpython$(VERSION).so'
c8504f
#   INSTSONAME="$LDLIBRARY".$SOVERSION
c8504f
# We mirror this here in order to make it easier to add the -gdb.py hooks.
c8504f
# (if these get out of sync, the payload of the libs subpackage will fail
c8504f
# and halt the build)
c8504f
%global py_SOVERSION 1.0
c8504f
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
c8504f
%global py_INSTSONAME_debug     libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
c8504f
c8504f
%global with_debug_build 1
c8504f
c8504f
%global with_gdb_hooks 1
c8504f
c8504f
%global with_systemtap 1
c8504f
c8504f
# some arches don't have valgrind so we need to disable its support on them
c8504f
%ifarch %{ix86} x86_64 ppc ppc64 s390x
c8504f
%global with_valgrind 1
c8504f
%else
c8504f
%global with_valgrind 0
c8504f
%endif
c8504f
c8504f
%global with_gdbm 1
c8504f
c8504f
# Change from yes to no to turn this off
c8504f
%global with_computed_gotos yes
c8504f
c8504f
# Turn this to 0 to turn off the "check" phase:
c8504f
%global run_selftest_suite 1
c8504f
c8504f
# We want to byte-compile the .py files within the packages using the new
c8504f
# python3 binary.
c8504f
# 
c8504f
# Unfortunately, rpmbuild's infrastructure requires us to jump through some
c8504f
# hoops to avoid byte-compiling with the system python 2 version:
c8504f
#   /usr/lib/rpm/redhat/macros sets up build policy that (amongst other things)
c8504f
# defines __os_install_post.  In particular, "brp-python-bytecompile" is
c8504f
# invoked without an argument thus using the wrong version of python
c8504f
# (/usr/bin/python, rather than the freshly built python), thus leading to
c8504f
# numerous syntax errors, and incorrect magic numbers in the .pyc files.  We
c8504f
# thus override __os_install_post to avoid invoking this script:
c8504f
%global __os_install_post /usr/lib/rpm/brp-%{?scl:scl-}compress %{?_scl_root} \
c8504f
  %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
c8504f
  /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
c8504f
  /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
c8504f
  /usr/lib/rpm/redhat/brp-python-hardlink
c8504f
c8504f
# to remove the invocation of brp-python-bytecompile, whilst keeping the
c8504f
# invocation of brp-python-hardlink (since this should still work for python3
c8504f
# pyc/pyo files)
c8504f
c8504f
c8504f
# We need to get a newer configure generated out of configure.in for the following
c8504f
# patches:
c8504f
#   patch 55 (systemtap)
c8504f
#   patch 113 (more config flags)
c8504f
#
c8504f
# For patch 55 (systemtap), we need to get a new header for configure to use
c8504f
#
c8504f
# configure.in requires autoconf-2.65, but the version in Fedora is currently
c8504f
# autoconf-2.66
c8504f
#
c8504f
# For now, we'll generate a patch to the generated configure script and
c8504f
# pyconfig.h.in on a machine that has a local copy of autoconf 2.65
c8504f
#
c8504f
# Instructions on obtaining such a copy can be seen at
c8504f
#   http://bugs.python.org/issue7997
c8504f
#
c8504f
# To make it easy to regenerate the patch, this specfile can be run in two
c8504f
# ways:
c8504f
# (i) regenerate_autotooling_patch  0 : the normal approach: prep the
c8504f
# source tree using a pre-generated patch to the "configure" script, and do a
c8504f
# full build
c8504f
# (ii) regenerate_autotooling_patch 1 : intended to be run on a developer's
c8504f
# workstation: prep the source tree without patching configure, then rerun a
c8504f
# local copy of autoconf-2.65, regenerate the patch, then exit, without doing
c8504f
# the rest of the build
c8504f
%global regenerate_autotooling_patch 0
c8504f
c8504f
c8504f
# ==================
c8504f
# Top-level metadata
c8504f
# ==================
c8504f
Summary: Version 3 of the Python programming language aka Python 3000
c8504f
Name: %{?scl_prefix}python
c8504f
Version: %{pybasever}.2
7ea961
Release: 16%{?dist}
c8504f
License: Python
c8504f
Group: Development/Languages
c8504f
c8504f
c8504f
# =======================
c8504f
# Build-time requirements
c8504f
# =======================
c8504f
c8504f
# (keep this list alphabetized)
c8504f
c8504f
%{?scl:BuildRequires: %{scl}-runtime}
c8504f
BuildRequires: autoconf
c8504f
BuildRequires: bluez-libs-devel
c8504f
BuildRequires: bzip2
c8504f
BuildRequires: bzip2-devel
c8504f
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
c8504f
# it (in pyexpat) in order to enable the fix in Python-3.2.3 for CVE-2012-0876:
c8504f
# SCL: rhel has older but fixed version, no need to depend on 2.1.0
c8504f
BuildRequires: expat-devel
c8504f
BuildRequires: findutils
c8504f
BuildRequires: gcc-c++
c8504f
%if %{with_gdbm}
c8504f
BuildRequires: gdbm-devel
c8504f
%endif
c8504f
BuildRequires: glibc-devel
c8504f
BuildRequires: gmp-devel
c8504f
BuildRequires: libdb-devel
c8504f
BuildRequires: libffi-devel
c8504f
BuildRequires: libGL-devel
c8504f
BuildRequires: libX11-devel
c8504f
BuildRequires: ncurses-devel
c8504f
BuildRequires: openssl-devel
c8504f
BuildRequires: pkgconfig
c8504f
BuildRequires: readline-devel
c8504f
BuildRequires: sqlite-devel
c8504f
c8504f
%if 0%{?with_systemtap}
c8504f
BuildRequires: systemtap-sdt-devel
c8504f
# (this introduces a dependency on "python", in that systemtap-sdt-devel's
c8504f
# /usr/bin/dtrace is a python 2 script)
c8504f
%global tapsetdir      %{_datadir}/systemtap/tapset
c8504f
%endif # with_systemtap
c8504f
c8504f
BuildRequires: tar
c8504f
BuildRequires: tcl-devel
c8504f
BuildRequires: tix-devel
c8504f
BuildRequires: tk-devel
c8504f
c8504f
%if 0%{?with_valgrind}
c8504f
BuildRequires: valgrind-devel
c8504f
%endif
c8504f
c8504f
BuildRequires: xz-devel
c8504f
BuildRequires: zlib-devel
c8504f
c8504f
c8504f
# =======================
c8504f
# Source code and patches
c8504f
# =======================
c8504f
c8504f
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
c8504f
c8504f
# Supply various useful macros for building python 3 modules:
c8504f
#  __python3, python3_sitelib, python3_sitearch
c8504f
Source2: macros.python3
c8504f
c8504f
# Supply an RPM macro "py_byte_compile" for the python3-devel subpackage
c8504f
# to enable specfiles to selectively byte-compile individual files and paths
c8504f
# with different Python runtimes as necessary:
c8504f
Source3: macros.pybytecompile
c8504f
c8504f
# Systemtap tapset to make it easier to use the systemtap static probes
c8504f
# (actually a template; LIBRARY_PATH will get fixed up during install)
c8504f
# Written by dmalcolm; not yet sent upstream
c8504f
Source5: libpython.stp
c8504f
c8504f
# Example systemtap script using the tapset
c8504f
# Written by wcohen, mjw, dmalcolm; not yet sent upstream
c8504f
Source6: systemtap-example.stp
c8504f
c8504f
# Another example systemtap script that uses the tapset
c8504f
# Written by dmalcolm; not yet sent upstream
c8504f
Source7: pyfuntop.stp
c8504f
c8504f
# SCL-custom version of pythondeps.sh
c8504f
# Append 33 to not collide with python27 SCL
c8504f
Source8: pythondeps-scl-33.sh
c8504f
c8504f
# Append 33 for the same reason here
c8504f
Source9: brp-python-bytecompile-with-scl-python-33
c8504f
c8504f
c8504f
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
c8504f
# Was Patch0 in ivazquez' python3000 specfile:
c8504f
Patch1:         Python-3.1.1-rpath.patch
c8504f
c8504f
# Some tests were removed due to audiotest.au not being packaged. This was
c8504f
# however added to the archive in 3.3.1, so we no longer delete the tests.
c8504f
#  Patch3: 00003-remove-mimeaudio-tests.patch
c8504f
c8504f
# 00055 #
c8504f
# Systemtap support: add statically-defined probe points
c8504f
# Patch sent upstream as http://bugs.python.org/issue14776
c8504f
# with some subsequent reworking to cope with LANG=C in an rpmbuild
c8504f
# (where sys.getfilesystemencoding() == 'ascii')
c8504f
Patch55: 00055-systemtap.patch
c8504f
c8504f
Patch102: python-3.3.0b1-lib64.patch
c8504f
c8504f
# 00104 #
c8504f
# Only used when "%{_lib}" == "lib64"
c8504f
# Another lib64 fix, for distutils/tests/test_install.py; not upstream:
c8504f
Patch104: 00104-lib64-fix-for-test_install.patch
c8504f
c8504f
# 00111 #
c8504f
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
c8504f
# a libpythonMAJOR.MINOR.a (bug 550692):
c8504f
# Downstream only: not appropriate for upstream
c8504f
Patch111: 00111-no-static-lib.patch
c8504f
c8504f
# 00112 #
c8504f
# Patch112: python-2.7rc1-debug-build.patch: this is not relevant to Python 3,
c8504f
# for 3.2 onwards
c8504f
c8504f
# 00113 #
c8504f
# Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options
c8504f
# described at http://svn.python.org/projects/python/trunk/Misc/SpecialBuilds.txt
c8504f
# so that if they are enabled, they will be in that build's pyconfig.h, so that
c8504f
# extension modules will reliably use them
c8504f
# Not yet sent upstream
c8504f
Patch113: 00113-more-configuration-flags.patch
c8504f
c8504f
# 00114 #
c8504f
# Add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
c8504f
# (rhbz:553020); partially upstream as http://bugs.python.org/issue7647
c8504f
# Not yet sent upstream
c8504f
Patch114: 00114-statvfs-f_flag-constants.patch
c8504f
c8504f
# 00125 #
c8504f
# COUNT_ALLOCS is useful for debugging, but the upstream behaviour of always
c8504f
# emitting debug info to stdout on exit is too verbose and makes it harder to
c8504f
# use the debug build.  Add a "PYTHONDUMPCOUNTS" environment variable which
c8504f
# must be set to enable the output on exit
c8504f
# Not yet sent upstream
c8504f
Patch125: 00125-less-verbose-COUNT_ALLOCS.patch
c8504f
c8504f
# In my koji builds, /root/bin is in the PATH for some reason
c8504f
# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error"
c8504f
# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising
c8504f
#  OSError: [Errno 13] Permission denied
c8504f
# when it tries to read /root/bin, rather than raising "No such file"
c8504f
#
c8504f
# Work around this by specifying an absolute path for the non-existant
c8504f
# executable
c8504f
# Not yet sent upstream
c8504f
Patch129: python-3.2.1-fix-test-subprocess-with-nonreadable-path-dir.patch
c8504f
c8504f
# 00130 #
c8504f
# Python 2's:
c8504f
#   Patch130: python-2.7.2-add-extension-suffix-to-python-config.patch
c8504f
# is not relevant to Python 3 (for 3.2 onwards)
c8504f
c8504f
# 00131 #
c8504f
# The four tests in test_io built on top of check_interrupted_write_retry
c8504f
# fail when built in Koji, for ppc and ppc64; for some reason, the SIGALRM
c8504f
# handlers are never called, and the call to write runs to completion
c8504f
# (rhbz#732998)
c8504f
Patch131: 00131-disable-tests-in-test_io.patch
c8504f
c8504f
# 00132 #
c8504f
# Add non-standard hooks to unittest for use in the "check" phase below, when
c8504f
# running selftests within the build:
c8504f
#   @unittest._skipInRpmBuild(reason)
c8504f
# for tests that hang or fail intermittently within the build environment, and:
c8504f
#   @unittest._expectedFailureInRpmBuild
c8504f
# for tests that always fail within the build environment
c8504f
#
c8504f
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the
c8504f
# environment, which we set manually in the appropriate portion of the "check"
c8504f
# phase below (and which potentially other python-* rpms could set, to reuse
c8504f
# these unittest hooks in their own "check" phases)
c8504f
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
c8504f
c8504f
# 00133 #
c8504f
# 00133-skip-test_dl.patch is not relevant for python3: the "dl" module no
c8504f
# longer exists
c8504f
c8504f
# 00134 #
c8504f
# Fix a failure in test_sys.py when configured with COUNT_ALLOCS enabled
c8504f
# Not yet sent upstream
c8504f
Patch134: 00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch
c8504f
c8504f
# 00135 #
c8504f
# test_weakref's test_callback_in_cycle_resurrection doesn't work with
c8504f
# COUNT_ALLOCS, as the metrics keep "C" alive.  Work around this for our
c8504f
# debug build:
c8504f
# Not yet sent upstream
c8504f
Patch135: 00135-fix-test-within-test_weakref-in-debug-build.patch
c8504f
c8504f
# 00136 #
c8504f
# Patch136: 00136-skip-tests-of-seeking-stdin-in-rpmbuild.patch does not seem
c8504f
# to be needed by python3
c8504f
c8504f
# 00137 #
c8504f
# Some tests within distutils fail when run in an rpmbuild:
c8504f
Patch137: 00137-skip-distutils-tests-that-fail-in-rpmbuild.patch
c8504f
c8504f
# 00138 #
c8504f
# Patch138: 00138-fix-distutils-tests-in-debug-build.patch is not relevant for
c8504f
# python3
c8504f
c8504f
# 00139 #
c8504f
# ARM-specific: skip known failure in test_float:
c8504f
#  http://bugs.python.org/issue8265 (rhbz#706253)
c8504f
Patch139: 00139-skip-test_float-known-failure-on-arm.patch
c8504f
c8504f
# 00140 #
c8504f
# Patch140: 00140-skip-test_ctypes-known-failure-on-sparc.patch does not appear
c8504f
# to be relevant for python3
c8504f
c8504f
# 00141 #
c8504f
# Fix test_gc's test_newinstance case when configured with COUNT_ALLOCS:
c8504f
# Not yet sent upstream
c8504f
Patch141: 00141-fix-test_gc_with_COUNT_ALLOCS.patch
c8504f
c8504f
# 00142 #
c8504f
# Some pty tests fail when run in mock (rhbz#714627):
c8504f
Patch142: 00142-skip-failing-pty-tests-in-rpmbuild.patch
c8504f
c8504f
# 00143 #
c8504f
# Fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid
c8504f
# aliasing violations (rhbz#698726)
c8504f
# Sent upstream as http://bugs.python.org/issue12872
c8504f
Patch143: 00143-tsc-on-ppc.patch
c8504f
c8504f
# 00144 #
c8504f
# (Optionally) disable the gdbm module:
c8504f
# python.spec's
c8504f
#   Patch144: 00144-no-gdbm.patch
c8504f
# is not needed in python3.spec
c8504f
c8504f
# 00145 #
c8504f
# python.spec's
c8504f
#   Patch145: 00145-force-sys-platform-to-be-linux2.patch
c8504f
# is upstream for Python 3 as of 3.2.2
c8504f
c8504f
# 00146 #
c8504f
# Support OpenSSL FIPS mode (e.g. when OPENSSL_FORCE_FIPS_MODE=1 is set)
c8504f
# - handle failures from OpenSSL (e.g. on attempts to use MD5 in a
c8504f
#   FIPS-enforcing environment)
c8504f
# - add a new "usedforsecurity" keyword argument to the various digest
c8504f
#   algorithms in hashlib so that you can whitelist a callsite with
c8504f
#   "usedforsecurity=False"
c8504f
# (sent upstream for python 3 as http://bugs.python.org/issue9216 ; see RHEL6
c8504f
# python patch 119)
c8504f
# - enforce usage of the _hashlib implementation: don't fall back to the _md5
c8504f
#   and _sha* modules (leading to clearer error messages if fips selftests
c8504f
#   fail)
c8504f
# - don't build the _md5 and _sha* modules; rely on the _hashlib implementation
c8504f
#   of hashlib
c8504f
# (rhbz#563986)
c8504f
Patch146: 00146-hashlib-fips.patch
c8504f
c8504f
# 00147 #
c8504f
# Add a sys._debugmallocstats() function
c8504f
# Sent upstream as http://bugs.python.org/issue14785
c8504f
# Upstream as of Python 3.3.0
c8504f
#  Patch147: 00147-add-debug-malloc-stats.patch
c8504f
c8504f
# 00148 #
c8504f
# Upstream as of Python 3.2.3:
c8504f
#  Patch148: 00148-gdbm-1.9-magic-values.patch
c8504f
c8504f
# 00149 #
c8504f
# Upstream as of Python 3.2.3:
c8504f
#  Patch149: 00149-backport-issue11254-pycache-bytecompilation-fix.patch
c8504f
c8504f
# 00150 #
c8504f
# temporarily disable rAssertAlmostEqual in test_cmath on PPC (bz #750811)
c8504f
# caused by a glibc bug. This patch can be removed when we have a glibc with
c8504f
# the patch mentioned here:
c8504f
#   http://sourceware.org/bugzilla/show_bug.cgi?id=13472
c8504f
Patch150: 00150-disable-rAssertAlmostEqual-cmath-on-ppc.patch
c8504f
c8504f
# 00151 #
c8504f
# python.spec had:
c8504f
#  Patch151: 00151-fork-deadlock.patch
c8504f
c8504f
# 00152 #
c8504f
# Fix a regex in test_gdb so that it doesn't choke when gdb provides a full
c8504f
# path to Python/bltinmodule.c:
c8504f
# Committed upstream as 77824:abcd29c9a791 as part of fix for
c8504f
# http://bugs.python.org/issue12605
c8504f
#  Patch152: 00152-fix-test-gdb-regex.patch
c8504f
c8504f
# 00153 #
c8504f
# Strip out lines of the form "warning: Unable to open ..." from gdb's stderr
c8504f
# when running test_gdb.py; also cope with change to gdb in F17 onwards in
c8504f
# which values are printed as "v@entry" rather than just "v":
c8504f
# Not yet sent upstream
c8504f
Patch153: 00153-fix-test_gdb-noise.patch
c8504f
c8504f
# 00154 #
c8504f
# python3.spec on f15 has:
c8504f
#  Patch154: 00154-skip-urllib-test-requiring-working-DNS.patch
c8504f
c8504f
# 00155 #
c8504f
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
c8504f
# generating SELinux denials on "import ctypes" and "import uuid" when
c8504f
# embedding Python within httpd (rhbz#814391)
c8504f
Patch155: 00155-avoid-ctypes-thunks.patch
c8504f
c8504f
# 00156 #
c8504f
# Recent builds of gdb will only auto-load scripts from certain safe
c8504f
# locations.  Turn off this protection when running test_gdb in the selftest
c8504f
# suite to ensure that it can load our -gdb.py script (rhbz#817072):
c8504f
# Not yet sent upstream
c8504f
Patch156: 00156-gdb-autoload-safepath.patch
c8504f
c8504f
# 00157 #
c8504f
# Update uid/gid handling throughout the standard library: uid_t and gid_t are
c8504f
# unsigned 32-bit values, but existing code often passed them through C long
c8504f
# values, which are signed 32-bit values on 32-bit architectures, leading to
c8504f
# negative int objects for uid/gid values >= 2^31 on 32-bit architectures.
c8504f
#
c8504f
# Introduce _PyObject_FromUid/Gid to convert uid_t/gid_t values to python
c8504f
# objects, using int objects where the value will fit (long objects otherwise),
c8504f
# and _PyArg_ParseUid/Gid to convert int/long to uid_t/gid_t, with -1 allowed
c8504f
# as a special case (since this is given special meaning by the chown syscall)
c8504f
#
c8504f
# Update standard library to use this throughout for uid/gid values, so that
c8504f
# very large uid/gid values are round-trippable, and -1 remains usable.
c8504f
# (rhbz#697470)
c8504f
Patch157: 00157-uid-gid-overflows.patch
c8504f
c8504f
# 00158 #
c8504f
# Upstream as of Python 3.3.1
c8504f
c8504f
# 00159 #
c8504f
#  Patch159: 00159-correct-libdb-include-path.patch
c8504f
# in python.spec
c8504f
# TODO: python3 status?
c8504f
c8504f
# 00160 #
c8504f
# Python 3.3 added os.SEEK_DATA and os.SEEK_HOLE, which may be present in the
c8504f
# header files in the build chroot, but may not be supported in the running
c8504f
# kernel, hence we disable this test in an rpm build.
c8504f
# Adding these was upstream issue http://bugs.python.org/issue10142
c8504f
# Not yet sent upstream
c8504f
Patch160: 00160-disable-test_fs_holes-in-rpm-build.patch
c8504f
c8504f
# 00161 #
c8504f
# (Was only needed for Python 3.3.0b1)
c8504f
c8504f
# 00162 #
c8504f
# (Was only needed for Python 3.3.0b1)
c8504f
c8504f
# 00163 #
c8504f
# Some tests within test_socket fail intermittently when run inside Koji;
c8504f
# disable them using unittest._skipInRpmBuild
c8504f
# Not yet sent upstream
c8504f
Patch163: 00163-disable-parts-of-test_socket-in-rpm-build.patch
c8504f
c8504f
# 0164 #
c8504f
# some tests in test._io interrupted_write-* fail on PPC (rhbz#846849)
c8504f
# testChainingDescriptors  test in test_exceptions fails on PPc, too (rhbz#846849)
c8504f
# disable those tests so that rebuilds on PPC can continue
c8504f
Patch164: 00164-disable-interrupted_write-tests-on-ppc.patch
c8504f
c8504f
# 00165 #
c8504f
# python.spec has:
c8504f
#   Patch165: 00165-crypt-module-salt-backport.patch
c8504f
# which is a backport from 3.3 and thus not relevant to "python3"
c8504f
c8504f
# 00166 #
c8504f
#  Patch166: 00166-fix-fake-repr-in-gdb-hooks.patch
c8504f
# in python.spec
c8504f
# TODO: python3 status?
c8504f
c8504f
# 00167 #
c8504f
#  Patch167: 00167-disable-stack-navigation-tests-when-optimized-in-test_gdb.patch
c8504f
# in python.spec
c8504f
# TODO: python3 status?
c8504f
c8504f
# 00168 #
c8504f
#  Patch168: 00168-distutils-cflags.patch
c8504f
# in python.spec
c8504f
# TODO: python3 status?
c8504f
c8504f
# 00169 #
c8504f
#  Patch169: 00169-avoid-implicit-usage-of-md5-in-multiprocessing.patch
c8504f
# in python.spec
c8504f
# TODO: python3 status?
c8504f
c8504f
# 00170 #
c8504f
# In debug builds, try to print repr() when a C-level assert fails in the
c8504f
# garbage collector (typically indicating a reference-counting error
c8504f
# somewhere else e.g in an extension module)
c8504f
# Backported to 2.7 from a patch I sent upstream for py3k
c8504f
#   http://bugs.python.org/issue9263  (rhbz#614680)
c8504f
# hiding the proposed new macros/functions within gcmodule.c to avoid exposing
c8504f
# them within the extension API.
c8504f
# (rhbz#850013)
c8504f
Patch170: 00170-gc-assertions.patch
c8504f
c8504f
# 00171 #
c8504f
# python.spec had:
c8504f
#  Patch171: 00171-raise-correct-exception-when-dev-urandom-is-missing.patch
c8504f
# TODO: python3 status?
c8504f
c8504f
# 00172 #
c8504f
# python.spec had:
c8504f
#  Patch172: 00172-use-poll-for-multiprocessing-socket-connection.patch
c8504f
# TODO: python3 status?
c8504f
c8504f
# 00173 #
c8504f
# Workaround for ENOPROTOOPT seen in Koji withi test.support.bind_port()
c8504f
# (rhbz#913732)
c8504f
Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch
c8504f
c8504f
# 00174 #
c8504f
#  Patch174: 00174-fix-for-usr-move.patch
c8504f
# TODO: python3 status?
c8504f
c8504f
# 00175 #
c8504f
# Upstream as of Python 3.3.2
c8504f
#  Patch175: 00175-fix-configure-Wformat.patch
c8504f
c8504f
# 00176 #
c8504f
# Fixed upstream as of Python 3.3.1
c8504f
#  Patch176: 00176-upstream-issue16754-so-extension.patch
c8504f
c8504f
# 00177 #
c8504f
# Patch for potential unicode error when determining OS release names
c8504f
# http://bugs.python.org/issue17429
c8504f
# (rhbz#922149)
c8504f
# Does not affect python2 (python2 uses a byte string so it doesn't need to decode)
c8504f
Patch177: 00177-platform-unicode.patch
c8504f
c8504f
# 00178 #
c8504f
# Don't duplicate various FLAGS in sysconfig values
c8504f
# http://bugs.python.org/issue17679
c8504f
# Does not affect python2 AFAICS (different sysconfig values initialization)
c8504f
Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
c8504f
c8504f
# 00179 #
c8504f
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=951802
c8504f
# Reported upstream in http://bugs.python.org/issue17737
c8504f
# This patch basically looks at every frame and if it is somehow corrupted,
c8504f
# it just stops printing the traceback - it doesn't fix the actual bug.
c8504f
# This bug seems to only affect ARM.
c8504f
# Doesn't seem to affect Python 2 AFAICS.
c8504f
Patch179: 00179-dont-raise-error-on-gdb-corrupted-frames-in-backtrace.patch
c8504f
c8504f
# 00180 #
c8504f
# Enable building on ppc64p7
c8504f
# Not appropriate for upstream, Fedora-specific naming
c8504f
Patch180: 00180-python-add-support-for-ppc64p7.patch
c8504f
c8504f
# 00181 #
c8504f
# python.spec has
c8504f
#  Patch181: 00181-allow-arbitrary-timeout-in-condition-wait.patch
c8504f
# Does not affect python3
c8504f
c8504f
# 00182 #
c8504f
# Fixed upstream as of Python 3.3.2
c8504f
#  Patch182: 00182-fix-test_gdb-test_threads.patch
c8504f
c8504f
# 00183 #
c8504f
# Upstream fix for CVE-2013-2099 (ssl.match_hostname DOS)
c8504f
# http://bugs.python.org/issue17980
c8504f
# http://hg.python.org/cpython/rev/c627638753e2
c8504f
Patch183: 00183-cve-2013-2099-fix-ssl-match_hostname-dos.patch
c8504f
c8504f
# 00184 #
c8504f
# Fix for gettext plural form headers (lines that begin with "#")
c8504f
Patch184: 00184-gettext-plural-fix.patch
c8504f
c8504f
# 00185 #
c8504f
# Fix for CVE-2013-4238 (rhbz#996733)
c8504f
# http://bugs.python.org/issue18709
c8504f
Patch185: 00185-CVE-2013-4238-hostname-check-bypass-in-SSL-module.patch
c8504f
c8504f
# 00186 #
c8504f
# Fixes memory leak in gdbm module (rhbz#977308)
c8504f
# This was upstreamed as a part of bigger patch, but for our purposes
c8504f
# this is ok: http://bugs.python.org/issue18404
c8504f
Patch186: 00186-fix-memory-leak-in-gdbm.patch
c8504f
c8504f
# 00187 #
c8504f
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=979696
c8504f
# Fixes build of ctypes against libffi with multilib wrapper
c8504f
# Python recognizes ffi.h only if it contains "#define LIBFFI_H",
c8504f
# but the wrapper doesn't contain that, which makes the build fail
c8504f
# We patch this by also accepting "#define ffi_wrapper_h"
c8504f
Patch187: 00187-ctypes-should-build-with-libffi-multilib-wrapper.patch
c8504f
c8504f
# 00188 #
c8504f
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1023607
c8504f
# Fixes the problem of some *.py files not being bytecompiled properly
c8504f
# during build. This was result of py_compile.compile raising exception
c8504f
# when trying to convert test file with bad encoding, and thus not
c8504f
# continuing bytecompilation for other files.
c8504f
Patch188: 00188-dont-raise-from-py_compile.patch
c8504f
c8504f
# 00189 #
c8504f
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1071868
c8504f
# Fixes os.listxattr() leaking its internal buffer when the first
c8504f
# call to C listxattr() fails with ERANGE.
c8504f
Patch189: 00189-fix-leak-in-listxattr.patch
c8504f
7ea961
# 00237 #
7ea961
# CVE-2016-0772 python: smtplib StartTLS stripping attack
7ea961
#   https://bugzilla.redhat.com/show_bug.cgi?id=1303647
7ea961
#   FIXED UPSTREAM: https://hg.python.org/cpython/rev/d590114c2394
7ea961
# Raise an error when STARTTLS fails
7ea961
# Resolves: rhbz#1346359
7ea961
Patch237: 00237-CVE-2016-0772-smtplib.patch
7ea961
7ea961
# 00238 #
7ea961
# CVE-2016-5699 python: http protocol steam injection attack
7ea961
#   https://bugzilla.redhat.com/show_bug.cgi?id=1303699
7ea961
#   FIXED UPSTREAM: https://hg.python.org/cpython/rev/bf3e1c9b80e9
7ea961
# Disabled HTTP header injections in http.client
7ea961
# Resolves: rhbz#1346359
7ea961
Patch238: 00238-CVE-2016-5699-http-client.patch
7ea961
7ea961
# 00242 #
7ea961
# HTTPoxy attack (CVE-2016-1000110)
7ea961
# https://httpoxy.org/
7ea961
# FIXED UPSTREAM: http://bugs.python.org/issue27568
7ea961
# Based on a patch by Rémi Rampin
7ea961
# Resolves: rhbz#1359169
7ea961
Patch242: 00242-CVE-2016-1000110-httpoxy.patch
7ea961
c8504f
c8504f
# (New patches go here ^^^)
c8504f
#
c8504f
# When adding new patches to "python" and "python3" in Fedora 17 onwards,
c8504f
# please try to keep the patch numbers in-sync between the two specfiles:
c8504f
#
c8504f
#   - use the same patch number across both specfiles for conceptually-equivalent
c8504f
#     fixes, ideally with the same name
c8504f
#
c8504f
#   - when a patch is relevant to both specfiles, use the same introductory
c8504f
#     comment in both specfiles where possible (to improve "diff" output when
c8504f
#     comparing them)
c8504f
#
c8504f
#   - when a patch is only relevant for one of the two specfiles, leave a gap
c8504f
#     in the patch numbering in the other specfile, adding a comment when
c8504f
#     omitting a patch, both in the manifest section here, and in the "prep"
c8504f
#     phase below
c8504f
#
c8504f
# Hopefully this will make it easier to ensure that all relevant fixes are
c8504f
# applied to both versions.
c8504f
c8504f
# This is the generated patch to "configure"; see the description of
c8504f
#   %{regenerate_autotooling_patch}
c8504f
# above:
c8504f
Patch5000: 05000-autotool-intermediates.patch
c8504f
c8504f
BuildRoot: %{_tmppath}/%{name}-%{version}-root
c8504f
c8504f
# ======================================================
c8504f
# Additional metadata, and subpackages
c8504f
# ======================================================
c8504f
c8504f
URL: http://www.python.org/
c8504f
c8504f
# filter pkgconfig and python(abi) Requires/Provides
c8504f
%{?scl:%filter_from_requires s|python(abi)|%{?scl_prefix}python(abi)|g}
c8504f
%{?scl:%filter_from_provides s|pkgconfig(|%{?scl_prefix}pkgconfig(|g}
c8504f
%{?scl:%filter_from_provides s|/usr/lib.*/python||g}
c8504f
%{?scl:%filter_setup}
c8504f
c8504f
# See notes in bug 532118:
c8504f
Provides: %{?scl_prefix}python(abi) = %{pybasever}
c8504f
c8504f
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
c8504f
%{?scl:Requires: %{scl}-runtime}
c8504f
c8504f
%description
c8504f
Python 3 is a new version of the language that is incompatible with the 2.x
c8504f
line of releases. The language is mostly the same, but many details, especially
c8504f
how built-in objects like dictionaries and strings work, have changed
c8504f
considerably, and a lot of deprecated features have finally been removed.
c8504f
c8504f
%package libs
c8504f
Summary:        Python 3 runtime libraries
c8504f
Group:          Development/Libraries
c8504f
%{?scl:Requires:       %{scl}-runtime}
c8504f
#Requires:       %{name} = %{version}-%{release}
c8504f
c8504f
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
c8504f
# this symbol (in pyexpat), so we must explicitly state this dependency to
c8504f
# prevent "import pyexpat" from failing with a linker error if someone hasn't
c8504f
# yet upgraded expat:
c8504f
# SCL: rhel has older but fixed version, no need to depend on 2.1.0
c8504f
Requires: expat
c8504f
c8504f
%description libs
c8504f
This package contains files used to embed Python 3 into applications.
c8504f
c8504f
%package devel
c8504f
Summary: Libraries and header files needed for Python 3 development
c8504f
Group: Development/Libraries
c8504f
Requires: %{?scl_prefix}%{pkg_name}%{?_isa} = %{version}-%{release}
c8504f
Conflicts: %{?scl_prefix}%{pkg_name} < %{version}-%{release}
c8504f
c8504f
%description devel
c8504f
This package contains libraries and header files used to build applications 
c8504f
with and native libraries for Python 3
c8504f
c8504f
%package tools
c8504f
Summary: A collection of tools included with Python 3
c8504f
Group: Development/Tools
c8504f
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
c8504f
Requires: %{?scl_prefix}%{pkg_name}-tkinter = %{version}-%{release}
c8504f
c8504f
%description tools
c8504f
This package contains several tools included with Python 3
c8504f
c8504f
%package tkinter
c8504f
Summary: A GUI toolkit for Python 3
c8504f
Group: Development/Languages
c8504f
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
c8504f
c8504f
%description tkinter
c8504f
The Tkinter (Tk interface) program is an graphical user interface for
c8504f
the Python scripting language.
c8504f
c8504f
%package test
c8504f
Summary: The test modules from the main python 3 package
c8504f
Group: Development/Languages
c8504f
Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release}
c8504f
Requires: %{?scl_prefix}%{pkg_name}-tools = %{version}-%{release}
c8504f
c8504f
%description test
c8504f
The test modules from the main %{name} package.
c8504f
These are in a separate package to save space, as they are almost never used
c8504f
in production.
c8504f
c8504f
You might want to install the python3-test package if you're developing
c8504f
python 3 code that uses more than just unittest and/or test_support.py.
c8504f
c8504f
%if 0%{?with_debug_build}
c8504f
%package debug
c8504f
Summary: Debug version of the Python 3 runtime
c8504f
Group: Applications/System
c8504f
c8504f
# The debug build is an all-in-one package version of the regular build, and
c8504f
# shares the same .py/.pyc files and directories as the regular build.  Hence
c8504f
# we depend on all of the subpackages of the regular build:
c8504f
Requires: %{?scl_prefix}%{pkg_name}%{?_isa} = %{version}-%{release}
c8504f
Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release}
c8504f
Requires: %{?scl_prefix}%{pkg_name}-devel%{?_isa} = %{version}-%{release}
c8504f
Requires: %{?scl_prefix}%{pkg_name}-test%{?_isa} = %{version}-%{release}
c8504f
Requires: %{?scl_prefix}%{pkg_name}-tkinter%{?_isa} = %{version}-%{release}
c8504f
Requires: %{?scl_prefix}%{pkg_name}-tools%{?_isa} = %{version}-%{release}
c8504f
c8504f
%description debug
c8504f
python3-debug provides a version of the Python 3 runtime with numerous debugging
c8504f
features enabled, aimed at advanced Python users, such as developers of Python
c8504f
extension modules.
c8504f
c8504f
This version uses more memory and will be slower than the regular Python 3 build,
c8504f
but is useful for tracking down reference-counting issues, and other bugs.
c8504f
c8504f
The bytecodes are unchanged, so that .pyc files are compatible between the two
c8504f
versions of Python 3, but the debugging features mean that C/C++ extension
c8504f
modules are ABI-incompatible with those built for the standard runtime.
c8504f
c8504f
It shares installation directories with the standard Python 3 runtime, so that
c8504f
.py and .pyc files can be shared.  All compiled extension modules gain a "_d"
c8504f
suffix ("foo_d.so" rather than "foo.so") so that each Python 3 implementation
c8504f
can load its own extensions.
c8504f
%endif # with_debug_build
c8504f
c8504f
# ======================================================
c8504f
# The prep phase of the build:
c8504f
# ======================================================
c8504f
c8504f
%prep
c8504f
%setup -q -n Python-%{version}
c8504f
c8504f
%if 0%{?with_systemtap}
c8504f
# Provide an example of usage of the tapset:
c8504f
cp -a %{SOURCE6} .
c8504f
cp -a %{SOURCE7} .
c8504f
%endif # with_systemtap
c8504f
c8504f
# Ensure that we're using the system copy of various libraries, rather than
c8504f
# copies shipped by upstream in the tarball:
c8504f
#   Remove embedded copy of expat:
c8504f
rm -r Modules/expat || exit 1
c8504f
c8504f
#   Remove embedded copy of libffi:
c8504f
for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx ; do
c8504f
  rm -r Modules/_ctypes/$SUBDIR || exit 1 ;
c8504f
done
c8504f
c8504f
#   Remove embedded copy of zlib:
c8504f
rm -r Modules/zlib || exit 1
c8504f
c8504f
# Don't build upstream Python's implementation of these crypto algorithms;
c8504f
# instead rely on _hashlib and OpenSSL.
c8504f
#
c8504f
# For example, in our builds hashlib.md5 is implemented within _hashlib via
c8504f
# OpenSSL (and thus respects FIPS mode), and does not fall back to _md5
c8504f
for f in md5module.c sha1module.c sha256module.c sha512module.c; do
c8504f
    rm Modules/$f
c8504f
done
c8504f
c8504f
#
c8504f
# Apply patches:
c8504f
#
c8504f
%patch1 -p1
c8504f
# 3: upstream as of Python 3.3.1
c8504f
c8504f
%if 0%{?with_systemtap}
c8504f
%patch55 -p1 -b .systemtap
c8504f
%endif
c8504f
c8504f
%if "%{_lib}" == "lib64"
c8504f
%patch102 -p1
c8504f
%patch104 -p1
c8504f
%endif
c8504f
c8504f
c8504f
%patch111 -p1
c8504f
# 112: not for python3
c8504f
%patch113 -p1
c8504f
%patch114 -p1
c8504f
c8504f
%patch125 -p1 -b .less-verbose-COUNT_ALLOCS
c8504f
c8504f
%patch129 -p1
c8504f
c8504f
%ifarch ppc ppc64
c8504f
%patch131 -p1
c8504f
%endif
c8504f
c8504f
%patch132 -p1
c8504f
# 00133: not for python3
c8504f
%patch134 -p1
c8504f
%patch135 -p1
c8504f
# 00136: not for python3
c8504f
%patch137 -p1
c8504f
# 00138: not for python3
c8504f
%ifarch %{arm}
c8504f
%patch139 -p1
c8504f
%endif
c8504f
# 00140: not for python3
c8504f
%patch141 -p1
c8504f
%patch142 -p1
c8504f
%patch143 -p1 -b .tsc-on-ppc
c8504f
# 00144: not for python3
c8504f
# 00145: not for python3
c8504f
%patch146 -p1
c8504f
# 00147: upstream as of Python 3.3.0
c8504f
# 00148: upstream as of Python 3.2.3
c8504f
# 00149: upstream as of Python 3.2.3
c8504f
%ifarch ppc ppc64
c8504f
%patch150 -p1
c8504f
%endif
c8504f
# 00151: not for python3
c8504f
# 00152: upstream as of Python 3.3.0b2
c8504f
%patch153 -p0
c8504f
# 00154: not for this branch
c8504f
%patch155 -p1
c8504f
%patch156 -p1
c8504f
%patch157 -p1
c8504f
#00158: FIXME
c8504f
#00159: FIXME
c8504f
%patch160 -p1
c8504f
# 00161: was only needed for Python 3.3.0b1
c8504f
# 00162: was only needed for Python 3.3.0b1
c8504f
%patch163 -p1
c8504f
%ifarch ppc ppc64
c8504f
%patch164 -p1
c8504f
%endif
c8504f
#00165: TODO
c8504f
#00166: TODO
c8504f
#00167: TODO
c8504f
#00168: TODO
c8504f
#00169: TODO
c8504f
%patch170 -p0
c8504f
#00171: TODO
c8504f
#00172: TODO
c8504f
%patch173 -p1
c8504f
#00174: TODO
c8504f
# 00175: upstream as of Python 3.3.2
c8504f
# 00176: upstream as of Python 3.3.1
c8504f
%patch177 -p1
c8504f
%patch178 -p1
c8504f
%patch179 -p1
c8504f
%patch180 -p1
c8504f
# 00181: not for python3
c8504f
# 00182: upstream as of Python 3.3.2
c8504f
%patch183 -p1
c8504f
%patch184 -p1
c8504f
%patch185 -p1
c8504f
%patch186 -p0
c8504f
%patch187 -p1
c8504f
%patch188 -p1
c8504f
%patch189 -p1
7ea961
%patch237 -p1
7ea961
%patch238 -p1
7ea961
%patch242 -p1
c8504f
c8504f
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
c8504f
# are many differences between 2.6 and the Python 3 library.
c8504f
#
c8504f
# Fix up the URLs within pydoc to point at the documentation for this
c8504f
# MAJOR.MINOR version:
c8504f
#
c8504f
sed --in-place \
c8504f
    --expression="s|http://docs.python.org/library|http://docs.python.org/%{pybasever}/library|g" \
c8504f
    Lib/pydoc.py || exit 1
c8504f
c8504f
%if ! 0%{regenerate_autotooling_patch}
c8504f
# Normally we apply the patch to "configure"
c8504f
# We don't apply the patch if we're working towards regenerating it
c8504f
%patch5000 -p0 -b .autotool-intermediates
c8504f
%endif
c8504f
c8504f
c8504f
# ======================================================
c8504f
# Configuring and building the code:
c8504f
# ======================================================
c8504f
c8504f
%build
c8504f
export topdir=$(pwd)
c8504f
export CFLAGS="-I%{_includedir}$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
c8504f
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
c8504f
export CPPFLAGS="-I%{_includedir}`pkg-config --cflags-only-I libffi`"
c8504f
export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
c8504f
export LINKCC="gcc"
c8504f
export CFLAGS="$CFLAGS `pkg-config --cflags openssl`"
c8504f
export LDFLAGS="-L%{_libdir} $RPM_LD_FLAGS `pkg-config --libs-only-L openssl`"
c8504f
c8504f
%if 0%{regenerate_autotooling_patch}
c8504f
# If enabled, this code regenerates the patch to "configure", using a
c8504f
# local copy of autoconf-2.65, then exits the build
c8504f
#
c8504f
# The following assumes that the copy is installed to ~/autoconf-2.65/bin
c8504f
# as per these instructions:
c8504f
#   http://bugs.python.org/issue7997
c8504f
c8504f
for f in pyconfig.h.in configure ; do
c8504f
    cp $f $f.autotool-intermediates ;
c8504f
done
c8504f
c8504f
# Rerun the autotools:
c8504f
PATH=~/autoconf-2.65/bin:$PATH autoreconf
c8504f
c8504f
# Regenerate the patch:
c8504f
gendiff . .autotool-intermediates > %{PATCH5000}
c8504f
c8504f
c8504f
# Exit the build
c8504f
exit 1
c8504f
%endif
c8504f
c8504f
# Define a function, for how to perform a "build" of python for a given
c8504f
# configuration:
c8504f
BuildPython() {
c8504f
  ConfName=$1	      
c8504f
  BinaryName=$2
c8504f
  SymlinkName=$3
c8504f
  ExtraConfigArgs=$4
c8504f
  PathFixWithThisBinary=$5
c8504f
  MoreCFlags=$6
c8504f
c8504f
  ConfDir=build/$ConfName
c8504f
c8504f
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName
c8504f
  mkdir -p $ConfDir
c8504f
c8504f
  pushd $ConfDir
c8504f
c8504f
  # Use the freshly created "configure" script, but in the directory two above:
c8504f
  %global _configure $topdir/configure
c8504f
c8504f
%configure \
c8504f
  --enable-ipv6 \
c8504f
  --enable-shared \
c8504f
  --with-computed-gotos=%{with_computed_gotos} \
c8504f
  --with-dbmliborder=gdbm:ndbm:bdb \
c8504f
  --with-system-expat \
c8504f
  --with-system-ffi \
c8504f
%if 0%{?with_systemtap}
c8504f
  --with-systemtap \
c8504f
%endif
c8504f
%if 0%{?with_valgrind}
c8504f
  --with-valgrind \
c8504f
%endif
c8504f
  $ExtraConfigArgs \
c8504f
  %{nil}
c8504f
c8504f
  # Set EXTRA_CFLAGS to our CFLAGS (rather than overriding OPT, as we've done
c8504f
  # in the past).
c8504f
  # This should fix a problem with --with-valgrind where it adds
c8504f
  #   -DDYNAMIC_ANNOTATIONS_ENABLED=1
c8504f
  # to OPT which must be passed to all compilation units in the build,
c8504f
  # otherwise leading to linker errors, e.g.
c8504f
  #    missing symbol AnnotateRWLockDestroy
c8504f
  #
c8504f
  # Invoke the build:
c8504f
  make EXTRA_CFLAGS="$CFLAGS $MoreCFlags" %{?_smp_mflags}
c8504f
c8504f
  popd
c8504f
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir
c8504f
}
c8504f
export -f BuildPython
c8504f
c8504f
# Use "BuildPython" to support building with different configurations:
c8504f
c8504f
%{?scl:scl enable %scl - << \EOF}
c8504f
%if 0%{?with_debug_build}
c8504f
BuildPython debug \
c8504f
  python-debug \
c8504f
  python%{pybasever}-debug \
c8504f
%ifarch %{ix86} x86_64 ppc ppc64
c8504f
  "--with-pydebug --with-tsc --with-count-allocs --with-call-profile" \
c8504f
%else
c8504f
  "--with-pydebug --with-count-allocs --with-call-profile" \
c8504f
%endif
c8504f
  false \
c8504f
  -O1
c8504f
%endif # with_debug_build
c8504f
c8504f
BuildPython optimized \
c8504f
  python \
c8504f
  python%{pybasever} \
c8504f
  "" \
c8504f
  true
c8504f
%{?scl:EOF}
c8504f
c8504f
# ======================================================
c8504f
# Installing the built code:
c8504f
# ======================================================
c8504f
c8504f
%install
c8504f
topdir=$(pwd)
c8504f
rm -fr %{buildroot}
c8504f
mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir}
c8504f
c8504f
# install SCL custom RPM scripts
c8504f
%{?scl:mkdir -p %{buildroot}%{_root_prefix}/lib/rpm/redhat}
c8504f
%{?scl:cp -a %{SOURCE8} %{buildroot}%{_root_prefix}/lib/rpm}
c8504f
%{?scl:cp -a %{SOURCE9} %{buildroot}%{_root_prefix}/lib/rpm/redhat}
c8504f
c8504f
InstallPython() {
c8504f
c8504f
  ConfName=$1	      
c8504f
  PyInstSoName=$2
c8504f
  MoreCFlags=$3
c8504f
c8504f
  ConfDir=build/$ConfName
c8504f
c8504f
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
c8504f
  mkdir -p $ConfDir
c8504f
c8504f
  pushd $ConfDir
c8504f
c8504f
make install DESTDIR=%{buildroot} INSTALL="install -p" EXTRA_CFLAGS="$MoreCFlags"
c8504f
c8504f
  popd
c8504f
c8504f
  # We install a collection of hooks for gdb that make it easier to debug
c8504f
  # executables linked against libpython3* (such as /usr/bin/python3 itself)
c8504f
  #
c8504f
  # These hooks are implemented in Python itself (though they are for the version
c8504f
  # of python that gdb is linked with, in this case Python 2.7)
c8504f
  #
c8504f
  # gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
c8504f
  # We put them in the debuginfo package by installing them to e.g.:
c8504f
  #  /usr/lib/debug/usr/lib/libpython3.2.so.1.0.debug-gdb.py
c8504f
  #
c8504f
  # See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
c8504f
  # information
c8504f
  #
c8504f
  # Copy up the gdb hooks into place; the python file will be autoloaded by gdb
c8504f
  # when visiting libpython.so, provided that the python file is installed to the
c8504f
  # same path as the library (or its .debug file) plus a "-gdb.py" suffix, e.g:
c8504f
  #  /usr/lib/debug/usr/lib64/libpython3.2.so.1.0.debug-gdb.py
c8504f
  # (note that the debug path is /usr/lib/debug for both 32/64 bit)
c8504f
  #
c8504f
  # Initially I tried:
c8504f
  #  /usr/lib/libpython3.1.so.1.0-gdb.py
c8504f
  # but doing so generated noise when ldconfig was rerun (rhbz:562980)
c8504f
  #
c8504f
%if 0%{?with_gdb_hooks}
c8504f
  DirHoldingGdbPy=%{?scl:%_root_prefix}%{!?scl:%_prefix}/lib/debug/%{_libdir}
c8504f
  PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
c8504f
c8504f
  mkdir -p %{buildroot}$DirHoldingGdbPy
c8504f
  cp Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
c8504f
%endif # with_gdb_hooks
c8504f
c8504f
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
c8504f
}
c8504f
c8504f
# Use "InstallPython" to support building with different configurations:
c8504f
c8504f
# Install the "debug" build first, so that we can move some files aside
c8504f
%if 0%{?with_debug_build}
c8504f
InstallPython debug \
c8504f
  %{py_INSTSONAME_debug} \
c8504f
  -O1
c8504f
%endif # with_debug_build
c8504f
c8504f
# Now the optimized build:
c8504f
InstallPython optimized \
c8504f
  %{py_INSTSONAME_optimized}
c8504f
c8504f
install -d -m 0755 ${RPM_BUILD_ROOT}%{pylibdir}/site-packages/__pycache__
c8504f
c8504f
ln -s %{_bindir}/2to3 ${RPM_BUILD_ROOT}%{_bindir}/python3-2to3
c8504f
c8504f
# Development tools
c8504f
install -m755 -d ${RPM_BUILD_ROOT}%{pylibdir}/Tools
c8504f
install Tools/README ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
c8504f
cp -ar Tools/freeze ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
c8504f
cp -ar Tools/i18n ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
c8504f
cp -ar Tools/pynche ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
c8504f
cp -ar Tools/scripts ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
c8504f
c8504f
# Documentation tools
c8504f
install -m755 -d %{buildroot}%{pylibdir}/Doc
c8504f
cp -ar Doc/tools %{buildroot}%{pylibdir}/Doc/
c8504f
c8504f
# Demo scripts
c8504f
cp -ar Tools/demo %{buildroot}%{pylibdir}/Tools/
c8504f
c8504f
# Fix for bug #136654
c8504f
rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au
c8504f
c8504f
%if "%{_lib}" == "lib64"
c8504f
install -d -m 0755 %{buildroot}%{_prefix}/lib/python%{pybasever}/site-packages/__pycache__
c8504f
%endif
c8504f
c8504f
# Make python3-devel multilib-ready (bug #192747, #139911)
c8504f
%global _pyconfig32_h pyconfig-32.h
c8504f
%global _pyconfig64_h pyconfig-64.h
c8504f
c8504f
%ifarch ppc64 s390x x86_64 ia64 alpha sparc64
c8504f
%global _pyconfig_h %{_pyconfig64_h}
c8504f
%else
c8504f
%global _pyconfig_h %{_pyconfig32_h}
c8504f
%endif
c8504f
c8504f
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
c8504f
%global ABIFLAGS_optimized m
c8504f
%global ABIFLAGS_debug     dm
c8504f
c8504f
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
c8504f
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
c8504f
c8504f
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}
c8504f
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}
c8504f
c8504f
%if 0%{?with_debug_build}
c8504f
%global PyIncludeDirs python%{LDVERSION_optimized} python%{LDVERSION_debug}
c8504f
c8504f
%else
c8504f
%global PyIncludeDirs python%{LDVERSION_optimized}
c8504f
%endif
c8504f
c8504f
for PyIncludeDir in %{PyIncludeDirs} ; do
c8504f
  mv %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h \
c8504f
     %{buildroot}%{_includedir}/$PyIncludeDir/%{_pyconfig_h}
c8504f
  cat > %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h << EOF
c8504f
#include <bits/wordsize.h>
c8504f
c8504f
#if __WORDSIZE == 32
c8504f
#include "%{_pyconfig32_h}"
c8504f
#elif __WORDSIZE == 64
c8504f
#include "%{_pyconfig64_h}"
c8504f
#else
c8504f
#error "Unknown word size"
c8504f
#endif
c8504f
EOF
c8504f
done
c8504f
c8504f
# Fix for bug 201434: make sure distutils looks at the right pyconfig.h file
c8504f
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
c8504f
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
c8504f
# when python starts up (bug 653058)
c8504f
#
c8504f
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
c8504f
# variants:
c8504f
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
c8504f
  %{buildroot}%{pylibdir}/distutils/sysconfig.py \
c8504f
  %{buildroot}%{pylibdir}/sysconfig.py
c8504f
c8504f
# Switch all shebangs to refer to the specific Python version.
c8504f
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
c8504f
  Tools/scripts/pathfix.py \
c8504f
  -i "%{_bindir}/python%{pybasever}" \
c8504f
  %{buildroot}
c8504f
c8504f
# Remove shebang lines from .py files that aren't executable, and
c8504f
# remove executability from .py files that don't have a shebang line:
c8504f
find %{buildroot} -name \*.py \
c8504f
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
c8504f
  -print -exec sed -i '1d' {} \; \) -o \( \
c8504f
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
c8504f
  -exec chmod a-x {} \; \) \)
c8504f
c8504f
# .xpm and .xbm files should not be executable:
c8504f
find %{buildroot} \
c8504f
  \( -name \*.xbm -o -name \*.xpm -o -name \*.xpm.1 \) \
c8504f
  -exec chmod a-x {} \;
c8504f
c8504f
# Remove executable flag from files that shouldn't have it:
c8504f
chmod a-x \
c8504f
  %{buildroot}%{pylibdir}/distutils/tests/Setup.sample \
c8504f
  %{buildroot}%{pylibdir}/Tools/README
c8504f
c8504f
# Get rid of DOS batch files:
c8504f
find %{buildroot} -name \*.bat -exec rm {} \;
c8504f
c8504f
# Get rid of backup files:
c8504f
find %{buildroot}/ -name "*~" -exec rm -f {} \;
c8504f
find . -name "*~" -exec rm -f {} \;
c8504f
rm -f %{buildroot}%{pylibdir}/LICENSE.txt
c8504f
# Junk, no point in putting in -test sub-pkg
c8504f
rm -f ${RPM_BUILD_ROOT}/%{pylibdir}/idlelib/testcode.py*
c8504f
c8504f
# Get rid of stray patch file from buildroot:
c8504f
rm -f %{buildroot}%{pylibdir}/test/test_imp.py.apply-our-changes-to-expected-shebang # from patch 4
c8504f
c8504f
# Fix end-of-line encodings:
c8504f
find %{buildroot}/ -name \*.py -exec sed -i 's/\r//' {} \;
c8504f
c8504f
# Fix an encoding:
c8504f
iconv -f iso8859-1 -t utf-8 %{buildroot}/%{pylibdir}/Demo/rpc/README > README.conv && mv -f README.conv %{buildroot}/%{pylibdir}/Demo/rpc/README
c8504f
c8504f
# Note that 
c8504f
#  %{pylibdir}/Demo/distutils/test2to3/setup.py
c8504f
# is in iso-8859-1 encoding, and that this is deliberate; this is test data
c8504f
# for the 2to3 tool, and one of the functions of the 2to3 tool is to fixup
c8504f
# character encodings within python source code
c8504f
c8504f
# Do bytecompilation with the newly installed interpreter.
c8504f
# This is similar to the script in macros.pybytecompile
c8504f
# compile *.pyo
c8504f
find %{buildroot} -type f -a -name "*.py" -print0 | \
c8504f
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
c8504f
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}/%{_libdir}python%{pybasever}/site-packages" \
c8504f
    xargs -0 %{buildroot}%{_bindir}/python%{pybasever} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2]) for f in sys.argv[1:]]' || :
c8504f
# compile *.pyc
c8504f
find %{buildroot} -type f -a -name "*.py" -print0 | \
c8504f
    LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \
c8504f
    PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}/%{_libdir}python%{pybasever}/site-packages" \
c8504f
    xargs -0 %{buildroot}%{_bindir}/python%{pybasever} -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("%{buildroot}")[2], optimize=0) for f in sys.argv[1:]]' || :
c8504f
c8504f
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
c8504f
find %{buildroot} \
c8504f
    -perm 555 -exec chmod 755 {} \;
c8504f
c8504f
# Install macros for rpm:
c8504f
mkdir -p %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
c8504f
install -m 644 %{SOURCE2} %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
c8504f
install -m 644 %{SOURCE3} %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm
c8504f
# Optionally rename macro files by appending scl name
c8504f
pushd %{buildroot}/%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}
c8504f
find -type f -name 'macros.py*' -exec mv {} {}%{?scl:.%{scl}} \;
c8504f
popd
c8504f
%{?scl:sed -i 's|^\(%@scl@__python3\)|\1 %{_bindir}/python3|' %{buildroot}%{_root_sysconfdir}/rpm/macros.python3.%{scl}}
c8504f
%{?scl:sed -i 's|@scl@|%{scl}|g' %{buildroot}%{_root_sysconfdir}/rpm/macros.python3.%{scl}}
c8504f
c8504f
# Ensure that the curses module was linked against libncursesw.so, rather than
c8504f
# libncurses.so (bug 539917)
c8504f
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
c8504f
    | grep curses \
c8504f
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
c8504f
c8504f
# Ensure that the debug modules are linked against the debug libpython, and
c8504f
# likewise for the optimized modules and libpython:
c8504f
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
c8504f
    case $Module in
c8504f
    *.%{SOABI_debug})
c8504f
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
c8504f
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
c8504f
            
c8504f
        ;;
c8504f
    *.%{SOABI_optimized})
c8504f
        ldd $Module | grep %{py_INSTSONAME_debug} &&
c8504f
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1)
c8504f
        ;;
c8504f
    esac
c8504f
done
c8504f
c8504f
# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
c8504f
# avoid the user having to know the precise version and ABI flags.  (see
c8504f
# e.g. rhbz#676748):
c8504f
%if 0%{?with_debug_build}
c8504f
ln -s \
c8504f
  %{_bindir}/python%{LDVERSION_debug} \
c8504f
  %{buildroot}%{_bindir}/python3-debug
c8504f
%endif
c8504f
c8504f
#
c8504f
# Systemtap hooks:
c8504f
#
c8504f
%if 0%{?with_systemtap}
c8504f
# Install a tapset for this libpython into tapsetdir, fixing up the path to the
c8504f
# library:
c8504f
mkdir -p %{buildroot}%{tapsetdir}
c8504f
%ifarch ppc64 s390x x86_64 ia64 alpha sparc64
c8504f
%global libpython_stp_optimized libpython%{pybasever}-64.stp
c8504f
%global libpython_stp_debug     libpython%{pybasever}-debug-64.stp
c8504f
%else
c8504f
%global libpython_stp_optimized libpython%{pybasever}-32.stp
c8504f
%global libpython_stp_debug     libpython%{pybasever}-debug-32.stp
c8504f
%endif
c8504f
c8504f
sed \
c8504f
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_optimized}|" \
c8504f
   %{_sourcedir}/libpython.stp \
c8504f
   > %{buildroot}%{tapsetdir}/%{libpython_stp_optimized}
c8504f
c8504f
%if 0%{?with_debug_build}
c8504f
# In Python 3, python3 and python3-debug don't point to the same binary,
c8504f
# so we have to replace "python3" with "python3-debug" to get systemtap
c8504f
# working with debug build
c8504f
sed \
c8504f
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \
c8504f
   -e 's|"python3"|"python3-debug"|' \
c8504f
   %{_sourcedir}/libpython.stp \
c8504f
   > %{buildroot}%{tapsetdir}/%{libpython_stp_debug}
c8504f
%endif # with_debug_build
c8504f
c8504f
%endif # with_systemtap
c8504f
c8504f
# Create symlinks python* for python3* binaries (and similar)
c8504f
pushd %{buildroot}%{_bindir}
c8504f
for versioned_binary in idle3 pydoc3 python3-2to3 python3 python3-config; do
c8504f
  non_versioned_binary=$(echo $versioned_binary | sed -e 's/python3/python/' -e 's/idle3/idle/' -e 's/pydoc3/pydoc/')
c8504f
  ln -s $versioned_binary $non_versioned_binary
c8504f
done
c8504f
%if 0%{?with_debug_build}
c8504f
  ln -s python3-debug python-debug
c8504f
%endif
c8504f
popd
c8504f
c8504f
# Create symlink python.pc for python3.pc
c8504f
pushd %{buildroot}%{_libdir}/pkgconfig
c8504f
ln -s python3.pc python.pc
c8504f
popd
c8504f
c8504f
# Create a python manpage (rhbz#1072522)
c8504f
cp %{buildroot}%{_mandir}/man1/python%{pybasever}.1 %{buildroot}%{_mandir}/man1/python.1
c8504f
c8504f
# ======================================================
c8504f
# Running the upstream test suite
c8504f
# ======================================================
c8504f
c8504f
%check
c8504f
export topdir=$(pwd)
c8504f
# If the system that we are building on uses different libdb than mock, we get
c8504f
# errors like this from test_gdb:
c8504f
# rpmdb: /var/lib/rpm/Name: unexpected file type or format
c8504f
# error: cannot open Name index using db3 - Invalid argument (22)
c8504f
# rpmdb: /var/lib/rpm/Basenames: unexpected file type or format
c8504f
# error: cannot open Basenames index using db3 - Invalid argument (22)
c8504f
# => Disabling test before finding a better solution.
c8504f
mv Lib/test/test_gdb.py Lib/test/test_gdb.py.notest
c8504f
CheckPython() {
c8504f
  ConfName=$1	      
c8504f
  ConfDir=$(pwd)/build/$ConfName
c8504f
c8504f
  echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
c8504f
c8504f
  # Note that we're running the tests using the version of the code in the
c8504f
  # builddir, not in the buildroot.
c8504f
c8504f
  # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the
c8504f
  # our non-standard decorators take effect on the relevant tests:
c8504f
  #   @unittest._skipInRpmBuild(reason)
c8504f
  #   @unittest._expectedFailureInRpmBuild
c8504f
  WITHIN_PYTHON_RPM_BUILD= \
c8504f
  LD_LIBRARY_PATH="-L%{_libdir}:$ConfDir" $ConfDir/python -m test.regrtest \
c8504f
    --verbose --findleaks
c8504f
c8504f
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
c8504f
c8504f
}
c8504f
export -f CheckPython
c8504f
c8504f
%if 0%{run_selftest_suite}
c8504f
c8504f
%{?scl:scl enable %scl - << \EOF}
c8504f
# Check each of the configurations:
c8504f
%if 0%{?with_debug_build}
c8504f
CheckPython debug
c8504f
%endif # with_debug_build
c8504f
CheckPython optimized
c8504f
%{?scl:EOF}
c8504f
c8504f
%endif # run_selftest_suite
c8504f
c8504f
c8504f
# ======================================================
c8504f
# Cleaning up
c8504f
# ======================================================
c8504f
c8504f
%clean
c8504f
rm -fr %{buildroot}
c8504f
c8504f
c8504f
# ======================================================
c8504f
# Scriptlets
c8504f
# ======================================================
c8504f
c8504f
%post libs -p /sbin/ldconfig
c8504f
c8504f
%postun libs -p /sbin/ldconfig
c8504f
c8504f
c8504f
c8504f
%files
c8504f
%defattr(-, root, root)
c8504f
%doc LICENSE README
c8504f
%{_bindir}/pydoc*
c8504f
%{_bindir}/python
c8504f
%{_bindir}/python3
c8504f
%{_bindir}/python%{pybasever}
c8504f
%{_bindir}/python%{pybasever}m
c8504f
%{_bindir}/pyvenv
c8504f
%{_bindir}/pyvenv-3.3
c8504f
%{_mandir}/*/*
c8504f
c8504f
%files libs
c8504f
%defattr(-,root,root,-)
c8504f
%doc LICENSE README
c8504f
%dir %{pylibdir}
c8504f
%dir %{dynload_dir}
c8504f
%{dynload_dir}/_bisect.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_bz2.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_crypt.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_csv.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_curses.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_dbm.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_decimal.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so
c8504f
%if %{with_gdbm}
c8504f
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
c8504f
%endif
c8504f
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_heapq.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_json.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_lzma.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_pickle.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_random.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_socket.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_struct.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/array.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/atexit.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/audioop.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/binascii.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/cmath.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_datetime.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/fcntl.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/grp.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/math.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/mmap.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/nis.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/parser.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/readline.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/resource.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/select.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/spwd.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/syslog.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/termios.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/time.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/zlib.%{SOABI_optimized}.so
c8504f
c8504f
%dir %{pylibdir}/site-packages/
c8504f
%dir %{pylibdir}/site-packages/__pycache__/
c8504f
%{pylibdir}/site-packages/README
c8504f
%{pylibdir}/*.py
c8504f
%dir %{pylibdir}/__pycache__/
c8504f
%{pylibdir}/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%dir %{pylibdir}/collections/
c8504f
%dir %{pylibdir}/collections/__pycache__/
c8504f
%{pylibdir}/collections/*.py
c8504f
%{pylibdir}/collections/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%dir %{pylibdir}/concurrent/
c8504f
%dir %{pylibdir}/concurrent/__pycache__/
c8504f
%{pylibdir}/concurrent/*.py
c8504f
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%dir %{pylibdir}/concurrent/futures/
c8504f
%dir %{pylibdir}/concurrent/futures/__pycache__/
c8504f
%{pylibdir}/concurrent/futures/*.py
c8504f
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%dir %{pylibdir}/ctypes/
c8504f
%dir %{pylibdir}/ctypes/__pycache__/
c8504f
%{pylibdir}/ctypes/*.py
c8504f
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes}
c8504f
%{pylibdir}/ctypes/macholib
c8504f
c8504f
%{pylibdir}/curses
c8504f
c8504f
%dir %{pylibdir}/dbm/
c8504f
%dir %{pylibdir}/dbm/__pycache__/
c8504f
%{pylibdir}/dbm/*.py
c8504f
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%dir %{pylibdir}/distutils/
c8504f
%dir %{pylibdir}/distutils/__pycache__/
c8504f
%{pylibdir}/distutils/*.py
c8504f
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
c8504f
%{pylibdir}/distutils/README
c8504f
%{pylibdir}/distutils/command
c8504f
c8504f
%dir %{pylibdir}/email/
c8504f
%dir %{pylibdir}/email/__pycache__/
c8504f
%{pylibdir}/email/*.py
c8504f
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes}
c8504f
%{pylibdir}/email/mime
c8504f
%doc %{pylibdir}/email/architecture.rst
c8504f
c8504f
%{pylibdir}/encodings
c8504f
%{pylibdir}/html
c8504f
%{pylibdir}/http
c8504f
%{pylibdir}/idlelib
c8504f
c8504f
%dir %{pylibdir}/importlib/
c8504f
%dir %{pylibdir}/importlib/__pycache__/
c8504f
%{pylibdir}/importlib/*.py
c8504f
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%dir %{pylibdir}/json/
c8504f
%dir %{pylibdir}/json/__pycache__/
c8504f
%{pylibdir}/json/*.py
c8504f
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%{pylibdir}/lib2to3
c8504f
%exclude %{pylibdir}/lib2to3/tests
c8504f
%{pylibdir}/logging
c8504f
%{pylibdir}/multiprocessing
c8504f
%{pylibdir}/plat-linux
c8504f
%{pylibdir}/pydoc_data
c8504f
c8504f
%dir %{pylibdir}/sqlite3/
c8504f
%dir %{pylibdir}/sqlite3/__pycache__/
c8504f
%{pylibdir}/sqlite3/*.py
c8504f
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%dir %{pylibdir}/test/
c8504f
%dir %{pylibdir}/test/__pycache__/
c8504f
%{pylibdir}/test/__init__.py
c8504f
%{pylibdir}/test/support.py
c8504f
%{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
c8504f
%{pylibdir}/test/__pycache__/support%{bytecode_suffixes}
c8504f
c8504f
%exclude %{pylibdir}/turtle.py
c8504f
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
c8504f
c8504f
%dir %{pylibdir}/unittest/
c8504f
%dir %{pylibdir}/unittest/__pycache__/
c8504f
%{pylibdir}/unittest/*.py
c8504f
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%{pylibdir}/urllib
c8504f
c8504f
%dir %{pylibdir}/venv/
c8504f
%dir %{pylibdir}/venv/__pycache__/
c8504f
%{pylibdir}/venv/*.py
c8504f
%{pylibdir}/venv/__pycache__/*%{bytecode_suffixes}
c8504f
%{pylibdir}/venv/scripts
c8504f
c8504f
%{pylibdir}/wsgiref
c8504f
%{pylibdir}/xml
c8504f
%{pylibdir}/xmlrpc
c8504f
c8504f
%if "%{_lib}" == "lib64"
c8504f
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
c8504f
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
c8504f
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
c8504f
%endif
c8504f
c8504f
# "Makefile" and the config-32/64.h file are needed by
c8504f
# distutils/sysconfig.py:_init_posix(), so we include them in the core
c8504f
# package, along with their parent directories (bug 531901):
c8504f
%dir %{pylibdir}/config-%{LDVERSION_optimized}/
c8504f
%{pylibdir}/config-%{LDVERSION_optimized}/Makefile
c8504f
%dir %{_includedir}/python%{LDVERSION_optimized}/
c8504f
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
c8504f
c8504f
%{_libdir}/%{py_INSTSONAME_optimized}
c8504f
%{_libdir}/libpython3.so
c8504f
%if 0%{?with_systemtap}
c8504f
%{?scl:%dir %{_datadir}/systemtap}
c8504f
%{?scl:%dir %{tapsetdir}}
c8504f
%{tapsetdir}/%{libpython_stp_optimized}
c8504f
%doc systemtap-example.stp pyfuntop.stp
c8504f
%endif
c8504f
c8504f
%files devel
c8504f
%defattr(-,root,root)
c8504f
%{?scl:%{_root_prefix}/lib/rpm/pythondeps-scl-33.sh}
c8504f
%{?scl:%{_root_prefix}/lib/rpm/redhat/brp-python-bytecompile-with-scl-python-33}
c8504f
%{pylibdir}/config-%{LDVERSION_optimized}/*
c8504f
%exclude %{pylibdir}/config-%{LDVERSION_optimized}/Makefile
c8504f
%{_includedir}/python%{LDVERSION_optimized}/*.h
c8504f
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
c8504f
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
c8504f
%{_bindir}/python-config
c8504f
%{_bindir}/python3-config
c8504f
%{_bindir}/python%{pybasever}-config
c8504f
%{_bindir}/python%{LDVERSION_optimized}-config
c8504f
%{_libdir}/libpython%{LDVERSION_optimized}.so
c8504f
%{?scl:%dir %{_libdir}/pkgconfig}
c8504f
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
c8504f
%{_libdir}/pkgconfig/python-%{pybasever}.pc
c8504f
%{_libdir}/pkgconfig/python.pc
c8504f
%{_libdir}/pkgconfig/python3.pc
c8504f
%config(noreplace) %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm/macros.python3%{?scl:.%{scl}}
c8504f
%config(noreplace) %{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/rpm/macros.pybytecompile%{?scl:.%{scl}}
c8504f
c8504f
%files tools
c8504f
%defattr(-,root,root,755)
c8504f
# TODO: are all these names really necessary?
c8504f
%{_bindir}/python-2to3
c8504f
%{_bindir}/python3-2to3
c8504f
%{_bindir}/2to3
c8504f
%{_bindir}/2to3-%{pybasever}
c8504f
%{_bindir}/idle*
c8504f
%{pylibdir}/Tools
c8504f
%doc %{pylibdir}/Doc
c8504f
c8504f
%files tkinter
c8504f
%defattr(-,root,root,755)
c8504f
%{pylibdir}/tkinter
c8504f
%exclude %{pylibdir}/tkinter/test
c8504f
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
c8504f
%{pylibdir}/turtle.py
c8504f
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
c8504f
%dir %{pylibdir}/turtledemo
c8504f
%{pylibdir}/turtledemo/*.py
c8504f
%{pylibdir}/turtledemo/*.txt
c8504f
%{pylibdir}/turtledemo/*.cfg
c8504f
%dir %{pylibdir}/turtledemo/__pycache__/
c8504f
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}
c8504f
c8504f
%files test
c8504f
%defattr(-, root, root)
c8504f
%{pylibdir}/ctypes/test
c8504f
%{pylibdir}/distutils/tests
c8504f
%{pylibdir}/sqlite3/test
c8504f
%{pylibdir}/test
c8504f
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_testbuffer.%{SOABI_optimized}.so
c8504f
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
c8504f
%{pylibdir}/lib2to3/tests
c8504f
%{pylibdir}/tkinter/test
c8504f
%{pylibdir}/unittest/test
c8504f
c8504f
c8504f
# We don't bother splitting the debug build out into further subpackages:
c8504f
# if you need it, you're probably a developer.
c8504f
c8504f
# Hence the manifest is the combination of analogous files in the manifests of
c8504f
# all of the other subpackages
c8504f
c8504f
%if 0%{?with_debug_build}
c8504f
%files debug
c8504f
%defattr(-,root,root,-)
c8504f
c8504f
# Analog of the core subpackage's files:
c8504f
%{_bindir}/python%{LDVERSION_debug}
c8504f
%{_bindir}/python-debug
c8504f
%{_bindir}/python3-debug
c8504f
c8504f
# Analog of the -libs subpackage's files:
c8504f
# ...with debug builds of the built-in "extension" modules:
c8504f
%{dynload_dir}/_bisect.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_bz2.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_crypt.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_csv.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_ctypes.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_curses.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_curses_panel.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_dbm.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_decimal.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_elementtree.%{SOABI_debug}.so
c8504f
%if %{with_gdbm}
c8504f
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
c8504f
%endif
c8504f
%{dynload_dir}/_hashlib.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_heapq.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_json.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_lsprof.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_lzma.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_pickle.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_random.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_socket.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_sqlite3.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_ssl.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_struct.%{SOABI_debug}.so
c8504f
%{dynload_dir}/array.%{SOABI_debug}.so
c8504f
%{dynload_dir}/atexit.%{SOABI_debug}.so
c8504f
%{dynload_dir}/audioop.%{SOABI_debug}.so
c8504f
%{dynload_dir}/binascii.%{SOABI_debug}.so
c8504f
%{dynload_dir}/cmath.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_datetime.%{SOABI_debug}.so
c8504f
%{dynload_dir}/fcntl.%{SOABI_debug}.so
c8504f
%{dynload_dir}/grp.%{SOABI_debug}.so
c8504f
%{dynload_dir}/math.%{SOABI_debug}.so
c8504f
%{dynload_dir}/mmap.%{SOABI_debug}.so
c8504f
%{dynload_dir}/nis.%{SOABI_debug}.so
c8504f
%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
c8504f
%{dynload_dir}/parser.%{SOABI_debug}.so
c8504f
%{dynload_dir}/pyexpat.%{SOABI_debug}.so
c8504f
%{dynload_dir}/readline.%{SOABI_debug}.so
c8504f
%{dynload_dir}/resource.%{SOABI_debug}.so
c8504f
%{dynload_dir}/select.%{SOABI_debug}.so
c8504f
%{dynload_dir}/spwd.%{SOABI_debug}.so
c8504f
%{dynload_dir}/syslog.%{SOABI_debug}.so
c8504f
%{dynload_dir}/termios.%{SOABI_debug}.so
c8504f
%{dynload_dir}/time.%{SOABI_debug}.so
c8504f
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
c8504f
%{dynload_dir}/zlib.%{SOABI_debug}.so
c8504f
c8504f
# No need to split things out the "Makefile" and the config-32/64.h file as we
c8504f
# do for the regular build above (bug 531901), since they're all in one package
c8504f
# now; they're listed below, under "-devel":
c8504f
c8504f
%{_libdir}/%{py_INSTSONAME_debug}
c8504f
%if 0%{?with_systemtap}
c8504f
%{tapsetdir}/%{libpython_stp_debug}
c8504f
%endif
c8504f
c8504f
# Analog of the -devel subpackage's files:
c8504f
%{pylibdir}/config-%{LDVERSION_debug}
c8504f
%{_includedir}/python%{LDVERSION_debug}
c8504f
%{_bindir}/python%{LDVERSION_debug}-config
c8504f
%{_libdir}/libpython%{LDVERSION_debug}.so
c8504f
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
c8504f
c8504f
# Analog of the -tools subpackage's files:
c8504f
#  None for now; we could build precanned versions that have the appropriate
c8504f
# shebang if needed
c8504f
c8504f
# Analog  of the tkinter subpackage's files:
c8504f
%{dynload_dir}/_tkinter.%{SOABI_debug}.so
c8504f
c8504f
# Analog  of the -test subpackage's files:
c8504f
%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_testbuffer.%{SOABI_debug}.so
c8504f
%{dynload_dir}/_testcapi.%{SOABI_debug}.so
c8504f
c8504f
%endif # with_debug_build
c8504f
c8504f
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from
c8504f
# ldconfig (rhbz:562980).
c8504f
# 
c8504f
# The /usr/lib/rpm/redhat/macros defines %__debug_package to use
c8504f
# debugfiles.list, and it appears that everything below /usr/lib/debug and
c8504f
# (/usr/src/debug) gets added to this file (via LISTFILES) in
c8504f
# /usr/lib/rpm/find-debuginfo.sh
c8504f
# 
c8504f
# Hence by installing it below /usr/lib/debug we ensure it is added to the
c8504f
# -debuginfo subpackage
c8504f
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py 
c8504f
# payload file would be unpackaged)
c8504f
c8504f
c8504f
# ======================================================
c8504f
# Finally, the changelog:
c8504f
# ======================================================
c8504f
c8504f
%changelog
7ea961
* Fri Aug 05 2016 Charalampos Stratakis <cstratak@redhat.com> - 3.3.2-16
7ea961
- Fix for CVE-2016-1000110 HTTPoxy attack
7ea961
Resolves: rhbz#1359169
7ea961
7ea961
* Fri Jul 08 2016 Tomas Orsava <torsava@redhat.com> - 3.3.2-15
7ea961
- Addendum for the Fix for CVE-2016-5699 (rhbz#1303699)
7ea961
  Python 3.3 does not yet have functions fullmatch and subTest,
7ea961
  the patch was rewritten accordingly
7ea961
Resolves: rhbz#1346359
7ea961
7ea961
* Fri Jul 01 2016 Tomas Orsava <torsava@redhat.com> - 3.3.2-14
7ea961
- Addendum for the Fix for CVE-2016-0772 (rhbz#1303647)
7ea961
  In this version of Python, smtplib has 644 permissons, not 755,
7ea961
  thus I modified the patch to expect this and not adjust the permissons.
7ea961
Resolves: rhbz#1346359
7ea961
7ea961
* Tue Jun 21 2016 Tomas Orsava <torsava@redhat.com> - 3.3.2-13
7ea961
- Fix for CVE-2016-0772 python: smtplib StartTLS stripping attack (rhbz#1303647)
7ea961
  Raise an error when STARTTLS fails (upstream patch)
7ea961
- Fix for CVE-2016-5699 python: http protocol steam injection attack (rhbz#1303699)
7ea961
  Disabled HTTP header injections in http.client (upstream patch)
7ea961
Resolves: rhbz#1346359
7ea961
c8504f
* Thu Mar 20 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.3.2-12
c8504f
- Create a "python" man page
c8504f
Resolves: rhbz#1072522
c8504f
c8504f
* Thu Mar 20 2014 Matej Stuchlik <mstuchli@redhat.com> - 3.3.2-11
c8504f
- Fix memory leak in os module
c8504f
Resolves: rhbz#1071868
c8504f
c8504f
* Mon Nov 25 2013 Robert Kuska <rkuska@redhat.com> - 3.3.2-10
c8504f
- Move unversioned python macros to metapackage
c8504f
c8504f
* Sun Nov 24 2013 Robert Kuska <rkuska@redhat.com> - 3.3.2-9
c8504f
- Bytecompile all *.py files properly during build (rhbz#1023607)
c8504f
- Allow building depending packages with unversioned python macros
c8504f
  i.e. %%{__python} instead of %%{__python3}
c8504f
c8504f
* Tue Nov 12 2013 Robert Kuska <rkuska@redhat.com> - 3.3.2-8
c8504f
- Fix memory leak in gdbm module (rhbz#977308)
c8504f
- Make building depending collections on top of python33 easier
c8504f
- Fix build with libffi containing multilib wrapper for ffi.h (rhbz#979696).
c8504f
c8504f
* Thu Aug 15 2013 Matej Stuchlik <mstuchli@redhat.com> - 3.3.2-7
c8504f
- Added patch for CVE-2013-4238 (rhbz#996733).
c8504f
c8504f
* Wed Jun 12 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-6
c8504f
- Fix __os_install_post to compress manfiles properly.
c8504f
c8504f
* Mon Jun 10 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-5
c8504f
- Disable default bytecompilation during build, fixes rhbz#971427.
c8504f
- Fix for gettext plural form headers, fixes rhbz#968928.
c8504f
- Compile debug build libraries with -O1, fixes rhbz#967900.
c8504f
- Print repr() in when C assert fails in debug build, fixes rhbz#971858.
c8504f
c8504f
* Thu May 23 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-4
c8504f
- Own the pkgconfig dir and tapsetdir, these are not owned by any
c8504f
the respective packages in SCL (rhbz#966547).
c8504f
c8504f
* Thu May 23 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-3
c8504f
- Remove __root_bindir wrapper (rhbz#966412).
c8504f
c8504f
* Mon May 20 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-2
c8504f
- Add patch for CVE-2013-2099 (rhbz#963261).
c8504f
c8504f
* Mon May 20 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.2-1
c8504f
- Update to Python 3.3.2 (resync patches etc. with Fedora)
c8504f
c8504f
* Thu May 09 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-1
c8504f
- Replace the @scl@ in macros.python3.python33 by %%{scl}
c8504f
c8504f
* Thu May 09 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-1
c8504f
- Properly override require filtering of python(abi) to R: python33-python(abi)
c8504f
c8504f
* Tue May 07 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.1-1
c8504f
- Update to Python 3.3.1.
c8504f
- Actually add the rpm scripts.
c8504f
c8504f
* Tue May 07 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.0-6
c8504f
- Move rpm scripts for scl to python-devel from metapackage.
c8504f
c8504f
* Fri Jan 18 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.0-5
c8504f
- Revert the fix, the issue was due to using rhel 5 builders
c8504f
but compiling against rhel 6 headers.
c8504f
c8504f
* Thu Jan 17 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.0-4
c8504f
- Fix the bad utime nanoseconds kernel support, see patch1000 comment.
c8504f
c8504f
* Tue Jan 08 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 3.3.0-3
c8504f
- Rebuilt for SCL.
c8504f
c8504f
* Thu Nov 29 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-2
c8504f
- add BR on bluez-libs-devel (rhbz#879720)
c8504f
c8504f
* Sat Sep 29 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-1
c8504f
- 3.3.0rc3 -> 3.3.0; drop alphatag
c8504f
c8504f
* Mon Sep 24 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.6.rc3
c8504f
- 3.3.0rc2 -> 3.3.0rc3
c8504f
c8504f
* Mon Sep 10 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.5.rc2
c8504f
- 3.3.0rc1 -> 3.3.0rc2; refresh patch 55
c8504f
c8504f
* Mon Aug 27 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.4.rc1
c8504f
- 3.3.0b2 -> 3.3.0rc1; refresh patches 3, 55
c8504f
c8504f
* Mon Aug 13 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.3.b2
c8504f
- 3.3b1 -> 3.3b2; drop upstreamed patch 152; refresh patches 3, 102, 111,
c8504f
134, 153, 160; regenenerate autotools patch; rework systemtap patch to work
c8504f
correctly when LANG=C (patch 55); importlib.test was moved to
c8504f
test.test_importlib upstream
c8504f
c8504f
* Mon Aug 13 2012 Karsten Hopp <karsten@redhat.com> 3.3.0-0.2.b1
c8504f
- disable some failing checks on PPC* (rhbz#846849)
c8504f
c8504f
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.1.b1
c8504f
- 3.2 -> 3.3: https://fedoraproject.org/wiki/Features/Python_3.3
c8504f
- 3.3.0b1: refresh patches 3, 55, 102, 111, 113, 114, 134, 157; drop upstream
c8504f
patch 147; regenenerate autotools patch; drop "--with-wide-unicode" from
c8504f
configure (PEP 393); "plat-linux2" -> "plat-linux" (upstream issue 12326);
c8504f
"bz2" -> "_bz2" and "crypt" -> "_crypt"; egg-info files are no longer shipped
c8504f
for stdlib (upstream issues 10645 and 12218); email/test moved to
c8504f
test/test_email; add /usr/bin/pyvenv[-3.3] and venv module (PEP 405); add
c8504f
_decimal and _lzma modules; make collections modules explicit in payload again
c8504f
(upstream issue 11085); add _testbuffer module to tests subpackage (added in
c8504f
upstream commit 3f9b3b6f7ff0); fix test failures (patches 160 and 161);
c8504f
workaround erroneously shared _sysconfigdata.py upstream issue #14774; fix
c8504f
distutils.sysconfig traceback (patch 162); add BuildRequires: xz-devel (for
c8504f
_lzma module); skip some tests within test_socket (patch 163)
c8504f
c8504f
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-11
c8504f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c8504f
c8504f
* Fri Jul 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.1.b1
c8504f
c8504f
* Fri Jun 22 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-10
c8504f
- use macro for power64 (rhbz#834653)
c8504f
c8504f
* Mon Jun 18 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-9
c8504f
- fix missing include in uid/gid handling patch (patch 157; rhbz#830405)
c8504f
c8504f
* Wed May 30 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 3.2.3-8
c8504f
- fix tapset for debug build
c8504f
c8504f
* Tue May 15 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-7
c8504f
- update uid/gid handling to avoid int overflows seen with uid/gid
c8504f
values >= 2^31 on 32-bit architectures (patch 157; rhbz#697470)
c8504f
c8504f
* Fri May  4 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-6
c8504f
- renumber autotools patch from 300 to 5000
c8504f
- specfile cleanups
c8504f
c8504f
* Mon Apr 30 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-5
c8504f
- fix test_gdb.py (patch 156; rhbz#817072)
c8504f
c8504f
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-4
c8504f
- avoid allocating thunks in ctypes unless absolutely necessary, to avoid
c8504f
generating SELinux denials on "import ctypes" and "import uuid" when embedding
c8504f
Python within httpd (patch 155; rhbz#814391)
c8504f
c8504f
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-3
c8504f
- add explicit version requirements on expat to avoid linkage problems with
c8504f
XML_SetHashSalt
c8504f
c8504f
* Thu Apr 12 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-2
c8504f
- fix test_gdb (patch 153)
c8504f
c8504f
* Wed Apr 11 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-1
c8504f
- 3.2.3; refresh patch 102 (lib64); drop upstream patches 148 (gdbm magic
c8504f
values), 149 (__pycache__ fix); add patch 152 (test_gdb regex)
c8504f
c8504f
* Thu Feb  9 2012 Thomas Spura <tomspur@fedoraproject.org> - 3.2.2-13
c8504f
- use newly installed python for byte compiling (now for real)
c8504f
c8504f
* Sun Feb  5 2012 Thomas Spura <tomspur@fedoraproject.org> - 3.2.2-12
c8504f
- use newly installed python for byte compiling (#787498)
c8504f
c8504f
* Wed Jan  4 2012 Ville Skyttä <ville.skytta@iki.fi> - 3.2.2-11
c8504f
- Build with $RPM_LD_FLAGS (#756863).
c8504f
- Use xz-compressed source tarball.
c8504f
c8504f
* Wed Dec 07 2011 Karsten Hopp <karsten@redhat.com> 3.2.2-10
c8504f
- disable rAssertAlmostEqual in test_cmath on PPC (#750811)
c8504f
c8504f
* Mon Oct 17 2011 Rex Dieter <rdieter@fedoraproject.org> - 3.2.2-9
c8504f
- python3-devel missing autogenerated pkgconfig() provides (#746751)
c8504f
c8504f
* Mon Oct 10 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-8
c8504f
- cherrypick fix for distutils not using __pycache__ when byte-compiling
c8504f
files (rhbz#722578)
c8504f
c8504f
* Fri Sep 30 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-7
c8504f
- re-enable gdbm (patch 148; rhbz#742242)
c8504f
c8504f
* Fri Sep 16 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-6
c8504f
- add a sys._debugmallocstats() function (patch 147)
c8504f
c8504f
* Wed Sep 14 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-5
c8504f
- support OpenSSL FIPS mode in _hashlib and hashlib; don't build the _md5 and
c8504f
_sha* modules, relying on _hashlib in hashlib (rhbz#563986; patch 146)
c8504f
c8504f
* Tue Sep 13 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-4
c8504f
- disable gdbm module to prepare for gdbm soname bump
c8504f
c8504f
* Mon Sep 12 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-3
c8504f
- renumber and rename patches for consistency with python.spec (8 to 55, 106
c8504f
to 104, 6 to 111, 104 to 113, 105 to 114, 125, 131, 130 to 143)
c8504f
c8504f
* Sat Sep 10 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-2
c8504f
- rewrite of "check", introducing downstream-only hooks for skipping specific
c8504f
cases in an rpmbuild (patch 132), and fixing/skipping failing tests in a more
c8504f
fine-grained manner than before; (patches 106, 133-142 sparsely, moving
c8504f
patches for consistency with python.spec: 128 to 134, 126 to 135, 127 to 141)
c8504f
c8504f
* Tue Sep  6 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.2-1
c8504f
- 3.2.2
c8504f
c8504f
* Thu Sep  1 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-7
c8504f
- run selftests with "--verbose"
c8504f
- disable parts of test_io on ppc (rhbz#732998)
c8504f
c8504f
* Wed Aug 31 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-6
c8504f
- use "--findleaks --verbose3" when running test suite
c8504f
c8504f
* Tue Aug 23 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-5
c8504f
- re-enable and fix the --with-tsc option on ppc64, and rework it on 32-bit
c8504f
ppc to avoid aliasing violations (patch 130; rhbz#698726)
c8504f
c8504f
* Tue Aug 23 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-4
c8504f
- don't use --with-tsc on ppc64 debug builds (rhbz#698726)
c8504f
c8504f
* Thu Aug 18 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-3
c8504f
- add %%python3_version to the rpm macros (rhbz#719082)
c8504f
c8504f
* Mon Jul 11 2011 Dennis Gilmore <dennis@ausil.us> - 3.2.1-2
c8504f
- disable some tests on sparc arches 
c8504f
c8504f
* Mon Jul 11 2011 David Malcolm <dmalcolm@redhat.com> - 3.2.1-1
c8504f
- 3.2.1; refresh lib64 patch (102), subprocess unit test patch (129), disabling
c8504f
of static library build (due to Modules/_testembed; patch 6), autotool
c8504f
intermediates (patch 300)
c8504f
c8504f
* Fri Jul  8 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-5
c8504f
- use the gdb hooks from the upstream tarball, rather than keeping our own copy
c8504f
c8504f
* Fri Jul  8 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-4
c8504f
- don't run test_openpty and test_pty in %%check
c8504f
c8504f
* Fri Jul  8 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-3
c8504f
- cleanup of BuildRequires; add comment headings to specfile sections
c8504f
c8504f
* Tue Apr 19 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-2
c8504f
- fix the libpython.stp systemtap tapset (rhbz#697730)
c8504f
c8504f
* Mon Feb 21 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-1
c8504f
- 3.2
c8504f
- drop alphatag
c8504f
- regenerate autotool patch
c8504f
c8504f
* Mon Feb 14 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.13.rc3
c8504f
- add a /usr/bin/python3-debug symlink within the debug subpackage
c8504f
c8504f
* Mon Feb 14 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.12.rc3
c8504f
- 3.2rc3
c8504f
- regenerate autotool patch
c8504f
c8504f
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-0.11.rc2
c8504f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c8504f
c8504f
* Mon Jan 31 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.10.rc2
c8504f
- 3.2rc2
c8504f
c8504f
* Mon Jan 17 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.9.rc1
c8504f
- 3.2rc1
c8504f
- rework patch 6 (static lib removal)
c8504f
- remove upstreamed patch 130 (ppc debug build)
c8504f
- regenerate patch 300 (autotool intermediates)
c8504f
- updated packaging to reflect upstream rewrite of "Demo" (issue 7962)
c8504f
- added libpython3.so and 2to3-3.2
c8504f
c8504f
* Wed Jan  5 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.8.b2
c8504f
- set EXTRA_CFLAGS to our CFLAGS, rather than overriding OPT, fixing a linker
c8504f
error with dynamic annotations (when configured using --with-valgrind)
c8504f
- fix the ppc build of the debug configuration (patch 130; rhbz#661510)
c8504f
c8504f
* Tue Jan  4 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.7.b2
c8504f
- add --with-valgrind to configuration (on architectures that support this)
c8504f
c8504f
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.6.b2
c8504f
- work around test_subprocess failure seen in koji (patch 129)
c8504f
c8504f
* Tue Dec 28 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.5.b2
c8504f
- 3.2b2
c8504f
- rework patch 3 (removal of mimeaudio tests), patch 6 (no static libs),
c8504f
patch 8 (systemtap), patch 102 (lib64)
c8504f
- remove patch 4 (rendered redundant by upstream r85537), patch 103 (PEP 3149),
c8504f
patch 110 (upstreamed expat fix), patch 111 (parallel build fix for grammar
c8504f
fixed upstream)
c8504f
- regenerate patch 300 (autotool intermediates)
c8504f
- workaround COUNT_ALLOCS weakref issues in test suite (patch 126, patch 127,
c8504f
patch 128)
c8504f
- stop using runtest.sh in %%check (dropped by upstream), replacing with
c8504f
regrtest; fixup list of failing tests
c8504f
- introduce "pyshortver", "SOABI_optimized" and "SOABI_debug" macros
c8504f
- rework manifests of shared libraries to use "SOABI_" macros, reflecting
c8504f
PEP 3149
c8504f
- drop itertools, operator and _collections modules from the manifests as py3k
c8504f
commit r84058 moved these inside libpython; json/tests moved to test/json_tests
c8504f
- move turtle code into the tkinter subpackage
c8504f
c8504f
* Wed Nov 17 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.5.a1
c8504f
- fix sysconfig to not rely on the -devel subpackage (rhbz#653058)
c8504f
c8504f
* Thu Sep  9 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.4.a1
c8504f
- move most of the content of the core package to the libs subpackage, given
c8504f
that the libs aren't meaningfully usable without the standard libraries
c8504f
c8504f
* Wed Sep  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.3.a1
c8504f
- Move test.support to core package (rhbz#596258)
c8504f
- Add various missing __pycache__ directories to payload
c8504f
c8504f
* Sun Aug 22 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2-0.2.a1
c8504f
- Add __pycache__ directory for site-packages
c8504f
c8504f
* Sun Aug 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 3.2-0.1.a1
c8504f
- on 64bit "stdlib" was still "/usr/lib/python*" (modify *lib64.patch)
c8504f
- make find-provides-without-python-sonames.sh 64bit aware
c8504f
c8504f
* Sat Aug 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.0.a1
c8504f
- 3.2a1; add alphatag
c8504f
- rework %%files in the light of PEP 3147 (__pycache__)
c8504f
- drop our configuration patch to Setup.dist (patch 0): setup.py should do a
c8504f
better job of things, and the %%files explicitly lists our modules (r82746
c8504f
appears to break the old way of doing things).  This leads to various modules
c8504f
changing from "foomodule.so" to "foo.so".  It also leads to the optimized build
c8504f
dropping the _sha1, _sha256 and _sha512 modules, but these are provided by
c8504f
_hashlib; _weakref becomes a builtin module; xxsubtype goes away (it's only for
c8504f
testing/devel purposes)
c8504f
- fixup patches 3, 4, 6, 8, 102, 103, 105, 111 for the rebase
c8504f
- remove upstream patches: 7 (system expat), 106, 107, 108 (audioop reformat
c8504f
plus CVE-2010-1634 and CVE-2010-2089), 109 (CVE-2008-5983)
c8504f
- add machinery for rebuilding "configure" and friends, using the correct
c8504f
version of autoconf (patch 300)
c8504f
- patch the debug build's usage of COUNT_ALLOCS to be less verbose (patch 125)
c8504f
- "modulator" was removed upstream
c8504f
- drop "-b" from patch applications affecting .py files to avoid littering the
c8504f
installation tree
c8504f
c8504f
* Thu Aug 19 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.1.2-13
c8504f
- Turn on computed-gotos.
c8504f
- Fix for parallel make and graminit.c
c8504f
c8504f
* Fri Jul  2 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-12
c8504f
- rebuild
c8504f
c8504f
* Fri Jul  2 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-11
c8504f
- Fix an incompatibility between pyexpat and the system expat-2.0.1 that led to
c8504f
a segfault running test_pyexpat.py (patch 110; upstream issue 9054; rhbz#610312)
c8504f
c8504f
* Fri Jun  4 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-10
c8504f
- ensure that the compiler is invoked with "-fwrapv" (rhbz#594819)
c8504f
- reformat whitespace in audioop.c (patch 106)
c8504f
- CVE-2010-1634: fix various integer overflow checks in the audioop
c8504f
module (patch 107)
c8504f
- CVE-2010-2089: further checks within the audioop module (patch 108)
c8504f
- CVE-2008-5983: the new PySys_SetArgvEx entry point from r81399 (patch 109)
c8504f
c8504f
* Thu May 27 2010 Dan Horák <dan[at]danny.cz> - 3.1.2-9
c8504f
- reading the timestamp counter is available only on some arches (see Python/ceval.c)
c8504f
c8504f
* Wed May 26 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-8
c8504f
- add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
c8504f
(patch 105)
c8504f
c8504f
* Tue May 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-7
c8504f
- add configure-time support for COUNT_ALLOCS and CALL_PROFILE debug options
c8504f
(patch 104); enable them and the WITH_TSC option within the debug build
c8504f
c8504f
* Mon May 24 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-6
c8504f
- build and install two different configurations of Python 3: debug and
c8504f
standard, packaging the debug build in a new "python3-debug" subpackage
c8504f
(patch 103)
c8504f
c8504f
* Tue Apr 13 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-5
c8504f
- exclude test_http_cookies when running selftests, due to hang seen on
c8504f
http://koji.fedoraproject.org/koji/taskinfo?taskID=2088463 (cancelled after
c8504f
11 hours)
c8504f
- update python-gdb.py from v5 to py3k version submitted upstream
c8504f
c8504f
* Wed Mar 31 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-4
c8504f
- update python-gdb.py from v4 to v5 (improving performance and stability,
c8504f
adding commands)
c8504f
c8504f
* Thu Mar 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-3
c8504f
- update python-gdb.py from v3 to v4 (fixing infinite recursion on reference
c8504f
cycles and tracebacks on bytes 0x80-0xff in strings, adding handlers for sets
c8504f
and exceptions)
c8504f
c8504f
* Wed Mar 24 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-2
c8504f
- refresh gdb hooks to v3 (reworking how they are packaged)
c8504f
c8504f
* Sun Mar 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-1
c8504f
- update to 3.1.2: http://www.python.org/download/releases/3.1.2/
c8504f
- drop upstreamed patch 2 (.pyc permissions handling)
c8504f
- drop upstream patch 5 (fix for the test_tk and test_ttk_* selftests)
c8504f
- drop upstreamed patch 200 (path-fixing script)
c8504f
c8504f
* Sat Mar 20 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-28
c8504f
- fix typo in libpython.stp (rhbz:575336)
c8504f
c8504f
* Fri Mar 12 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-27
c8504f
- add pyfuntop.stp example (source 7)
c8504f
- convert usage of $$RPM_BUILD_ROOT to %%{buildroot} throughout, for
c8504f
consistency with python.spec
c8504f
c8504f
* Mon Feb 15 2010 Thomas Spura <tomspur@fedoraproject.org> - 3.1.1-26
c8504f
- rebuild for new package of redhat-rpm-config (rhbz:564527)
c8504f
- use 'install -p' when running 'make install'
c8504f
c8504f
* Fri Feb 12 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-25
c8504f
- split configure options into multiple lines for easy of editing
c8504f
- add systemtap static markers (wcohen, mjw, dmalcolm; patch 8), a systemtap
c8504f
tapset defining "python.function.entry" and "python.function.return" to make
c8504f
the markers easy to use (dmalcolm; source 5), and an example of using the
c8504f
tapset to the docs (dmalcolm; source 6) (rhbz:545179)
c8504f
c8504f
* Mon Feb  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-24
c8504f
- move the -gdb.py file from %%{_libdir}/INSTSONAME-gdb.py to
c8504f
%%{_prefix}/lib/debug/%%{_libdir}/INSTSONAME.debug-gdb.py to avoid noise from
c8504f
ldconfig (bug 562980), and which should also ensure it becomes part of the
c8504f
debuginfo subpackage, rather than the libs subpackage
c8504f
- introduce %%{py_SOVERSION} and %%{py_INSTSONAME} to reflect the upstream
c8504f
configure script, and to avoid fragile scripts that try to figure this out
c8504f
dynamically (e.g. for the -gdb.py change)
c8504f
c8504f
* Mon Feb  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-23
c8504f
- add gdb hooks for easier debugging (Source 4)
c8504f
c8504f
* Thu Jan 28 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-22
c8504f
- update python-3.1.1-config.patch to remove downstream customization of build
c8504f
of pyexpat and elementtree modules
c8504f
- add patch adapted from upstream (patch 7) to add support for building against
c8504f
system expat; add --with-system-expat to "configure" invocation
c8504f
- remove embedded copies of expat and zlib from source tree during "prep"
c8504f
c8504f
* Mon Jan 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-21
c8504f
- introduce %%{dynload_dir} macro
c8504f
- explicitly list all lib-dynload files, rather than dynamically gathering the
c8504f
payload into a temporary text file, so that we can be sure what we are
c8504f
shipping
c8504f
- introduce a macros.pybytecompile source file, to help with packaging python3
c8504f
modules (Source3; written by Toshio)
c8504f
- rename "2to3-3" to "python3-2to3" to better reflect python 3 module packaging
c8504f
plans
c8504f
c8504f
* Mon Jan 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-20
c8504f
- change python-3.1.1-config.patch to remove our downstream change to curses
c8504f
configuration in Modules/Setup.dist, so that the curses modules are built using
c8504f
setup.py with the downstream default (linking against libncursesw.so, rather
c8504f
than libncurses.so), rather than within the Makefile; add a test to %%install
c8504f
to verify the dso files that the curses module is linked against the correct
c8504f
DSO (bug 539917; changes _cursesmodule.so -> _curses.so)
c8504f
c8504f
* Fri Jan 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-19
c8504f
- add %%py3dir macro to macros.python3 (to be used during unified python 2/3
c8504f
builds for setting up the python3 copy of the source tree)
c8504f
c8504f
* Wed Jan 20 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-18
c8504f
- move lib2to3 from -tools subpackage to main package (bug 556667)
c8504f
c8504f
* Sun Jan 17 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-17
c8504f
- patch Makefile.pre.in to avoid building static library (patch 6, bug 556092)
c8504f
c8504f
* Fri Jan 15 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-16
c8504f
- use the %%{_isa} macro to ensure that the python-devel dependency on python
c8504f
is for the correct multilib arch (#555943)
c8504f
- delete bundled copy of libffi to make sure we use the system one
c8504f
c8504f
* Fri Jan 15 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-15
c8504f
- fix the URLs output by pydoc so they point at python.org's 3.1 build of the
c8504f
docs, rather than the 2.6 build
c8504f
c8504f
* Wed Jan 13 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-14
c8504f
- replace references to /usr with %%{_prefix}; replace references to
c8504f
/usr/include with %%{_includedir} (Toshio)
c8504f
c8504f
* Mon Jan 11 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-13
c8504f
- fix permission on find-provides-without-python-sonames.sh from 775 to 755
c8504f
c8504f
* Mon Jan 11 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-12
c8504f
- remove build-time requirements on tix and tk, since we already have
c8504f
build-time requirements on the -devel subpackages for each of these (Thomas
c8504f
Spura)
c8504f
- replace usage of %%define with %%global (Thomas Spura)
c8504f
- remove forcing of CC=gcc as this old workaround for bug 109268 appears to
c8504f
longer be necessary
c8504f
- move various test files from the "tools"/"tkinter" subpackages to the "test"
c8504f
subpackage
c8504f
c8504f
* Thu Jan  7 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-11
c8504f
- add %%check section (thanks to Thomas Spura)
c8504f
- update patch 4 to use correct shebang line
c8504f
- get rid of stray patch file from buildroot
c8504f
c8504f
* Tue Nov 17 2009 Andrew McNabb <amcnabb@mcnabbs.org> - 3.1.1-10
c8504f
- switched a few instances of "find |xargs" to "find -exec" for consistency.
c8504f
- made the description of __os_install_post more accurate.
c8504f
c8504f
* Wed Nov  4 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-9
c8504f
- add macros.python3 to the -devel subpackage, containing common macros for use
c8504f
when packaging python3 modules
c8504f
c8504f
* Tue Nov  3 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-8
c8504f
- add a provides of "python(abi)" (see bug 532118)
c8504f
- fix issues identified by a.badger in package review (bug 526126, comment 39):
c8504f
  - use "3" thoughout metadata, rather than "3.*"
c8504f
  - remove conditional around "pkg-config openssl"
c8504f
  - use standard cleanup of RPM_BUILD_ROOT
c8504f
  - replace hardcoded references to /usr with _prefix macro
c8504f
  - stop removing egg-info files
c8504f
  - use /usr/bin/python3.1 rather than /use/bin/env python3.1 when fixing
c8504f
up shebang lines
c8504f
  - stop attempting to remove no-longer-present .cvsignore files
c8504f
  - move the post/postun sections above the "files" sections
c8504f
c8504f
* Thu Oct 29 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-7
c8504f
- remove commented-away patch 51 (python-2.6-distutils_rpm.patch): the -O1
c8504f
flag is used by default in the upstream code
c8504f
- "Makefile" and the config-32/64.h file are needed by distutils/sysconfig.py
c8504f
_init_posix(), so we include them in the core package, along with their parent
c8504f
directories (bug 531901)
c8504f
c8504f
* Tue Oct 27 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-6
c8504f
- reword description, based on suggestion by amcnabb
c8504f
- fix the test_email and test_imp selftests (patch 3 and patch 4 respectively)
c8504f
- fix the test_tk and test_ttk_* selftests (patch 5)
c8504f
- fix up the specfile's handling of shebang/perms to avoid corrupting
c8504f
test_httpservers.py (sed command suggested by amcnabb)
c8504f
c8504f
* Thu Oct 22 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-5
c8504f
- fixup importlib/_bootstrap.py so that it correctly handles being unable to
c8504f
open .pyc files for writing (patch 2, upstream issue 7187)
c8504f
- actually apply the rpath patch (patch 1)
c8504f
c8504f
* Thu Oct 22 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-4
c8504f
- update patch0's setup of the crypt module to link it against libcrypt
c8504f
- update patch0 to comment "datetimemodule" back out, so that it is built
c8504f
using setup.py (see Setup, option 3), thus linking it statically against
c8504f
timemodule.c and thus avoiding a run-time "undefined symbol:
c8504f
_PyTime_DoubleToTimet" failure on "import datetime"
c8504f
c8504f
* Wed Oct 21 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-3
c8504f
- remove executable flag from various files that shouldn't have it
c8504f
- fix end-of-line encodings
c8504f
- fix a character encoding
c8504f
c8504f
* Tue Oct 20 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-2
c8504f
- disable invocation of brp-python-bytecompile in postprocessing, since
c8504f
it would be with the wrong version of python (adapted from ivazquez'
c8504f
python3000 specfile)
c8504f
- use a custom implementation of __find_provides in order to filter out bogus
c8504f
provides lines for the various .so modules
c8504f
- fixup distutils/unixccompiler.py to remove standard library path from rpath
c8504f
(patch 1, was Patch0 in ivazquez' python3000 specfile)
c8504f
- split out libraries into a -libs subpackage
c8504f
- update summaries and descriptions, basing content on ivazquez' specfile
c8504f
- fixup executable permissions on .py, .xpm and .xbm files, based on work in
c8504f
ivazquez's specfile
c8504f
- get rid of DOS batch files
c8504f
- fixup permissions for shared libraries from non-standard 555 to standard 755
c8504f
- move /usr/bin/python*-config to the -devel subpackage
c8504f
- mark various directories as being documentation
c8504f
c8504f
* Thu Sep 24 2009 Andrew McNabb <amcnabb@mcnabbs.org> 3.1.1-1
c8504f
- Initial package for Python 3.
c8504f