4f38fe
# ======================================================
4f38fe
# Conditionals and other variables controlling the build
4f38fe
# ======================================================
4f38fe
0626de
%{!?__python_ver:%global __python_ver EMPTY}
c6247f
#global __python_ver 27
0626de
%global unicode ucs4
cvsdist e0fde9
0626de
%global _default_patch_fuzz 2
643544
cvsdist 64c8a9
%if "%{__python_ver}" != "EMPTY"
0626de
%global main_python 0
0626de
%global python python%{__python_ver}
0626de
%global tkinter tkinter%{__python_ver}
cvsdist e0fde9
%else
0626de
%global main_python 1
0626de
%global python python
0626de
%global tkinter tkinter
cvsdist e0fde9
%endif
cvsdist e0fde9
c6247f
%global pybasever 2.7
05912b
%global pylibdir %{_libdir}/python%{pybasever}
05912b
%global tools_dir %{pylibdir}/Tools
05912b
%global demo_dir %{pylibdir}/Demo
05912b
%global doc_tools_dir %{pylibdir}/Doc/tools
05912b
%global dynload_dir %{pylibdir}/lib-dynload
05912b
%global site_packages %{pylibdir}/site-packages
cvsdist e0fde9
32b703
# Python's configure script defines SOVERSION, and this is used in the Makefile
32b703
# to determine INSTSONAME, the name of the libpython DSO:
32b703
#   LDLIBRARY='libpython$(VERSION).so'
32b703
#   INSTSONAME="$LDLIBRARY".$SOVERSION
32b703
# We mirror this here in order to make it easier to add the -gdb.py hooks.
32b703
# (if these get out of sync, the payload of the libs subpackage will fail
32b703
# and halt the build)
32b703
%global py_SOVERSION 1.0
f020ab
%global py_INSTSONAME_optimized libpython%{pybasever}.so.%{py_SOVERSION}
f020ab
%global py_INSTSONAME_debug     libpython%{pybasever}_d.so.%{py_SOVERSION}
32b703
f078d6
%global with_debug_build 1
f078d6
5810c5
# Disabled for now:
5810c5
%global with_huntrleaks 0
5810c5
b25d60
%global with_gdb_hooks 1
b25d60
cff1b4
%global with_systemtap 1
4bb3fe
6ad7fb
# some arches don't have valgrind so we need to disable its support on them
b6f774
%ifarch %{ix86} x86_64 ppc %{power64} s390x
000d17
%global with_valgrind 1
382340
%else
382340
%global with_valgrind 0
000d17
%endif
000d17
05e831
%global with_gdbm 1
5764ad
bc10ab
# Turn this to 0 to turn off the "check" phase:
bc10ab
%global run_selftest_suite 1
bc10ab
4bb3fe
# Some of the files below /usr/lib/pythonMAJOR.MINOR/test  (e.g. bad_coding.py)
4bb3fe
# are deliberately invalid, leading to SyntaxError exceptions if they get
4bb3fe
# byte-compiled.
4bb3fe
#
4bb3fe
# These errors are ignored by the normal python build, and aren't normally a
4bb3fe
# problem in the buildroots since /usr/bin/python isn't present.
4bb3fe
# 
4bb3fe
# However, for the case where we're rebuilding the python srpm on a machine
4bb3fe
# that does have python installed we need to set this to avoid
4bb3fe
# brp-python-bytecompile treating these as fatal errors:
4bb3fe
#
4bb3fe
%global _python_bytecompile_errors_terminate_build 0
4bb3fe
c6247f
# We need to get a newer configure generated out of configure.in for the following
c6247f
# patches:
c6247f
#   patch 4 (CFLAGS)
c6247f
#   patch 52 (valgrind)
c6247f
#   patch 55 (systemtap)
bc10ab
#   patch 145 (linux2)
c6247f
# 
c6247f
# For patch 55 (systemtap), we need to get a new header for configure to use
c6247f
#
c6247f
# configure.in requires autoconf-2.65, but the version in Fedora is currently
c6247f
# autoconf-2.66
c6247f
#
c6247f
# For now, we'll generate a patch to the generated configure script and
c6247f
# pyconfig.h.in on a machine that has a local copy of autoconf 2.65
c6247f
#
c6247f
# Instructions on obtaining such a copy can be seen at
c6247f
#   http://bugs.python.org/issue7997
c6247f
#
c6247f
# To make it easy to regenerate the patch, this specfile can be run in two
c6247f
# ways:
c6247f
# (i) regenerate_autotooling_patch  0 : the normal approach: prep the
c6247f
# source tree using a pre-generated patch to the "configure" script, and do a
c6247f
# full build
c6247f
# (ii) regenerate_autotooling_patch 1 : intended to be run on a developer's
c6247f
# workstation: prep the source tree without patching configure, then rerun a
c6247f
# local copy of autoconf-2.65, regenerate the patch, then exit, without doing
c6247f
# the rest of the build
c6247f
%global regenerate_autotooling_patch 0
c6247f
4f38fe
4f38fe
# ==================
4f38fe
# Top-level metadata
4f38fe
# ==================
a7ef9c
Summary: An interpreted, interactive, object-oriented programming language
cvsdist e0fde9
Name: %{python}
71fe1b
# Remember to also rebase python-docs when changing this:
b0a6ae
Version: 2.7.3
b6f774
# For Fedora 17 maintenance, keep the "Release" of the form 7.n so that
b6f774
# it is < that of Fedora 18:
07c4ce
Release: 7.2%{?dist}
2d954f
License: Python
cvsdist e4efab
Group: Development/Languages
2ec5b3
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
cvsdist d855cb
Provides: python-abi = %{pybasever}
jbj 8e4b82
Provides: python(abi) = %{pybasever}
4f38fe
4f38fe
4f38fe
# =======================
4f38fe
# Build-time requirements
4f38fe
# =======================
4f38fe
4f38fe
# (keep this list alphabetized)
4f38fe
4f38fe
BuildRequires: autoconf
4f38fe
BuildRequires: bzip2
4f38fe
BuildRequires: bzip2-devel
4fe005
%if 0%{?fedora} < 18
4f38fe
BuildRequires: db4-devel >= 4.8
4fe005
%endif
067ca1
067ca1
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
067ca1
# it (in pyexpat) in order to enable the fix in Python-2.7.3 for CVE-2012-0876:
067ca1
BuildRequires: expat-devel >= 2.1.0
067ca1
4f38fe
BuildRequires: findutils
4f38fe
BuildRequires: gcc-c++
5764ad
%if %{with_gdbm}
4f38fe
BuildRequires: gdbm-devel
5764ad
%endif
4f38fe
BuildRequires: glibc-devel
4f38fe
BuildRequires: gmp-devel
4fe005
%if 0%{?fedora} >= 18
4fe005
BuildRequires: libdb4-devel
4fe005
%endif
4f38fe
BuildRequires: libffi-devel
4f38fe
BuildRequires: libGL-devel
4f38fe
BuildRequires: libX11-devel
4f38fe
BuildRequires: ncurses-devel
4f38fe
BuildRequires: openssl-devel
4f38fe
BuildRequires: pkgconfig
4f38fe
BuildRequires: readline-devel
4f38fe
BuildRequires: sqlite-devel
4f38fe
4f38fe
%if 0%{?with_systemtap}
4f38fe
BuildRequires: systemtap-sdt-devel
4f38fe
# (this introduces a circular dependency, in that systemtap-sdt-devel's
4f38fe
# /usr/bin/dtrace is a python script)
4f38fe
%global tapsetdir      /usr/share/systemtap/tapset
4f38fe
%endif # with_systemtap
4f38fe
4f38fe
BuildRequires: tar
4f38fe
BuildRequires: tcl-devel
4f38fe
BuildRequires: tix-devel
4f38fe
BuildRequires: tk-devel
4f38fe
4f38fe
%if 0%{?with_valgrind}
4f38fe
BuildRequires: valgrind-devel
4f38fe
%endif
4f38fe
4f38fe
BuildRequires: zlib-devel
4f38fe
4f38fe
4f38fe
4f38fe
# =======================
4f38fe
# Source code and patches
4f38fe
# =======================
4f38fe
0473b0
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
60b7a5
4bb3fe
# Work around bug 562906 until it's fixed in rpm-build by providing a fixed
4bb3fe
# version of pythondeps.sh:
4bb3fe
Source2: pythondeps.sh
4bb3fe
%global __python_requires %{SOURCE2}
4bb3fe
3dde1c
# Systemtap tapset to make it easier to use the systemtap static probes
3dde1c
# (actually a template; LIBRARY_PATH will get fixed up during install)
3dde1c
# Written by dmalcolm; not yet sent upstream
3dde1c
Source3: libpython.stp
3dde1c
3dde1c
3dde1c
# Example systemtap script using the tapset
3dde1c
# Written by wcohen, mjw, dmalcolm; not yet sent upstream
3dde1c
Source4: systemtap-example.stp
3dde1c
c22243
# Another example systemtap script that uses the tapset
c22243
# Written by dmalcolm; not yet sent upstream
c22243
Source5: pyfuntop.stp
4bb3fe
85867c
# Supply various useful macros for building python 2 modules:
85867c
#  __python2, python2_sitelib, python2_sitearch, python2_version
85867c
Source6: macros.python2
85867c
85867c
9b458a
# Modules/Setup.dist is ultimately used by the "makesetup" script to construct
9b458a
# the Makefile and config.c
9b458a
#
9b458a
# Upstream leaves many things disabled by default, to try to make it easy as
9b458a
# possible to build the code on as many platforms as possible.
9b458a
#
9b458a
# TODO: many modules can also now be built by setup.py after the python binary
9b458a
# has been built; need to assess if we should instead build things there
9b458a
#
9b458a
# We patch it downstream as follows:
9b458a
#   - various modules are built by default by upstream as static libraries;
9b458a
#   we built them as shared libraries
9b458a
#   - build the "readline" module (appears to also be handled by setup.py now)
9b458a
#   - enable the build of the following modules:
9b458a
#     - array arraymodule.c	# array objects
9b458a
#     - cmath cmathmodule.c # -lm # complex math library functions
9b458a
#     - math mathmodule.c # -lm # math library functions, e.g. sin()
9b458a
#     - _struct _struct.c	# binary structure packing/unpacking
9b458a
#     - time timemodule.c # -lm # time operations and variables
9b458a
#     - operator operator.c	# operator.add() and similar goodies
9b458a
#     - _weakref _weakref.c	# basic weak reference support
9b458a
#     - _testcapi _testcapimodule.c    # Python C API test module
9b458a
#     - _random _randommodule.c	# Random number generator
9b458a
#     - _collections _collectionsmodule.c # Container types
9b458a
#     - itertools itertoolsmodule.c
9b458a
#     - strop stropmodule.c
9b458a
#     - _functools _functoolsmodule.c
9b458a
#     - _bisect _bisectmodule.c	# Bisection algorithms
9b458a
#     - unicodedata unicodedata.c    # static Unicode character database
9b458a
#     - _locale _localemodule.c
9b458a
#     - fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
9b458a
#     - spwd spwdmodule.c		# spwd(3) 
9b458a
#     - grp grpmodule.c		# grp(3)
9b458a
#     - select selectmodule.c	# select(2); not on ancient System V
9b458a
#     - mmap mmapmodule.c  # Memory-mapped files
9b458a
#     - _csv _csv.c  # CSV file helper
9b458a
#     - _socket socketmodule.c  # Socket module helper for socket(2)
9b458a
#     - _ssl _ssl.c
9b458a
#     - crypt cryptmodule.c -lcrypt	# crypt(3)
9b458a
#     - nis nismodule.c -lnsl	# Sun yellow pages -- not everywhere
9b458a
#     - termios termios.c	# Steen Lumholt's termios module
9b458a
#     - resource resource.c	# Jeremy Hylton's rlimit interface
9b458a
#     - audioop audioop.c	# Operations on audio samples
9b458a
#     - imageop imageop.c	# Operations on images
9b458a
#     - _md5 md5module.c md5.c
9b458a
#     - _sha shamodule.c
9b458a
#     - _sha256 sha256module.c
9b458a
#     - _sha512 sha512module.c
9b458a
#     - linuxaudiodev linuxaudiodev.c
9b458a
#     - timing timingmodule.c
9b458a
#     - _tkinter _tkinter.c tkappinit.c
9b458a
#     - dl dlmodule.c
9b458a
#     - gdbm gdbmmodule.c
9b458a
#     - _bsddb _bsddb.c
9b458a
#     - binascii binascii.c
9b458a
#     - parser parsermodule.c
9b458a
#     - cStringIO cStringIO.c
9b458a
#     - cPickle cPickle.c
9b458a
#     - zlib zlibmodule.c
9b458a
#     - _multibytecodec cjkcodecs/multibytecodec.c
9b458a
#     - _codecs_cn cjkcodecs/_codecs_cn.c
9b458a
#     - _codecs_hk cjkcodecs/_codecs_hk.c
9b458a
#     - _codecs_iso2022 cjkcodecs/_codecs_iso2022.c
9b458a
#     - _codecs_jp cjkcodecs/_codecs_jp.c
9b458a
#     - _codecs_kr cjkcodecs/_codecs_kr.c
9b458a
#     - _codecs_tw cjkcodecs/_codecs_tw.c
4b97ee
Patch0: python-2.7.1-config.patch
9b458a
9b458a
# Removes the "-g" option from "pydoc", for some reason; I believe
9b458a
# (dmalcolm 2010-01-29) that this was introduced in this change:
9b458a
# - fix pydoc (#68082)
9b458a
# in 2.2.1-12 as a response to the -g option needing TkInter installed
9b458a
# (Red Hat Linux 8)
9b458a
# Not upstream
60b7a5
Patch1: Python-2.2.1-pydocnogui.patch
94e658
9b458a
# Add $(CFLAGS) to the linker arguments when linking the "python" binary
9b458a
# since some architectures (sparc64) need this (rhbz:199373).
9b458a
# Not yet filed upstream
440a06
Patch4: python-2.5-cflags.patch
9b458a
9b458a
# Work around a bug in Python' gettext module relating to the "Plural-Forms"
9b458a
# header (rhbz:252136)
9b458a
# Related to upstream issues:
9b458a
#   http://bugs.python.org/issue1448060 and http://bugs.python.org/issue1475523
9b458a
# though the proposed upstream patches are, alas, different
b7dfd0
Patch6: python-2.5.1-plural-fix.patch
9b458a
9b458a
# This patch was listed in the changelog as: 
9b458a
#  * Fri Sep 14 2007 Jeremy Katz <katzj@redhat.com> - 2.5.1-11
9b458a
#  - fix encoding of sqlite .py files to work around weird encoding problem 
9b458a
#  in Turkish (#283331)
9b458a
# A traceback attached to rhbz 244016 shows the problem most clearly: a
9b458a
# traceback on attempting to import the sqlite module, with:
9b458a
#   "SyntaxError: encoding problem: with BOM (__init__.py, line 1)"
9b458a
# This seems to come from Parser/tokenizer.c:check_coding_spec
9b458a
# Our patch changes two source files within sqlite3, removing the
9b458a
# "coding: ISO-8859-1" specs and character E4 = U+00E4 = 
9b458a
# LATIN SMALL LETTER A WITH DIAERESIS from in ghaering's surname. 
9b458a
#
9b458a
# It may be that the conversion of "ISO-8859-1" to "iso-8859-1" is thwarted
9b458a
# by the implementation of "tolower" in the Turkish locale; see:
9b458a
#   https://bugzilla.redhat.com/show_bug.cgi?id=191096#c9
9b458a
# 
9b458a
# TODO: Not yet sent upstream, and appears to me (dmalcolm 2010-01-29) that
9b458a
# it may be papering over a symptom
e574c7
Patch7: python-2.5.1-sqlite-encoding.patch
9b458a
9b458a
# FIXME: Lib/ctypes/util.py posix implementation defines a function
9b458a
# _get_soname(f).  Upstreams's implementation of this uses objdump to read the
9b458a
# SONAME from a library; we avoid this, apparently to minimize space
9b458a
# requirements on the live CD:
9b458a
# (rhbz:307221)
c6247f
Patch10: python-2.7rc1-binutils-no-dep.patch
9b458a
b0a6ae
# Upstream as of Python 2.7.3:
b0a6ae
#  Patch11: python-2.7rc1-codec-ascii-tolower.patch
9b458a
9b458a
# Add various constants to the socketmodule (rhbz#436560):
9b458a
# TODO: these patches were added in 2.5.1-22 and 2.5.1-24 but appear not to
9b458a
# have been sent upstream yet:
c6247f
Patch13: python-2.7rc1-socketmodule-constants.patch
c6247f
Patch14: python-2.7rc1-socketmodule-constants2.patch
9b458a
9b458a
# Remove an "-rpath $(LIBDIR)" argument from the linkage args in configure.in:
9b458a
# FIXME: is this for OSF, not Linux?
a7ef9c
Patch16: python-2.6-rpath.patch
60b7a5
f5df1f
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
f5df1f
# Adapted from Patch0 in ivazquez' python3000 specfile, removing usage of
f5df1f
# super() as it's an old-style class
f5df1f
Patch17: python-2.6.4-distutils-rpath.patch
f5df1f
c6247f
# Patch setup.py so that it links against db-4.8:
562f19
Patch54: python-2.6.4-setup-db48.patch
562f19
6ad7fb
# 00055 #
5ae15c
# Systemtap support: add statically-defined probe points
5ae15c
# Patch based on upstream bug: http://bugs.python.org/issue4111
c22243
# fixed up by mjw and wcohen for 2.6.2, then fixed up by dmalcolm for 2.6.4
c6247f
# then rewritten by mjw (attachment 390110 of rhbz 545179), then reformatted
c6247f
# for 2.7rc1 by dmalcolm:
e16547
Patch55: 00055-systemtap.patch
5ae15c
9b458a
# "lib64 patches"
9b458a
# This patch seems to be associated with bug 122304, which was
9b458a
#  http://sourceforge.net/tracker/?func=detail&atid=105470&aid=931848&group_id=5470
9b458a
# and is now
9b458a
#  http://bugs.python.org/issue931848
9b458a
# However, as it stands this patch is merely a copy of:
9b458a
#  http://svn.python.org/view/python/trunk/Lib/test/test_re.py?r1=35825&r2=35824&pathrev=35825
9b458a
# which is already upstream
a95ca8
# Earlier versions of the patch (from the "dist-pkgs" CVS repo within RH)
a95ca8
# contained additional changes that applied fixes to the internals of the regex
a95ca8
# module, but these appear to have all been applied as part of 
a95ca8
#  http://bugs.python.org/issue931848
60b7a5
Patch101: python-2.3.4-lib64-regex.patch
9b458a
9b458a
# Only used when "%{_lib}" == "lib64"
9b458a
# Fixup various paths throughout the build and in distutils from "lib" to "lib64",
9b458a
# and add the /usr/lib64/pythonMAJOR.MINOR/site-packages to sitedirs, in front of
9b458a
# /usr/lib/pythonMAJOR.MINOR/site-packages
9b458a
# Not upstream
b0a6ae
Patch102: python-2.7.3-lib64.patch
c6247f
c6247f
# Python 2.7 split out much of the path-handling from distutils/sysconfig.py to
c6247f
# a new sysconfig.py (in r77704).
c6247f
# We need to make equivalent changes to that new file to ensure that the stdlib
c6247f
# and platform-specific code go to /usr/lib64 not /usr/lib, on 64-bit archs:
c6247f
Patch103: python-2.7-lib64-sysconfig.patch
cvsdist 20402f
6ad7fb
# 00104 #
866e92
# Only used when "%{_lib}" == "lib64"
866e92
# Another lib64 fix, for distutils/tests/test_install.py; not upstream:
866e92
Patch104: 00104-lib64-fix-for-test_install.patch
866e92
6ad7fb
# 00111 #
3fdd60
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
3fdd60
# a libpythonMAJOR.MINOR.a (bug 550692):
48617b
# Downstream only: not appropriate for upstream
e16547
Patch111: 00111-no-static-lib.patch
3fdd60
6ad7fb
# 00112 #
f020ab
# Patch to support building both optimized vs debug stacks DSO ABIs, sharing
f020ab
# the same .py and .pyc files, using "_d.so" to signify a debug build of an
f020ab
# extension module.
f020ab
#
f020ab
# Based on Debian's patch for the same, 
f020ab
#  http://patch-tracker.debian.org/patch/series/view/python2.6/2.6.5-2/debug-build.dpatch
f020ab
# 
f020ab
# (which was itself based on the upstream Windows build), but with some
f020ab
# changes:
f020ab
#
f020ab
#   * Debian's patch to dynload_shlib.c looks for module_d.so, then module.so,
f020ab
# but this can potentially find a module built against the wrong DSO ABI.  We
f020ab
# instead search for just module_d.so in a debug build
f020ab
#
f020ab
#   * We remove this change from configure.in's build of the Makefile:
f020ab
#   SO=$DEBUG_EXT.so
f020ab
# so that sysconfig.py:customize_compiler stays with shared_lib_extension='.so'
f020ab
# on debug builds, so that UnixCCompiler.find_library_file can find system
f020ab
# libraries (otherwise "make sharedlibs" fails to find system libraries,
f020ab
# erroneously looking e.g. for "libffi_d.so" rather than "libffi.so")
f020ab
#
f020ab
#   * We change Lib/distutils/command/build_ext.py:build_ext.get_ext_filename
f020ab
# to add the _d there, when building an extension.  This way, "make sharedlibs"
f020ab
# can build ctypes, by finding the sysmtem libffi.so (rather than failing to
f020ab
# find "libffi_d.so"), and builds the module as _ctypes_d.so
f020ab
#   
f020ab
#   * Similarly, update build_ext:get_libraries handling of Py_ENABLE_SHARED by
f020ab
# appending "_d" to the python library's name for the debug configuration
f020ab
#
f020ab
#   * We modify Modules/makesetup to add the "_d" to the generated Makefile
f020ab
# rules for the various Modules/*.so targets
f020ab
#
f020ab
# This may introduce issues when building an extension that links directly
f020ab
# against another extension (e.g. users of NumPy?), but seems more robust when
f020ab
# searching for external libraries
f020ab
#
f020ab
#   * We don't change Lib/distutils/command/build.py: build.build_purelib to
f020ab
# embed plat_specifier, leaving it as is, as pure python builds should be
f020ab
# unaffected by these differences (we'll be sharing the .py and .pyc files)
f020ab
#
f020ab
#   * We introduce DEBUG_SUFFIX as well as DEBUG_EXT:
f020ab
#     - DEBUG_EXT is used by ELF files (names and SONAMEs); it will be "_d" for
f020ab
# a debug build
f020ab
#     - DEBUG_SUFFIX is used by filesystem paths; it will be "-debug" for a
f020ab
# debug build
f020ab
#
f020ab
#   Both will be empty in an optimized build.  "_d" contains characters that
f020ab
# are valid ELF metadata, but this leads to various ugly filesystem paths (such
f020ab
# as the include path), and DEBUG_SUFFIX allows these paths to have more natural
f020ab
# names.  Changing this requires changes elsewhere in the distutils code.
f020ab
#
f020ab
#   * We add DEBUG_SUFFIX to PYTHON in the Makefile, so that the two
f020ab
# configurations build parallel-installable binaries with different names
f020ab
# ("python-debug" vs "python").
f020ab
#
f020ab
#   * Similarly, we add DEBUG_SUFFIX within python-config and
f020ab
#  python$(VERSION)-config, so that the two configuration get different paths
f020ab
#  for these.
73e351
#
73e351
#  See also patch 130 below
73e351
#
b0a6ae
Patch112: python-2.7.3-debug-build.patch
50ca18
ab11e4
6ad7fb
# 00113 #
ab11e4
# Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options
ab11e4
# described at http://svn.python.org/projects/python/trunk/Misc/SpecialBuilds.txt
ab11e4
# so that if they are enabled, they will be in that build's pyconfig.h, so that
ab11e4
# extension modules will reliably use them
48617b
# Not yet sent upstream
e16547
Patch113: 00113-more-configuration-flags.patch
ab11e4
6ad7fb
# 00114 #
1b84fe
# Add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
1b84fe
# (rhbz:553020); partially upstream as http://bugs.python.org/issue7647
48617b
# Not yet sent upstream
e16547
Patch114: 00114-statvfs-f_flag-constants.patch
1b84fe
b0a6ae
# Upstream as of Python 2.7.3:
b0a6ae
#  Patch115: make-pydoc-more-robust-001.patch
96cf82
c6247f
# Upstream r79310 removed the "Modules" directory from sys.path when Python is
c6247f
# running from the build directory on POSIX to fix a unit test (issue #8205).
c6247f
# This seems to have broken the compileall.py done in "make install": it cannot
c6247f
# find shared library extension modules at this point in the build (sys.path
c6247f
# does not contain DESTDIR/usr/lib(64)/python-2.7/lib-dynload for some reason),
c6247f
# leading to the build failing with:
c6247f
# Traceback (most recent call last):
c6247f
#   File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/compileall.py", line 17, in <module>
c6247f
#     import struct
c6247f
#   File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/struct.py", line 1, in <module>
c6247f
#    from _struct import *
c6247f
# ImportError: No module named _struct
c6247f
#
c6247f
# For now, revert this patch:
c6247f
Patch121: python-2.7rc2-r79310.patch
c6247f
6ad7fb
# 00125 #
5810c5
# COUNT_ALLOCS is useful for debugging, but the upstream behaviour of always
5810c5
# emitting debug info to stdout on exit is too verbose and makes it harder to
5810c5
# use the debug build.  Add a "PYTHONDUMPCOUNTS" environment variable which
5810c5
# must be set to enable the output on exit
48617b
# Not yet sent upstream
e16547
Patch125: 00125-less-verbose-COUNT_ALLOCS.patch
5810c5
e8c4a5
# Fix dbm module on big-endian 64-bit
e8c4a5
# Sent upstream as http://bugs.python.org/issue9687 (rhbz#626756)
e8c4a5
Patch126: fix-dbm_contains-on-64bit-bigendian.patch
e8c4a5
edea14
# Fix test_structmember on big-endian 64-bit
edea14
# Sent upstream as http://bugs.python.org/issue9960
edea14
Patch127: fix-test_structmember-on-64bit-bigendian.patch
edea14
4b97ee
# 2.7.1 (in r84230) added a test to test_abc which fails if python is
4b97ee
# configured with COUNT_ALLOCS, which is the case for our debug build
4b97ee
# (the COUNT_ALLOCS instrumentation keeps "C" alive).
4b97ee
# Not yet sent upstream
4b97ee
Patch128: python-2.7.1-fix_test_abc_with_COUNT_ALLOCS.patch
4b97ee
6ad7fb
# 00130 #
73e351
# Add "--extension-suffix" option to python-config and python-debug-config
73e351
# (rhbz#732808)
73e351
#
73e351
# This is adapted from 3.2's PEP-3149 support.
73e351
#
73e351
# Fedora's debug build has some non-standard features (see also patch 112
73e351
# above), though largely shared with Debian/Ubuntu and Windows
73e351
#
73e351
# In particular, SO in the Makefile is currently always just ".so" for our
73e351
# python 2 optimized builds, but for python 2 debug it should be '_d.so', to
73e351
# distinguish the debug vs optimized ABI, following the pattern in the above
73e351
# patch.
73e351
#
73e351
# Not yet sent upstream
73e351
Patch130: python-2.7.2-add-extension-suffix-to-python-config.patch
73e351
6ad7fb
# 00131 #
e25252
# The four tests in test_io built on top of check_interrupted_write_retry
e25252
# fail when built in Koji, for ppc and ppc64; for some reason, the SIGALRM
e25252
# handlers are never called, and the call to write runs to completion
e25252
# (rhbz#732998)
e16547
Patch131: 00131-disable-tests-in-test_io.patch
e25252
6ad7fb
# 00132 #
866e92
# Add non-standard hooks to unittest for use in the "check" phase below, when
866e92
# running selftests within the build:
866e92
#   @unittest._skipInRpmBuild(reason)
866e92
# for tests that hang or fail intermittently within the build environment, and:
866e92
#   @unittest._expectedFailureInRpmBuild
866e92
# for tests that always fail within the build environment
866e92
#
866e92
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the
866e92
# environment, which we set manually in the appropriate portion of the "check"
866e92
# phase below (and which potentially other python-* rpms could set, to reuse
866e92
# these unittest hooks in their own "check" phases)
866e92
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
866e92
6ad7fb
# 00133 #
866e92
# "dl" is deprecated, and test_dl doesn't work on 64-bit builds:
866e92
Patch133: 00133-skip-test_dl.patch
866e92
6ad7fb
# 00134 #
866e92
# Fix a failure in test_sys.py when configured with COUNT_ALLOCS enabled
866e92
# Not yet sent upstream
866e92
Patch134: 00134-fix-COUNT_ALLOCS-failure-in-test_sys.patch
866e92
6ad7fb
# 00135 #
866e92
# Skip "test_callback_in_cycle_resurrection" in a debug build, where it fails:
866e92
# Not yet sent upstream
866e92
Patch135: 00135-skip-test-within-test_weakref-in-debug-build.patch
866e92
6ad7fb
# 00136 #
866e92
# Some tests try to seek on sys.stdin, but don't work as expected when run
866e92
# within Koji/mock; skip them within the rpm build:
866e92
Patch136: 00136-skip-tests-of-seeking-stdin-in-rpmbuild.patch
866e92
6ad7fb
# 00137 #
866e92
# Some tests within distutils fail when run in an rpmbuild:
866e92
Patch137: 00137-skip-distutils-tests-that-fail-in-rpmbuild.patch
866e92
6ad7fb
# 00138 #
866e92
# Fixup some tests within distutils to work with how debug builds are set up:
866e92
Patch138: 00138-fix-distutils-tests-in-debug-build.patch
866e92
6ad7fb
# 00139 #
866e92
# ARM-specific: skip known failure in test_float:
866e92
#  http://bugs.python.org/issue8265 (rhbz#706253)
866e92
Patch139: 00139-skip-test_float-known-failure-on-arm.patch
866e92
6ad7fb
# 00140 #
866e92
# Sparc-specific: skip known failure in test_ctypes:
866e92
#  http://bugs.python.org/issue8314 (rhbz#711584)
866e92
# which appears to be a libffi bug
866e92
Patch140: 00140-skip-test_ctypes-known-failure-on-sparc.patch
866e92
6ad7fb
# 00141 #
866e92
# Fix test_gc's test_newinstance case when configured with COUNT_ALLOCS:
48617b
# Not yet sent upstream
866e92
Patch141: 00141-fix-test_gc_with_COUNT_ALLOCS.patch
866e92
6ad7fb
# 00142 #
866e92
# Some pty tests fail when run in mock (rhbz#714627):
866e92
Patch142: 00142-skip-failing-pty-tests-in-rpmbuild.patch
866e92
6ad7fb
# 00143 #
e16547
# Fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid
e16547
# aliasing violations (rhbz#698726)
e16547
# Sent upstream as http://bugs.python.org/issue12872
e16547
Patch143: 00143-tsc-on-ppc.patch
e16547
6ad7fb
# 00144 #
5764ad
# (Optionally) disable the gdbm module:
5764ad
Patch144: 00144-no-gdbm.patch
5764ad
6ad7fb
# 00145 #
b0a6ae
# Upstream as of Python 2.7.3:
b0a6ae
#  Patch145: 00145-force-sys-platform-to-be-linux2.patch
bc10ab
6ad7fb
# 00146 #
991332
# Support OpenSSL FIPS mode (e.g. when OPENSSL_FORCE_FIPS_MODE=1 is set)
991332
# - handle failures from OpenSSL (e.g. on attempts to use MD5 in a
991332
#   FIPS-enforcing environment)
991332
# - add a new "usedforsecurity" keyword argument to the various digest
991332
#   algorithms in hashlib so that you can whitelist a callsite with
991332
#   "usedforsecurity=False"
991332
# (sent upstream for python 3 as http://bugs.python.org/issue9216; this is a
991332
# backport to python 2.7; see RHEL6 patch 119)
991332
# - enforce usage of the _hashlib implementation: don't fall back to the _md5
991332
#   and _sha* modules (leading to clearer error messages if fips selftests
991332
#   fail)
991332
# - don't build the _md5 and _sha* modules; rely on the _hashlib implementation
991332
#   of hashlib (for example, md5.py will use _hashlib's implementation of MD5,
991332
#   if permitted by the FIPS setting)
991332
# (rhbz#563986)
991332
Patch146: 00146-hashlib-fips.patch
991332
6ad7fb
# 00147 #
a43d18
# Add a sys._debugmallocstats() function
a43d18
# Based on patch 202 from RHEL 5's python.spec, with updates from rhbz#737198
e85703
# Sent upstream as http://bugs.python.org/issue14785
a43d18
Patch147: 00147-add-debug-malloc-stats.patch
a43d18
6ad7fb
# 00148 #
b0a6ae
# Upstream as of Python 2.7.3:
b0a6ae
#  Patch148: 00148-gdbm-1.9-magic-values.patch
05e831
6ad7fb
# 00149 #
df914e
# python3.spec's
df914e
#   Patch149: 00149-backport-issue11254-pycache-bytecompilation-fix.patch
df914e
# is not relevant for Python 2
df914e
6ad7fb
# 00150 #
cd5070
# python3.spec has:
cd5070
#  Patch150: 00150-disable-rAssertAlmostEqual-cmath-on-ppc.patch
cd5070
# as a workaround for a glibc bug on PPC (bz #750811)
cd5070
6ad7fb
# 00151 #
b0a6ae
# Upstream as of Python 2.7.3:
b0a6ae
#  Patch151: 00151-fork-deadlock.patch
b0a6ae
6ad7fb
# 00152 #
b0a6ae
# python3.spec has:
b0a6ae
#  Patch152: 00152-fix-test-gdb-regex.patch
b0a6ae
6ad7fb
# 00153 #
b0a6ae
# Strip out lines of the form "warning: Unable to open ..." from gdb's stderr
b0a6ae
# when running test_gdb.py; also cope with change to gdb in F17 onwards in
b0a6ae
# which values are printed as "v@entry" rather than just "v":
48617b
# Not yet sent upstream
b0a6ae
Patch153: 00153-fix-test_gdb-noise.patch
cd5070
6ad7fb
# 00154 #
7461fe
# python3.spec on f15 has:
7461fe
#  Patch154: 00154-skip-urllib-test-requiring-working-DNS.patch
7461fe
6ad7fb
# 00155 #
7461fe
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
7461fe
# generating SELinux denials on "import ctypes" and "import uuid" when
7461fe
# embedding Python within httpd (rhbz#814391)
7461fe
Patch155: 00155-avoid-ctypes-thunks.patch
7461fe
6ad7fb
# 00156 #
926168
# Recent builds of gdb will only auto-load scripts from certain safe
1fa9c8
# locations.  Turn off this protection when running test_gdb in the selftest
1fa9c8
# suite to ensure that it can load our -gdb.py script (rhbz#817072):
48617b
# Not yet sent upstream
926168
Patch156: 00156-gdb-autoload-safepath.patch
926168
07c4ce
# 00158
07c4ce
# This patch fixes a memory leak in _hashlib module, as reported in
07c4ce
# RHBZ #836285; upstream report http://bugs.python.org/issue15219.
07c4ce
# The patch has been accepted upstream, so this should be commented out
07c4ce
# when packaging next upstream release.
07c4ce
# The fix for Fedora specific "implement_specific_EVP_new()" function
07c4ce
# has been merged into patch 00146.
07c4ce
Patch158: 00158-fix-hashlib-leak.patch
07c4ce
4fe005
# From F18 on, there is a libdb4 package, that replaces db4. It places header
4fe005
# files in "/usr/include/libdb4", not in "/usr/include/db4", this patch
4fe005
# fixes this.
4fe005
# Downstream only modification.
4fe005
Patch159: 00159-correct-libdb-include-path.patch
4fe005
866e92
# (New patches go here ^^^)
866e92
#
866e92
# When adding new patches to "python" and "python3" in Fedora 17 onwards,
866e92
# please try to keep the patch numbers in-sync between the two specfiles:
866e92
#
866e92
#   - use the same patch number across both specfiles for conceptually-equivalent
866e92
#     fixes, ideally with the same name
866e92
#
05e831
#   - when a patch is relevant to both specfiles, use the same introductory
866e92
#     comment in both specfiles where possible (to improve "diff" output when
866e92
#     comparing them)
866e92
#
866e92
#   - when a patch is only relevant for one of the two specfiles, leave a gap
866e92
#     in the patch numbering in the other specfile, adding a comment when
866e92
#     omitting a patch, both in the manifest section here, and in the "prep"
866e92
#     phase below
866e92
#
866e92
# Hopefully this will make it easier to ensure that all relevant fixes are
866e92
# applied to both versions.
866e92
c6247f
# This is the generated patch to "configure"; see the description of
c6247f
#   %{regenerate_autotooling_patch}
c6247f
# above:
498957
Patch5000: 05000-autotool-intermediates.patch
468e2b
4f38fe
# ======================================================
4f38fe
# Additional metadata, and subpackages
4f38fe
# ======================================================
4f38fe
cvsdist 64c8a9
%if %{main_python}
cvsdist 64c8a9
Obsoletes: Distutils
cvsdist 64c8a9
Provides: Distutils
cvsdist e0fde9
Obsoletes: python2 
cvsdist e0fde9
Provides: python2 = %{version}
bca257
Obsoletes: python-elementtree <= 1.2.6
bca257
Obsoletes: python-sqlite < 2.3.2
bca257
Provides: python-sqlite = 2.3.2
7b2257
Obsoletes: python-ctypes < 1.0.1
7b2257
Provides: python-ctypes = 1.0.1
70aee9
Obsoletes: python-hashlib < 20081120
70aee9
Provides: python-hashlib = 20081120
70aee9
Obsoletes: python-uuid < 1.31
70aee9
Provides: python-uuid = 1.31
f81cc6
e36d6e
# python-sqlite2-2.3.5-5.fc18 was retired.  Obsolete the old package here
e36d6e
# so it gets uninstalled on updates
e36d6e
%if 0%{?fedora} >= 17
e36d6e
Obsoletes: python-sqlite2 <= 2.3.5-6
e36d6e
%endif
e36d6e
f81cc6
# python-argparse is part of python as of version 2.7
f81cc6
# drop this Provides in F17
f81cc6
# (having Obsoletes here caused problems with multilib; see rhbz#667984)
f81cc6
Provides:   python-argparse = %{version}-%{release}
cvsdist e0fde9
%endif
cvsdist 20402f
f3e7a4
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5ae15c
cvsdist 86d787
URL: http://www.python.org/
cvsdist e4efab
cvsdist e4efab
%description
cvsdist e4efab
Python is an interpreted, interactive, object-oriented programming
cvsdist e4efab
language often compared to Tcl, Perl, Scheme or Java. Python includes
cvsdist e4efab
modules, classes, exceptions, very high level dynamic data types and
cvsdist e4efab
dynamic typing. Python supports interfaces to many system calls and
cvsdist e4efab
libraries, as well as to various windowing systems (X11, Motif, Tk,
cvsdist e4efab
Mac and MFC).
cvsdist e4efab
cvsdist e4efab
Programmers can write new built-in modules for Python in C or C++.
cvsdist e4efab
Python can be used as an extension language for applications that need
2ec5b3
a programmable interface.
cvsdist e4efab
cvsdist e4efab
Note that documentation for Python is provided in the python-docs
cvsdist e4efab
package.
cvsdist e4efab
2ec5b3
This package provides the "python" executable; most of the actual
2ec5b3
implementation is within the "python-libs" package.
2ec5b3
87c8da
%package libs
2ec5b3
Summary: Runtime libraries for Python
87c8da
Group: Applications/System
2ec5b3
59062c
# Needed for ctypes, to load libraries, worked around for Live CDs size
59062c
# Requires: binutils
87c8da
067ca1
# expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
067ca1
# this symbol (in pyexpat), so we must explicitly state this dependency to
067ca1
# prevent "import pyexpat" from failing with a linker error if someone hasn't
067ca1
# yet upgraded expat:
067ca1
Requires: expat >= 2.1.0
067ca1
87c8da
%description libs
2ec5b3
This package contains runtime libraries for use by Python:
2ec5b3
- the libpython dynamic library, for use by applications that embed Python as
2ec5b3
a scripting language, and by the main "python" executable
2ec5b3
- the Python standard library
87c8da
cvsdist e4efab
%package devel
791e9f
Summary: The libraries and header files needed for Python development
cvsdist e4efab
Group: Development/Libraries
0626de
Requires: %{python}%{?_isa} = %{version}-%{release}
c6247f
Requires: pkgconfig
cvsdist 64c8a9
# Needed here because of the migration of Makefile from -devel to the main
cvsdist 64c8a9
# package
cvsdist 64c8a9
Conflicts: %{python} < %{version}-%{release}
cvsdist 64c8a9
%if %{main_python}
cvsdist e0fde9
Obsoletes: python2-devel
cvsdist 8caa1f
Provides: python2-devel = %{version}-%{release}
cvsdist e0fde9
%endif
cvsdist e4efab
cvsdist e4efab
%description devel
cvsdist e4efab
The Python programming language's interpreter can be extended with
cvsdist e4efab
dynamically loaded extensions and can be embedded in other programs.
cvsdist e4efab
This package contains the header files and libraries needed to do
cvsdist e4efab
these types of tasks.
cvsdist e4efab
cvsdist e4efab
Install python-devel if you want to develop Python extensions.  The
cvsdist e4efab
python package will also need to be installed.  You'll probably also
cvsdist e4efab
want to install the python-docs package, which contains Python
cvsdist e4efab
documentation.
cvsdist e4efab
cvsdist e4efab
%package tools
791e9f
Summary: A collection of development tools included with Python
cvsdist e4efab
Group: Development/Tools
cvsdist 8caa1f
Requires: %{name} = %{version}-%{release}
Mihai Ibanescu ce25e1
Requires: %{tkinter} = %{version}-%{release}
cvsdist 64c8a9
%if %{main_python}
cvsdist e0fde9
Obsoletes: python2-tools
cvsdist e0fde9
Provides: python2-tools = %{version}
cvsdist e0fde9
%endif
cvsdist e4efab
cvsdist e4efab
%description tools
902d91
This package includes several tools to help with the development of Python   
902d91
programs, including IDLE (an IDE with editing and debugging facilities), a 
902d91
color editor (pynche), and a python gettext program (pygettext.py).  
cvsdist e4efab
cvsdist 64c8a9
%package -n %{tkinter}
c22243
Summary: A graphical user interface for the Python scripting language
cvsdist e4efab
Group: Development/Languages
cvsdist 8caa1f
Requires: %{name} = %{version}-%{release}
cvsdist 64c8a9
%if %{main_python}
cvsdist e0fde9
Obsoletes: tkinter2
cvsdist e0fde9
Provides: tkinter2 = %{version}
cvsdist e0fde9
%endif
cvsdist e4efab
cvsdist 64c8a9
%description -n %{tkinter}
cvsdist e0fde9
cvsdist e4efab
The Tkinter (Tk interface) program is an graphical user interface for
cvsdist e4efab
the Python scripting language.
cvsdist e4efab
cvsdist e4efab
You should install the tkinter package if you'd like to use a graphical
cvsdist e4efab
user interface for Python programming.
cvsdist e4efab
860ed4
%package test
860ed4
Summary: The test modules from the main python package
860ed4
Group: Development/Languages
860ed4
Requires: %{name} = %{version}-%{release}
860ed4
860ed4
%description test
860ed4
791e9f
The test modules from the main python package: %{name}
860ed4
These have been removed to save space, as they are never or almost
860ed4
never used in production.
860ed4
860ed4
You might want to install the python-test package if you're developing python
860ed4
code that uses more than just unittest and/or test_support.py.
860ed4
f078d6
%if 0%{?with_debug_build}
f020ab
%package debug
f020ab
Summary: Debug version of the Python runtime
f020ab
Group: Applications/System
f020ab
f020ab
# The debug build is an all-in-one package version of the regular build, and
f020ab
# shares the same .py/.pyc files and directories as the regular build.  Hence
f020ab
# we depend on all of the subpackages of the regular build:
f020ab
Requires: %{name}%{?_isa} = %{version}-%{release}
f020ab
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
f020ab
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
f020ab
Requires: %{name}-test%{?_isa} = %{version}-%{release}
f020ab
Requires: tkinter%{?_isa} = %{version}-%{release}
f020ab
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
f020ab
f020ab
%description debug
f020ab
python-debug provides a version of the Python runtime with numerous debugging
f020ab
features enabled, aimed at advanced Python users, such as developers of Python
f020ab
extension modules.
f020ab
f020ab
This version uses more memory and will be slower than the regular Python build,
f020ab
but is useful for tracking down reference-counting issues, and other bugs.
f020ab
f020ab
The bytecodes are unchanged, so that .pyc files are compatible between the two
f020ab
version of Python, but the debugging features mean that C/C++ extension modules
f020ab
are ABI-incompatible with those built for the standard runtime.
f020ab
f020ab
It shares installation directories with the standard Python runtime, so that
f020ab
.py and .pyc files can be shared.  All compiled extension modules gain a "_d"
f020ab
suffix ("foo_d.so" rather than "foo.so") so that each Python implementation can
f020ab
load its own extensions.
f078d6
%endif # with_debug_build
f020ab
4f38fe
4f38fe
# ======================================================
4f38fe
# The prep phase of the build:
4f38fe
# ======================================================
4f38fe
cvsdist e4efab
%prep
60b7a5
%setup -q -n Python-%{version}
cvsdist e4efab
3dde1c
%if 0%{?with_systemtap}
3dde1c
# Provide an example of usage of the tapset:
3dde1c
cp -a %{SOURCE4} .
c22243
cp -a %{SOURCE5} .
3dde1c
%endif # with_systemtap
3dde1c
05912b
# Ensure that we're using the system copy of various libraries, rather than
05912b
# copies shipped by upstream in the tarball:
94e658
#   Remove embedded copy of expat:
94e658
rm -r Modules/expat || exit 1
94e658
05912b
#   Remove embedded copy of libffi:
0626de
for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx ; do
0626de
  rm -r Modules/_ctypes/$SUBDIR || exit 1 ;
0626de
done
0626de
05912b
#   Remove embedded copy of zlib:
05912b
rm -r Modules/zlib || exit 1
05912b
991332
# Don't build upstream Python's implementation of these crypto algorithms;
991332
# instead rely on _hashlib and OpenSSL.
991332
#
991332
# For example, in our builds md5.py uses always uses hashlib.md5 (rather than
991332
# falling back to _md5 when hashlib.md5 is not available); hashlib.md5 is
991332
# implemented within _hashlib via OpenSSL (and thus respects FIPS mode)
991332
for f in md5module.c md5.c shamodule.c sha256module.c sha512module.c; do
991332
    rm Modules/$f
991332
done
991332
05912b
#
05912b
# Apply patches:
05912b
#
cvsdist e0fde9
%patch0 -p1 -b .rhconfig
60b7a5
%patch1 -p1 -b .no_gui
440a06
%patch4 -p1 -b .cflags
b7dfd0
%patch6 -p1 -b .plural
e574c7
%patch7 -p1
60b7a5
860ed4
# Try not disabling egg-infos, bz#414711
860ed4
#patch50 -p1 -b .egginfo
12cb76
60b7a5
%patch101 -p1 -b .lib64-regex
a95ca8
%if "%{_lib}" == "lib64"
60b7a5
%patch102 -p1 -b .lib64
c6247f
%patch103 -p1 -b .lib64-sysconfig
866e92
%patch104 -p1
cvsdist 20402f
%endif
60b7a5
59062c
%patch10 -p1 -b .binutils-no-dep
b0a6ae
# patch11: upstream as of Python 2.7.3
b7ef3f
%patch13 -p1 -b .socketmodule
a7ef9c
%patch14 -p1 -b .socketmodule2
a7ef9c
%patch16 -p1 -b .rpath
f5df1f
%patch17 -p1 -b .distutils-rpath
59062c
562f19
%patch54 -p1 -b .setup-db48
c22243
%if 0%{?with_systemtap}
5ae15c
%patch55 -p1 -b .systemtap
c22243
%endif
5e852d
3fdd60
%patch111 -p1 -b .no-static-lib
3fdd60
f020ab
%patch112 -p1 -b .debug-build
f020ab
ab11e4
%patch113 -p1 -b .more-configuration-flags
ab11e4
1b84fe
%patch114 -p1 -b .statvfs-f-flag-constants
1b84fe
b0a6ae
# patch115: upstream as of Python 2.7.3
96cf82
c6247f
%patch121 -p0 -R
5810c5
%patch125 -p1 -b .less-verbose-COUNT_ALLOCS
e8c4a5
%patch126 -p0 -b .fix-dbm_contains-on-64bit-bigendian
b0a6ae
%patch127 -p1 -b .fix-test_structmember-on-64bit-bigendian
4b97ee
%patch128 -p1
e16547
73e351
%patch130 -p1
94e850
b6f774
%ifarch ppc %{power64}
e25252
%patch131 -p1
e25252
%endif
e25252
866e92
%patch132 -p1
866e92
%patch133 -p1
866e92
%patch134 -p1
866e92
%patch135 -p1
866e92
%patch136 -p1
866e92
%patch137 -p1
866e92
%patch138 -p1
866e92
%ifarch %{arm}
866e92
%patch139 -p1
866e92
%endif
866e92
%ifarch %{sparc}
866e92
%patch140 -p1
866e92
%endif
866e92
%patch141 -p1
866e92
%patch142 -p1
e16547
%patch143 -p1 -b .tsc-on-ppc
5764ad
%if !%{with_gdbm}
5764ad
%patch144 -p1
5764ad
%endif
b0a6ae
# 00145: upstream as of Python 2.7.3
991332
%patch146 -p1
a43d18
%patch147 -p1
b0a6ae
# 00148: upstream as of Python 2.7.3
df914e
# 00149: not for python 2
cd5070
# 00150: not for python 2
b0a6ae
# 00151: upstream as of Python 2.7.3
b0a6ae
# 00152: not for python 2
b0a6ae
%patch153 -p0
7461fe
# 00154: not for python 2
7461fe
%patch155 -p1
926168
%patch156 -p1
07c4ce
%patch158 -p1
4fe005
%if 0%{?fedora} >= 18
4fe005
%patch159 -p1 -F 3
4fe005
%endif
df914e
866e92
cvsdist e0fde9
# This shouldn't be necesarry, but is right now (2.2a3)
cvsdist e0fde9
find -name "*~" |xargs rm -f
cvsdist 6b969f
c6247f
%if ! 0%{regenerate_autotooling_patch}
c6247f
# Normally we apply the patch to "configure"
c6247f
# We don't apply the patch if we're working towards regenerating it
498957
%patch5000 -p0 -b .autotool-intermediates
c6247f
%endif
c6247f
4f38fe
4f38fe
# ======================================================
4f38fe
# Configuring and building the code:
4f38fe
# ======================================================
4f38fe
cvsdist e4efab
%build
791e9f
topdir=$(pwd)
94e850
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
94e850
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
791e9f
export CPPFLAGS="$(pkg-config --cflags-only-I libffi)"
94e850
export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
cvsdist d4a395
export LINKCC="gcc"
0473b0
export LDFLAGS="$RPM_LD_FLAGS"
cvsdist 20402f
if pkg-config openssl ; then
791e9f
  export CFLAGS="$CFLAGS $(pkg-config --cflags openssl)"
791e9f
  export LDFLAGS="$LDFLAGS $(pkg-config --libs-only-L openssl)"
cvsdist 20402f
fi
cvsdist d855cb
# Force CC
cvsdist d855cb
export CC=gcc
5ae15c
c6247f
%if 0%{regenerate_autotooling_patch}
c6247f
# If enabled, this code regenerates the patch to "configure", using a
c6247f
# local copy of autoconf-2.65, then exits the build
c6247f
#
c6247f
# The following assumes that the copy is installed to ~/autoconf-2.65/bin
c6247f
# as per these instructions:
c6247f
#   http://bugs.python.org/issue7997
c6247f
c6247f
for f in pyconfig.h.in configure ; do
c6247f
    cp $f $f.autotool-intermediates ;
c6247f
done
5ae15c
c6247f
# Rerun the autotools:
c6247f
PATH=~/autoconf-2.65/bin:$PATH autoconf
5ae15c
autoheader
5ae15c
c6247f
# Regenerate the patch:
498957
gendiff . .autotool-intermediates > %{PATCH5000}
c6247f
c6247f
c6247f
# Exit the build
c6247f
exit 1
c6247f
%endif
c6247f
f020ab
# Define a function, for how to perform a "build" of python for a given
f020ab
# configuration:
f020ab
BuildPython() {
f020ab
  ConfName=$1	      
f020ab
  BinaryName=$2
f020ab
  SymlinkName=$3
f020ab
  ExtraConfigArgs=$4
f020ab
  PathFixWithThisBinary=$5
f020ab
f020ab
  ConfDir=build/$ConfName
f020ab
f020ab
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName
f020ab
  mkdir -p $ConfDir
f020ab
f020ab
  pushd $ConfDir
f020ab
f020ab
  # Use the freshly created "configure" script, but in the directory two above:
f020ab
  %global _configure $topdir/configure
f020ab
3fdd60
%configure \
3fdd60
  --enable-ipv6 \
3fdd60
  --enable-shared \
f522dd
  --enable-unicode=%{unicode} \
f522dd
  --with-dbmliborder=gdbm:ndbm:bdb \
f522dd
  --with-system-expat \
3fdd60
  --with-system-ffi \
5ae15c
%if 0%{?with_systemtap}
5ae15c
  --with-dtrace \
5ae15c
  --with-tapset-install-dir=%{tapsetdir} \
5ae15c
%endif
f522dd
%if 0%{?with_valgrind}
f522dd
  --with-valgrind \
f522dd
%endif
f020ab
  $ExtraConfigArgs \
f020ab
  %{nil}
cvsdist e0fde9
970523
make EXTRA_CFLAGS="$CFLAGS" %{?_smp_mflags}
f020ab
f020ab
# We need to fix shebang lines across the full source tree.
f020ab
#
f020ab
# We do this using the pathfix.py script, which requires one of the
f020ab
# freshly-built Python binaries.
f020ab
#
f020ab
# We use the optimized python binary, and make the shebangs point at that same
f020ab
# optimized python binary:
f020ab
if $PathFixWithThisBinary
f020ab
then
b95f6c
  LD_LIBRARY_PATH="$topdir/$ConfDir" ./$BinaryName \
f020ab
    $topdir/Tools/scripts/pathfix.py \
f020ab
      -i "%{_bindir}/env $BinaryName" \
f020ab
      $topdir
f020ab
fi
f020ab
60b7a5
# Rebuild with new python
60b7a5
# We need a link to a versioned python in the build directory
f020ab
ln -s $BinaryName $SymlinkName
970523
LD_LIBRARY_PATH="$topdir/$ConfDir" PATH=$PATH:$topdir/$ConfDir make -s EXTRA_CFLAGS="$CFLAGS" %{?_smp_mflags}
f020ab
f020ab
  popd
f020ab
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir
f020ab
}
60b7a5
f020ab
# Use "BuildPython" to support building with different configurations:
60b7a5
f078d6
%if 0%{?with_debug_build}
f020ab
BuildPython debug \
f020ab
  python-debug \
f020ab
  python%{pybasever}-debug \
b6f774
%ifarch %{ix86} x86_64 ppc %{power64}
ab11e4
  "--with-pydebug --with-tsc --with-count-allocs --with-call-profile" \
0c63f1
%else
0c63f1
  "--with-pydebug --with-count-allocs --with-call-profile" \
0c63f1
%endif
f020ab
  false
f078d6
%endif # with_debug_build
f020ab
f020ab
BuildPython optimized \
f020ab
  python \
f020ab
  python%{pybasever} \
f020ab
  "" \
f020ab
  true
cvsdist e0fde9
4f38fe
4f38fe
# ======================================================
4f38fe
# Installing the built code:
4f38fe
# ======================================================
4f38fe
cvsdist e4efab
%install
f020ab
topdir=$(pwd)
791e9f
rm -rf %{buildroot}
791e9f
mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir}
cvsdist e0fde9
cvsdist 20402f
# Clean up patched .py files that are saved as .lib64
cvsdist 20402f
for f in distutils/command/install distutils/sysconfig; do
cvsdist 20402f
    rm -f Lib/$f.py.lib64
cvsdist 20402f
done
cvsdist 20402f
f020ab
InstallPython() {
f020ab
f020ab
  ConfName=$1	      
f020ab
  BinaryName=$2
f020ab
  PyInstSoName=$3
f020ab
f020ab
  ConfDir=build/$ConfName
f020ab
f020ab
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName
f020ab
  mkdir -p $ConfDir
f020ab
f020ab
  pushd $ConfDir
f020ab
791e9f
make install DESTDIR=%{buildroot}
f020ab
c6247f
# We install a collection of hooks for gdb that make it easier to debug
c6247f
# executables linked against libpython (such as /usr/lib/python itself)
c6247f
#
c6247f
# These hooks are implemented in Python itself
c6247f
#
c6247f
# gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
c6247f
# We put them in the debuginfo package by installing them to e.g.:
c6247f
#  /usr/lib/debug/usr/lib/libpython2.6.so.1.0.debug-gdb.py
f020ab
# (note that the debug path is /usr/lib/debug for both 32/64 bit)
c6247f
#
c6247f
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
c6247f
# information
f020ab
# 
f020ab
# Initially I tried:
f020ab
#  /usr/lib/libpython2.6.so.1.0-gdb.py
f020ab
# but doing so generated noise when ldconfig was rerun (rhbz:562980)
f020ab
#
f020ab
%if 0%{?with_gdb_hooks}
f020ab
DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
f020ab
PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
f020ab
f020ab
mkdir -p %{buildroot}$DirHoldingGdbPy
c6247f
cp $topdir/Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
f020ab
f020ab
# Manually byte-compile the file, in case find-debuginfo.sh is run before
f020ab
# brp-python-bytecompile, so that the .pyc/.pyo files are properly listed in
f020ab
# the debuginfo manifest:
f020ab
LD_LIBRARY_PATH="$topdir/$ConfDir" $topdir/$ConfDir/$BinaryName \
f020ab
  -c "import compileall; import sys; compileall.compile_dir('%{buildroot}$DirHoldingGdbPy', ddir='$DirHoldingGdbPy')"
f020ab
f020ab
LD_LIBRARY_PATH="$topdir/$ConfDir" $topdir/$ConfDir/$BinaryName -O \
f020ab
  -c "import compileall; import sys; compileall.compile_dir('%{buildroot}$DirHoldingGdbPy', ddir='$DirHoldingGdbPy')"
f020ab
%endif # with_gdb_hooks
f020ab
f020ab
  popd
f020ab
f020ab
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
f020ab
}
f020ab
f020ab
# Use "InstallPython" to support building with different configurations:
f020ab
f020ab
# Install the "debug" build first, so that we can move some files aside
f078d6
%if 0%{?with_debug_build}
f020ab
InstallPython debug \
f020ab
  python%{pybasever}-debug \
f020ab
  %{py_INSTSONAME_debug}
f078d6
%endif # with_debug_build
f020ab
f020ab
# Now the optimized build:
f020ab
InstallPython optimized \
f020ab
  python%{pybasever} \
f020ab
  %{py_INSTSONAME_optimized}
f020ab
f020ab
cvsdist d4a395
# Fix the interpreter path in binaries installed by distutils 
cvsdist d4a395
# (which changes them by itself)
cvsdist d4a395
# Make sure we preserve the file permissions
791e9f
for fixed in %{buildroot}%{_bindir}/pydoc; do
Mihai Ibanescu f9962c
    sed 's,#!.*/python$,#!%{_bindir}/env python%{pybasever},' $fixed > $fixed- \
cvsdist d4a395
        && cat $fixed- > $fixed && rm -f $fixed-
cvsdist d4a395
done
cvsdist e0fde9
860ed4
# Junk, no point in putting in -test sub-pkg
791e9f
rm -f %{buildroot}/%{pylibdir}/idlelib/testcode.py*
860ed4
440a06
# don't include tests that are run at build time in the package
59062c
# This is documented, and used: rhbz#387401
860ed4
if /bin/false; then
860ed4
 # Move this to -test subpackage.
59062c
mkdir save_bits_of_test
59062c
for i in test_support.py __init__.py; do
791e9f
  cp -a %{buildroot}/%{pylibdir}/test/$i save_bits_of_test
59062c
done
791e9f
rm -rf %{buildroot}/%{pylibdir}/test
791e9f
mkdir %{buildroot}/%{pylibdir}/test
791e9f
cp -a save_bits_of_test/* %{buildroot}/%{pylibdir}/test
860ed4
fi
440a06
cvsdist 64c8a9
%if %{main_python}
cvsdist 64c8a9
%else
791e9f
mv %{buildroot}%{_bindir}/python %{buildroot}%{_bindir}/%{python}
f078d6
%if 0%{?with_debug_build}
f020ab
mv %{buildroot}%{_bindir}/python-debug %{buildroot}%{_bindir}/%{python}-debug
f078d6
%endif # with_debug_build
791e9f
mv %{buildroot}/%{_mandir}/man1/python.1 %{buildroot}/%{_mandir}/man1/python%{pybasever}.1
cvsdist e0fde9
%endif
cvsdist e4efab
cvsdist e4efab
# tools
cvsdist e0fde9
05912b
mkdir -p ${RPM_BUILD_ROOT}%{site_packages}
cvsdist e4efab
cvsdist e4efab
#pynche
Mihai Ibanescu fe0d34
cat > ${RPM_BUILD_ROOT}%{_bindir}/pynche << EOF
Mihai Ibanescu fe0d34
#!/bin/bash
05912b
exec %{site_packages}/pynche/pynche
Mihai Ibanescu fe0d34
EOF
Mihai Ibanescu fe0d34
chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/pynche
cvsdist d4a395
rm -f Tools/pynche/*.pyw
cvsdist e4efab
cp -r Tools/pynche \
05912b
  ${RPM_BUILD_ROOT}%{site_packages}/
cvsdist e4efab
cvsdist e4efab
mv Tools/pynche/README Tools/pynche/README.pynche
cvsdist e4efab
cvsdist e0fde9
#gettext
791e9f
install -m755  Tools/i18n/pygettext.py %{buildroot}%{_bindir}/
791e9f
install -m755  Tools/i18n/msgfmt.py %{buildroot}%{_bindir}/
cvsdist e0fde9
cvsdist 2f0d56
# Useful development tools
791e9f
install -m755 -d %{buildroot}%{tools_dir}/scripts
791e9f
install Tools/README %{buildroot}%{tools_dir}/
791e9f
install Tools/scripts/*py %{buildroot}%{tools_dir}/scripts/
cvsdist d78f1e
Mihai Ibanescu 44819f
# Documentation tools
791e9f
install -m755 -d %{buildroot}%{doc_tools_dir}
791e9f
#install -m755 Doc/tools/mkhowto %{buildroot}%{doc_tools_dir}
Mihai Ibanescu 44819f
cvsdist d78f1e
# Useful demo scripts
791e9f
install -m755 -d %{buildroot}%{demo_dir}
791e9f
cp -ar Demo/* %{buildroot}%{demo_dir}
cvsdist 2f0d56
cvsdist e0fde9
# Get rid of crap
791e9f
find %{buildroot}/ -name "*~"|xargs rm -f
791e9f
find %{buildroot}/ -name ".cvsignore"|xargs rm -f
f5df1f
find %{buildroot}/ -name "*.bat"|xargs rm -f
cvsdist e0fde9
find . -name "*~"|xargs rm -f
cvsdist e0fde9
find . -name ".cvsignore"|xargs rm -f
cvsdist e0fde9
#zero length
791e9f
rm -f %{buildroot}%{pylibdir}/LICENSE.txt
cvsdist e0fde9
cvsdist e0fde9
cvsdist 64c8a9
#make the binaries install side by side with the main python
cvsdist 64c8a9
%if !%{main_python}
791e9f
pushd %{buildroot}%{_bindir}
cvsdist 64c8a9
mv idle idle%{__python_ver}
cvsdist 64c8a9
mv pynche pynche%{__python_ver}
cvsdist 64c8a9
mv pygettext.py pygettext%{__python_ver}.py
cvsdist 64c8a9
mv msgfmt.py msgfmt%{__python_ver}.py
Mihai Ibanescu ce25e1
mv smtpd.py smtpd%{__python_ver}.py
cvsdist 64c8a9
mv pydoc pydoc%{__python_ver}
cvsdist e0fde9
popd
cvsdist e0fde9
%endif
cvsdist e4efab
Mihai Ibanescu f9962c
# Fix for bug #136654
791e9f
rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au
cvsdist d4a395
Mihai Ibanescu adb16c
# Fix bug #143667: python should own /usr/lib/python2.x on 64-bit machines
643544
%if "%{_lib}" == "lib64"
791e9f
install -d %{buildroot}/usr/lib/python%{pybasever}/site-packages
Mihai Ibanescu adb16c
%endif
Mihai Ibanescu adb16c
Mihai Ibanescu f1d253
# Make python-devel multilib-ready (bug #192747, #139911)
0626de
%global _pyconfig32_h pyconfig-32.h
0626de
%global _pyconfig64_h pyconfig-64.h
Mihai Ibanescu f1d253
b6f774
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64
0626de
%global _pyconfig_h %{_pyconfig64_h}
Mihai Ibanescu f1d253
%else
0626de
%global _pyconfig_h %{_pyconfig32_h}
Mihai Ibanescu f1d253
%endif
f078d6
f078d6
%if 0%{?with_debug_build}
f078d6
%global PyIncludeDirs python%{pybasever} python%{pybasever}-debug
f078d6
%else
f078d6
%global PyIncludeDirs python%{pybasever}
f078d6
%endif
f078d6
f078d6
for PyIncludeDir in %{PyIncludeDirs} ; do
f020ab
  mv %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h \
f020ab
     %{buildroot}%{_includedir}/$PyIncludeDir/%{_pyconfig_h}
f020ab
  cat > %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h << EOF
Mihai Ibanescu f1d253
#include <bits wordsize.h="">
Mihai Ibanescu f1d253
Mihai Ibanescu f1d253
#if __WORDSIZE == 32
Mihai Ibanescu f1d253
#include "%{_pyconfig32_h}"
Mihai Ibanescu f1d253
#elif __WORDSIZE == 64
Mihai Ibanescu f1d253
#include "%{_pyconfig64_h}"
Mihai Ibanescu f1d253
#else
59062c
#error "Unknown word size"
Mihai Ibanescu f1d253
#endif
Mihai Ibanescu f1d253
EOF
f020ab
done
791e9f
ln -s ../../libpython%{pybasever}.so %{buildroot}%{pylibdir}/config/libpython%{pybasever}.so
Mihai Ibanescu f1d253
Mihai Ibanescu 3af5a6
# Fix for bug 201434: make sure distutils looks at the right pyconfig.h file
a8ca61
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
a8ca61
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
a8ca61
# when python starts up.
a8ca61
#
a8ca61
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
a8ca61
# variants:
a8ca61
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
a8ca61
  %{buildroot}%{pylibdir}/distutils/sysconfig.py \
a8ca61
  %{buildroot}%{pylibdir}/sysconfig.py
Mihai Ibanescu 3af5a6
85867c
# Install macros for rpm:
85867c
mkdir -p %{buildroot}/%{_sysconfdir}/rpm
85867c
install -m 644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/rpm
85867c
671ce7
# Ensure that the curses module was linked against libncursesw.so, rather than
671ce7
# libncurses.so (bug 539917)
791e9f
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
671ce7
    | grep curses \
671ce7
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
671ce7
f020ab
# Ensure that the debug modules are linked against the debug libpython, and
f020ab
# likewise for the optimized modules and libpython:
f020ab
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
f020ab
    case $Module in
f020ab
    *_d.so)
f020ab
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
f020ab
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
f020ab
            
f020ab
        ;;
f020ab
    *)
f020ab
        ldd $Module | grep %{py_INSTSONAME_debug} &&
f020ab
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_optimized} ; exit 1)
f020ab
        ;;
f020ab
    esac
f020ab
done
b25d60
3dde1c
#
3dde1c
# Systemtap hooks:
3dde1c
#
3dde1c
%if 0%{?with_systemtap}
3dde1c
# Install a tapset for this libpython into tapsetdir, fixing up the path to the
3dde1c
# library:
3dde1c
mkdir -p %{buildroot}%{tapsetdir}
b6f774
%ifarch %{power64} s390x x86_64 ia64 alpha sparc64
f020ab
%global libpython_stp_optimized libpython%{pybasever}-64.stp
f020ab
%global libpython_stp_debug     libpython%{pybasever}-debug-64.stp
3dde1c
%else
f020ab
%global libpython_stp_optimized libpython%{pybasever}-32.stp
f020ab
%global libpython_stp_debug     libpython%{pybasever}-debug-32.stp
3dde1c
%endif
3dde1c
3dde1c
sed \
f020ab
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_optimized}|" \
f020ab
   %{SOURCE3} \
f020ab
   > %{buildroot}%{tapsetdir}/%{libpython_stp_optimized}
f020ab
f078d6
%if 0%{?with_debug_build}
f020ab
sed \
f020ab
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \
3dde1c
   %{SOURCE3} \
f020ab
   > %{buildroot}%{tapsetdir}/%{libpython_stp_debug}
f078d6
%endif # with_debug_build
3dde1c
%endif # with_systemtap
3dde1c
4f38fe
4f38fe
# ======================================================
4f38fe
# Running the upstream test suite
4f38fe
# ======================================================
4f38fe
5810c5
%check
5810c5
topdir=$(pwd)
5810c5
CheckPython() {
5810c5
  ConfName=$1
5810c5
  BinaryName=$2
5810c5
  ConfDir=$(pwd)/build/$ConfName
5810c5
5810c5
  echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
5810c5
5810c5
  # Note that we're running the tests using the version of the code in the
5810c5
  # builddir, not in the buildroot.
5810c5
5810c5
  pushd $ConfDir
5810c5
e25252
  EXTRATESTOPTS="--verbose"
5810c5
5810c5
%if 0%{?with_huntrleaks}
5810c5
  # Try to detect reference leaks on debug builds.  By default this means
5810c5
  # running every test 10 times (6 to stabilize, then 4 to watch):
5810c5
  if [ "$ConfName" = "debug"  ] ; then
5810c5
    EXTRATESTOPTS="$EXTRATESTOPTS --huntrleaks : "
5810c5
  fi
5810c5
%endif
5810c5
bbbca2
  # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the
866e92
  # our non-standard decorators take effect on the relevant tests:
866e92
  #   @unittest._skipInRpmBuild(reason)
866e92
  #   @unittest._expectedFailureInRpmBuild
866e92
  WITHIN_PYTHON_RPM_BUILD= EXTRATESTOPTS="$EXTRATESTOPTS" make test
5810c5
5810c5
  popd
5810c5
5810c5
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
5810c5
5810c5
}
5810c5
bc10ab
%if 0%{run_selftest_suite}
bc10ab
5810c5
# Check each of the configurations:
5810c5
%if 0%{?with_debug_build}
5810c5
CheckPython \
5810c5
  debug \
5810c5
  python%{pybasever}-debug
5810c5
%endif # with_debug_build
5810c5
CheckPython \
5810c5
  optimized \
5810c5
  python%{pybasever}
5810c5
bc10ab
%endif # run_selftest_suite
bc10ab
bc10ab
4f38fe
# ======================================================
4f38fe
# Cleaning up
4f38fe
# ======================================================
4f38fe
cvsdist e4efab
%clean
791e9f
rm -fr %{buildroot}
cvsdist e0fde9
4f38fe
4f38fe
# ======================================================
4f38fe
# Scriptlets
4f38fe
# ======================================================
4f38fe
5b28df
%post libs -p /sbin/ldconfig
87c8da
5b28df
%postun libs -p /sbin/ldconfig
87c8da
4f38fe
4f38fe
05912b
%files
791e9f
%defattr(-, root, root, -)
cvsdist e0fde9
%doc LICENSE README
Mihai Ibanescu d6509b
%{_bindir}/pydoc*
1df0c9
%{_bindir}/%{python}
1df0c9
%if %{main_python}
f3e7a4
%{_bindir}/python2
1df0c9
%endif
1df0c9
%{_bindir}/python%{pybasever}
cvsdist e0fde9
%{_mandir}/*/*
cvsdist e0fde9
2ec5b3
%files libs
2ec5b3
%defattr(-,root,root,-)
2ec5b3
%doc LICENSE README
05912b
%dir %{pylibdir}
05912b
%dir %{dynload_dir}
05912b
%{dynload_dir}/Python-%{version}-py%{pybasever}.egg-info
05912b
%{dynload_dir}/_bisectmodule.so
05912b
%{dynload_dir}/_bsddb.so
05912b
%{dynload_dir}/_codecs_cn.so
05912b
%{dynload_dir}/_codecs_hk.so
05912b
%{dynload_dir}/_codecs_iso2022.so
05912b
%{dynload_dir}/_codecs_jp.so
05912b
%{dynload_dir}/_codecs_kr.so
05912b
%{dynload_dir}/_codecs_tw.so
05912b
%{dynload_dir}/_collectionsmodule.so
05912b
%{dynload_dir}/_csv.so
05912b
%{dynload_dir}/_ctypes.so
05912b
%{dynload_dir}/_curses.so
05912b
%{dynload_dir}/_curses_panel.so
05912b
%{dynload_dir}/_elementtree.so
05912b
%{dynload_dir}/_functoolsmodule.so
05912b
%{dynload_dir}/_hashlib.so
05912b
%{dynload_dir}/_heapq.so
05912b
%{dynload_dir}/_hotshot.so
c6247f
%{dynload_dir}/_io.so
05912b
%{dynload_dir}/_json.so
05912b
%{dynload_dir}/_localemodule.so
05912b
%{dynload_dir}/_lsprof.so
05912b
%{dynload_dir}/_multibytecodecmodule.so
05912b
%{dynload_dir}/_multiprocessing.so
05912b
%{dynload_dir}/_randommodule.so
05912b
%{dynload_dir}/_socketmodule.so
05912b
%{dynload_dir}/_sqlite3.so
05912b
%{dynload_dir}/_ssl.so
05912b
%{dynload_dir}/_struct.so
05912b
%{dynload_dir}/arraymodule.so
05912b
%{dynload_dir}/audioop.so
05912b
%{dynload_dir}/binascii.so
05912b
%{dynload_dir}/bz2.so
05912b
%{dynload_dir}/cPickle.so
05912b
%{dynload_dir}/cStringIO.so
05912b
%{dynload_dir}/cmathmodule.so
05912b
%{dynload_dir}/cryptmodule.so
05912b
%{dynload_dir}/datetime.so
05912b
%{dynload_dir}/dbm.so
05912b
%{dynload_dir}/dlmodule.so
05912b
%{dynload_dir}/fcntlmodule.so
05912b
%{dynload_dir}/future_builtins.so
5764ad
%if %{with_gdbm}
05912b
%{dynload_dir}/gdbmmodule.so
5764ad
%endif
05912b
%{dynload_dir}/grpmodule.so
05912b
%{dynload_dir}/imageop.so
05912b
%{dynload_dir}/itertoolsmodule.so
05912b
%{dynload_dir}/linuxaudiodev.so
c6247f
%{dynload_dir}/math.so
05912b
%{dynload_dir}/mmapmodule.so
05912b
%{dynload_dir}/nismodule.so
05912b
%{dynload_dir}/operator.so
05912b
%{dynload_dir}/ossaudiodev.so
05912b
%{dynload_dir}/parsermodule.so
05912b
%{dynload_dir}/pyexpat.so
05912b
%{dynload_dir}/readline.so
05912b
%{dynload_dir}/resource.so
05912b
%{dynload_dir}/selectmodule.so
05912b
%{dynload_dir}/spwdmodule.so
05912b
%{dynload_dir}/stropmodule.so
05912b
%{dynload_dir}/syslog.so
05912b
%{dynload_dir}/termios.so
05912b
%{dynload_dir}/timemodule.so
05912b
%{dynload_dir}/timingmodule.so
05912b
%{dynload_dir}/unicodedata.so
05912b
%{dynload_dir}/xxsubtype.so
05912b
%{dynload_dir}/zlibmodule.so
05912b
05912b
%dir %{site_packages}
05912b
%{site_packages}/README
05912b
%{pylibdir}/*.py*
05912b
%{pylibdir}/*.doc
66ec06
%{pylibdir}/wsgiref.egg-info
05912b
%dir %{pylibdir}/bsddb
05912b
%{pylibdir}/bsddb/*.py*
05912b
%{pylibdir}/compiler
05912b
%dir %{pylibdir}/ctypes
05912b
%{pylibdir}/ctypes/*.py*
05912b
%{pylibdir}/ctypes/macholib
05912b
%{pylibdir}/curses
05912b
%dir %{pylibdir}/distutils
05912b
%{pylibdir}/distutils/*.py*
05912b
%{pylibdir}/distutils/README
05912b
%{pylibdir}/distutils/command
768145
%exclude %{pylibdir}/distutils/command/wininst-*.exe
05912b
%dir %{pylibdir}/email
05912b
%{pylibdir}/email/*.py*
05912b
%{pylibdir}/email/mime
05912b
%{pylibdir}/encodings
05912b
%{pylibdir}/hotshot
05912b
%{pylibdir}/idlelib
c6247f
%{pylibdir}/importlib
05912b
%dir %{pylibdir}/json
05912b
%{pylibdir}/json/*.py*
05912b
%{pylibdir}/lib2to3
05912b
%{pylibdir}/logging
05912b
%{pylibdir}/multiprocessing
05912b
%{pylibdir}/plat-linux2
c6247f
%{pylibdir}/pydoc_data
05912b
%dir %{pylibdir}/sqlite3
05912b
%{pylibdir}/sqlite3/*.py*
05912b
%dir %{pylibdir}/test
05912b
%{pylibdir}/test/test_support.py*
05912b
%{pylibdir}/test/__init__.py*
c6247f
%{pylibdir}/unittest
05912b
%{pylibdir}/wsgiref
05912b
%{pylibdir}/xml
643544
%if "%{_lib}" == "lib64"
0626de
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
0626de
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
Mihai Ibanescu adb16c
%endif
cvsdist e4efab
8274ac
# "Makefile" and the config-32/64.h file are needed by
2ec5b3
# distutils/sysconfig.py:_init_posix(), so we include them in the libs
8274ac
# package, along with their parent directories (bug 531901):
05912b
%dir %{pylibdir}/config
05912b
%{pylibdir}/config/Makefile
0626de
%dir %{_includedir}/python%{pybasever}
0626de
%{_includedir}/python%{pybasever}/%{_pyconfig_h}
8274ac
f020ab
%{_libdir}/%{py_INSTSONAME_optimized}
3dde1c
%if 0%{?with_systemtap}
f020ab
%{tapsetdir}/%{libpython_stp_optimized}
c22243
%doc systemtap-example.stp pyfuntop.stp
3dde1c
%endif
87c8da
cvsdist e4efab
%files devel
791e9f
%defattr(-,root,root,-)
c6247f
%{_libdir}/pkgconfig/python-%{pybasever}.pc
c6247f
%{_libdir}/pkgconfig/python.pc
b0a6ae
%{_libdir}/pkgconfig/python2.pc
05912b
%{pylibdir}/config/*
05912b
%exclude %{pylibdir}/config/Makefile
768145
%{pylibdir}/distutils/command/wininst-*.exe
0626de
%{_includedir}/python%{pybasever}/*.h
0626de
%exclude %{_includedir}/python%{pybasever}/%{_pyconfig_h}
267e1a
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
c22243
%if %{main_python}
f3e7a4
%{_bindir}/python-config
9345b0
%{_bindir}/python2-config
c22243
%endif
1df0c9
%{_bindir}/python%{pybasever}-config
87c8da
%{_libdir}/libpython%{pybasever}.so
85867c
%config(noreplace) %{_sysconfdir}/rpm/macros.python2
cvsdist e4efab
cvsdist e0fde9
%files tools
cvsdist e4efab
%defattr(-,root,root,755)
cvsdist e4efab
%doc Tools/pynche/README.pynche
05912b
%{site_packages}/pynche
Mihai Ibanescu ce25e1
%{_bindir}/smtpd*.py*
a7ef9c
%{_bindir}/2to3*
Mihai Ibanescu f9962c
%{_bindir}/idle*
Mihai Ibanescu f9962c
%{_bindir}/pynche*
jbj 8e4b82
%{_bindir}/pygettext*.py*
jbj 8e4b82
%{_bindir}/msgfmt*.py*
cvsdist 2f0d56
%{tools_dir}
cvsdist d78f1e
%{demo_dir}
05912b
%{pylibdir}/Doc
cvsdist e4efab
cvsdist 64c8a9
%files -n %{tkinter}
cvsdist d855cb
%defattr(-,root,root,755)
05912b
%{pylibdir}/lib-tk
05912b
%{dynload_dir}/_tkinter.so
cvsdist e4efab
860ed4
%files test
791e9f
%defattr(-, root, root, -)
05912b
%{pylibdir}/bsddb/test
05912b
%{pylibdir}/ctypes/test
05912b
%{pylibdir}/distutils/tests
05912b
%{pylibdir}/email/test
05912b
%{pylibdir}/json/tests
05912b
%{pylibdir}/sqlite3/test
c905a3
%{pylibdir}/test/*
c905a3
# These two are shipped in the main subpackage:
c905a3
%exclude %{pylibdir}/test/test_support.py*
c905a3
%exclude %{pylibdir}/test/__init__.py*
05912b
%{dynload_dir}/_ctypes_test.so
05912b
%{dynload_dir}/_testcapimodule.so
860ed4
f020ab
f020ab
# We don't bother splitting the debug build out into further subpackages:
f020ab
# if you need it, you're probably a developer.
f020ab
f020ab
# Hence the manifest is the combination of analogous files in the manifests of
f020ab
# all of the other subpackages
f020ab
f078d6
%if 0%{?with_debug_build}
f020ab
%files debug
f020ab
%defattr(-,root,root,-)
f020ab
f020ab
# Analog of the core subpackage's files:
f020ab
%{_bindir}/%{python}-debug
f020ab
%if %{main_python}
f020ab
%{_bindir}/python2-debug
f020ab
%endif
f020ab
%{_bindir}/python%{pybasever}-debug
f020ab
2ec5b3
# Analog of the -libs subpackage's files, with debug builds of the built-in
2ec5b3
# "extension" modules:
f020ab
%{dynload_dir}/_bisectmodule_d.so
f020ab
%{dynload_dir}/_bsddb_d.so
f020ab
%{dynload_dir}/_codecs_cn_d.so
f020ab
%{dynload_dir}/_codecs_hk_d.so
f020ab
%{dynload_dir}/_codecs_iso2022_d.so
f020ab
%{dynload_dir}/_codecs_jp_d.so
f020ab
%{dynload_dir}/_codecs_kr_d.so
f020ab
%{dynload_dir}/_codecs_tw_d.so
f020ab
%{dynload_dir}/_collectionsmodule_d.so
f020ab
%{dynload_dir}/_csv_d.so
f020ab
%{dynload_dir}/_ctypes_d.so
f020ab
%{dynload_dir}/_curses_d.so
f020ab
%{dynload_dir}/_curses_panel_d.so
f020ab
%{dynload_dir}/_elementtree_d.so
f020ab
%{dynload_dir}/_functoolsmodule_d.so
f020ab
%{dynload_dir}/_hashlib_d.so
f020ab
%{dynload_dir}/_heapq_d.so
f020ab
%{dynload_dir}/_hotshot_d.so
c6247f
%{dynload_dir}/_io_d.so
f020ab
%{dynload_dir}/_json_d.so
f020ab
%{dynload_dir}/_localemodule_d.so
f020ab
%{dynload_dir}/_lsprof_d.so
f020ab
%{dynload_dir}/_multibytecodecmodule_d.so
f020ab
%{dynload_dir}/_multiprocessing_d.so
f020ab
%{dynload_dir}/_randommodule_d.so
f020ab
%{dynload_dir}/_socketmodule_d.so
f020ab
%{dynload_dir}/_sqlite3_d.so
f020ab
%{dynload_dir}/_ssl_d.so
f020ab
%{dynload_dir}/_struct_d.so
f020ab
%{dynload_dir}/arraymodule_d.so
f020ab
%{dynload_dir}/audioop_d.so
f020ab
%{dynload_dir}/binascii_d.so
f020ab
%{dynload_dir}/bz2_d.so
f020ab
%{dynload_dir}/cPickle_d.so
f020ab
%{dynload_dir}/cStringIO_d.so
f020ab
%{dynload_dir}/cmathmodule_d.so
f020ab
%{dynload_dir}/cryptmodule_d.so
f020ab
%{dynload_dir}/datetime_d.so
f020ab
%{dynload_dir}/dbm_d.so
f020ab
%{dynload_dir}/dlmodule_d.so
f020ab
%{dynload_dir}/fcntlmodule_d.so
f020ab
%{dynload_dir}/future_builtins_d.so
5764ad
%if %{with_gdbm}
f020ab
%{dynload_dir}/gdbmmodule_d.so
5764ad
%endif
f020ab
%{dynload_dir}/grpmodule_d.so
f020ab
%{dynload_dir}/imageop_d.so
f020ab
%{dynload_dir}/itertoolsmodule_d.so
f020ab
%{dynload_dir}/linuxaudiodev_d.so
c6247f
%{dynload_dir}/math_d.so
f020ab
%{dynload_dir}/mmapmodule_d.so
f020ab
%{dynload_dir}/nismodule_d.so
f020ab
%{dynload_dir}/operator_d.so
f020ab
%{dynload_dir}/ossaudiodev_d.so
f020ab
%{dynload_dir}/parsermodule_d.so
f020ab
%{dynload_dir}/pyexpat_d.so
f020ab
%{dynload_dir}/readline_d.so
f020ab
%{dynload_dir}/resource_d.so
f020ab
%{dynload_dir}/selectmodule_d.so
f020ab
%{dynload_dir}/spwdmodule_d.so
f020ab
%{dynload_dir}/stropmodule_d.so
f020ab
%{dynload_dir}/syslog_d.so
f020ab
%{dynload_dir}/termios_d.so
f020ab
%{dynload_dir}/timemodule_d.so
f020ab
%{dynload_dir}/timingmodule_d.so
f020ab
%{dynload_dir}/unicodedata_d.so
f020ab
%{dynload_dir}/xxsubtype_d.so
f020ab
%{dynload_dir}/zlibmodule_d.so
f020ab
f020ab
# No need to split things out the "Makefile" and the config-32/64.h file as we
f020ab
# do for the regular build above (bug 531901), since they're all in one package
f020ab
# now; they're listed below, under "-devel":
f020ab
f020ab
%{_libdir}/%{py_INSTSONAME_debug}
f020ab
%if 0%{?with_systemtap}
f020ab
%{tapsetdir}/%{libpython_stp_debug}
f020ab
%endif
f020ab
f020ab
# Analog of the -devel subpackage's files:
f020ab
%dir %{pylibdir}/config-debug
9345b0
%{_libdir}/pkgconfig/python-%{pybasever}-debug.pc
9345b0
%{_libdir}/pkgconfig/python-debug.pc
9345b0
%{_libdir}/pkgconfig/python2-debug.pc
f020ab
%{pylibdir}/config-debug/*
f020ab
%{_includedir}/python%{pybasever}-debug/*.h
f020ab
%if %{main_python}
f020ab
%{_bindir}/python-debug-config
9345b0
%{_bindir}/python2-debug-config
f020ab
%endif
f020ab
%{_bindir}/python%{pybasever}-debug-config
f020ab
%{_libdir}/libpython%{pybasever}_d.so
f020ab
f020ab
# Analog of the -tools subpackage's files:
f020ab
#  None for now; we could build precanned versions that have the appropriate
f020ab
# shebang if needed
f020ab
f020ab
# Analog  of the tkinter subpackage's files:
f020ab
%{dynload_dir}/_tkinter_d.so
f020ab
f020ab
# Analog  of the -test subpackage's files:
f020ab
%{dynload_dir}/_ctypes_test_d.so
f020ab
%{dynload_dir}/_testcapimodule_d.so
f020ab
f078d6
%endif # with_debug_build
f078d6
32b703
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from
32b703
# ldconfig (rhbz:562980).
32b703
# 
32b703
# The /usr/lib/rpm/redhat/macros defines %__debug_package to use
32b703
# debugfiles.list, and it appears that everything below /usr/lib/debug and
32b703
# (/usr/src/debug) gets added to this file (via LISTFILES) in
32b703
# /usr/lib/rpm/find-debuginfo.sh
32b703
# 
32b703
# Hence by installing it below /usr/lib/debug we ensure it is added to the
32b703
# -debuginfo subpackage
32b703
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py 
32b703
# payload file would be unpackaged)
32b703
4f38fe
4f38fe
# ======================================================
4f38fe
# Finally, the changelog:
4f38fe
# ======================================================
4f38fe
cvsdist e4efab
%changelog
07c4ce
* Tue Jul 17 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.7.3-7.2
07c4ce
- fix memory leak in module _hashlib (patch 158, rhbz#836285)
4fe005
- fix db4 include path for libdb4 package (f18 and above) (patch 159)
07c4ce
b6f774
* Fri Jun 22 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-7.1
b6f774
- use rpm macro for power64 (rhbz#834653)
b6f774
498957
* Fri May  4 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-7
498957
- renumber autotools patch from 300 to 5000
498957
- specfile cleanups
498957
1fa9c8
* Mon Apr 30 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-6
1fa9c8
- try again to fix test_gdb.py (patch 156; rhbz#817072)
1fa9c8
926168
* Mon Apr 30 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-5
926168
- fix test_gdb.py (patch 156; rhbz#817072)
926168
7461fe
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-4
7461fe
- avoid allocating thunks in ctypes unless absolutely necessary, to avoid
7461fe
generating SELinux denials on "import ctypes" and "import uuid" when embedding
7461fe
Python within httpd (patch 155; rhbz#814391)
7461fe
067ca1
* Thu Apr 19 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-3
067ca1
- add explicit version requirements on expat to avoid linkage problems with
067ca1
XML_SetHashSalt
067ca1
9345b0
* Wed Apr 18 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-2
9345b0
- fix -config symlinks (patch 112; rhbz#813836)
9345b0
b0a6ae
* Wed Apr 11 2012 David Malcolm <dmalcolm@redhat.com> - 2.7.3-1
b0a6ae
- 2.7.3: refresh patch 102 (lib64); drop upstream patches 11 (ascii-to-lower),
b0a6ae
115 (pydoc robustness), 145 (linux2), 148 (gdbm magic values), 151 (deadlock
b0a6ae
in fork); refresh patch 112 (debug build); revise patch 127
b0a6ae
(test_structmember); fix test_gdb (patch 153); refresh patch 137 (distutils
b0a6ae
tests); add python2.pc to python-devel; regenerate the autotool intermediates
b0a6ae
patch (patch 300)
b0a6ae
Thomas Spura 9bf1f8
* Sat Feb 25 2012 Thomas Spura <tomspur@fedoraproject.org> - 2.7.2-20
Thomas Spura 9bf1f8
- fix deadlock issue (#787712)
Thomas Spura 9bf1f8
e36d6e
* Fri Feb 17 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 2.7.2-19
e36d6e
- Obsolete python-sqlite2
e36d6e
0473b0
* Thu Nov 24 2011 Ville Skyttä <ville.skytta@iki.fi> - 2.7.2-18
0473b0
- Build with $RPM_LD_FLAGS (#756862).
0473b0
- Use xz-compressed source tarball.
0473b0
efe082
* Wed Oct 26 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.2-17
efe082
- Rebuilt for glibc bug#747377
efe082
05e831
* Fri Sep 30 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-16
05e831
- re-enable gdbm (patch 148; rhbz#742242)
05e831
a43d18
* Fri Sep 16 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-15
a43d18
- add a sys._debugmallocstats() function (patch 147)
a43d18
991332
* Wed Sep 14 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-14
991332
- support OpenSSL FIPS mode in _hashlib and hashlib; don't build the _md5 and
991332
_sha* modules, relying on _hashlib in hashlib, and thus within md5 etc
991332
(rhbz#563986; patch 146)
991332
bc10ab
* Wed Sep 14 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-13
bc10ab
- force sys.platform to be "linux2" (patch 145)
bc10ab
5764ad
* Tue Sep 13 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-12
5764ad
- disable gdbm module to prepare for gdbm soname bump
5764ad
e16547
* Mon Sep 12 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-11
e16547
- rename and renumber patches for consistency with python3.spec (55, 111, 113,
e16547
114, 125, 131, 129 to 143)
e16547
866e92
* Sat Sep 10 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-10
866e92
- rewrite of "check", introducing downstream-only hooks for skipping specific
866e92
cases in an rpmbuild (patch 132), and fixing/skipping failing tests in a more
866e92
fine-grained manner than before (patches 104, 133-142)
866e92
e25252
* Thu Sep  1 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-9
e25252
- run selftests with "--verbose"
e25252
- disable parts of test_io on ppc (rhbz#732998)
e25252
73e351
* Tue Aug 23 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-8
73e351
- add --extension-suffix option to python-config (patch 130; rhbz#732808)
73e351
92ed49
* Tue Aug 23 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-7
92ed49
- re-enable and fix the --with-tsc option on ppc64, and rework it on 32-bit
92ed49
ppc to avoid aliasing violations (patch 129; rhbz#698726)
92ed49
76e85f
* Tue Aug 23 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-6
76e85f
- don't use --with-tsc on ppc64 debug builds (rhbz#698726)
76e85f
85867c
* Thu Aug 18 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-5
85867c
- add rpm macros file (rhbz#731800)
85867c
4f38fe
* Fri Jul  8 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-4
4f38fe
- cleanup of BuildRequires; add comment headings to specfile sections
4f38fe
c4cfb2
* Wed Jun 22 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-3
c4cfb2
- reorganize test exclusions (test_openpty and test_pty seem to be failing on
c4cfb2
every arch, not just the explicitly-listed ones)
c4cfb2
093a2c
* Mon Jun 13 2011 Dan Horák <dan[at]danny.cz> - 2.7.2-2
093a2c
- add s390(x) excluded tests
093a2c
25640e
* Mon Jun 13 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.2-1
25640e
- 2.7.2; drop upstreamed patches: patch 122 (parallel make fix), patch 124
25640e
(test_commands and SELinux), patch 130 (ppc preprocessor macro in debug
25640e
build); patch 131 (decimal in Turkish locale); regenerate the autotool
25640e
intermediates patch (patch 300)
25640e
83e90d
* Tue Jun 07 2011 Dennis Gilmore <dennis@ausil.us> - 2.7.1-9
83e90d
- fix sparc building by excluding failing tests RHBZ#711584
83e90d
599d1a
* Mon May 23 2011 Peter Robinson <pbrobinson@gmail.com> - 2.7.1-8
093a2c
- fix compile on ARM by excluding failing tests on arm - RHBZ #706253
599d1a
947235
* Tue Apr 12 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.1-7
947235
- fix "import decimal" in the Turkish locale (patch 131; rhbz#694928)
947235
489369
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-6
489369
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
489369
970523
* Fri Jan  21 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 2.7.1-5
970523
- Switch from setting OPT to setting EXTRA_CFLAGS so we don't overwrite the
970523
  DNDEBUG flag
970523
f81cc6
* Fri Jan  7 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.1-4
f81cc6
- for now, drop "obsoletes" of python-argparse, since it interracts badly with
f81cc6
multilib (rhbz#667984)
f81cc6
6159c1
* Fri Jan  7 2011 Thomas Spura <tomspur@fedoraproject.org> - 2.7.1-3
6159c1
- obsolete/provide python-argparse (new in 2.7)
6159c1
1b4e01
* Thu Jan  6 2011 David Malcolm <dmalcolm@redhat.com> - 2.7.1-2
1b4e01
- fix the ppc build of the debug configuration (patch 130; rhbz#661510)
1b4e01
4b97ee
* Thu Dec 23 2010 David Malcolm <dmalcolm@redhat.com> - 2.7.1-1
4b97ee
- 2.7.1, reworking patch 0 (config), patch 102 (lib64); drop upstream
4b97ee
patch 56 (cfgparse), patch 110 (ctypes/SELinux/noexecmem), patch 119 (expat
4b97ee
compat), patch 123 (2to3 on "from itertools import *")
4b97ee
- fix test_abc's test_cache_leak in the debug build (patch 128)
4b97ee
- drop _weakref.so from manifest (_weakref became a core module in r84230)
4b97ee
Jesse Keating fdfb46
* Wed Sep 29 2010 jkeating - 2.7-13
Jesse Keating fdfb46
- Rebuilt for gcc bug 634757
Jesse Keating fdfb46
edea14
* Mon Sep 27 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-12
edea14
- fix test_structmember on 64bit-bigendian (patch 127)
edea14
e8c4a5
* Fri Sep 24 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-11
e8c4a5
- fix dbm_contains on 64bit-bigendian (patch 126; rhbz#626756)
e8c4a5
721120
* Thu Sep 16 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 2.7-10
721120
- backport a patch to fix a change in behaviour in configparse.
721120
2ec5b3
* Thu Sep  9 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-9
2ec5b3
- move most of the payload of the core package to the libs subpackage, given
2ec5b3
that the libs aren't meaningfully usable without the standard libraries
2ec5b3
5810c5
* Wed Aug 18 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-8
5810c5
- add %%check section
5810c5
- update lib64 patch (patch 102) to fix expected output in test_site.py on
5810c5
64-bit systems
5810c5
- patch test_commands.py to work with SELinux (patch 124)
5810c5
- patch the debug build's usage of COUNT_ALLOCS to be less verbose (patch 125)
5810c5
7eccae
* Mon Jul 26 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-7
7eccae
- fixup missing -lcrypt to "crypt" module in config patch (patch 0)
7eccae
cff1b4
* Mon Jul 26 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-6
cff1b4
- re-enable systemtap
cff1b4
- cherrypick upstream patch to 2to3 for "from itertools import *"
cff1b4
traceback (patch 123)
cff1b4
b95f6c
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-5
b95f6c
- disable systemtap for now (dtrace is failing on startup due to the bug
b95f6c
mentioned in 2.7-4)
b95f6c
- provide relative path to python binary when running pathfix.py
b95f6c
- fix parallel make (patch 122)
b95f6c
a8ca61
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-4
a8ca61
- fix reference to pyconfig.h in sysconfig that led to failure on startup if
a8ca61
python-devel was not installed
a8ca61
c6247f
* Thu Jul  8 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-3
c6247f
- add patch to fixup the new sysconfig.py for our multilib support on
c6247f
64-bit (patch 103)
c6247f
c6247f
* Thu Jul  8 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-2
c6247f
- add machinery for regenerating the "configure" script in the face of
c6247f
mismatching autoconf versions (patch 300)
c6247f
c6247f
* Tue Jul  6 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-1
c6247f
- 2.7 final; drop alphatag
c6247f
- drop patch 117 (upstream), patch 120 (upstreamed)
c6247f
- fix the commented-out __python_ver from 26 to 27
c6247f
c6247f
* Tue Jun 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-0.1.rc2
c6247f
- 2.7rc2
c6247f
- revert r79310 (patch 121)
c6247f
- remove modulator: upstream removed it in r78338
c6247f
- rename mathmodule(_d).so to math(_d).so in manifests (appears to be changed
c6247f
by r76861)
c6247f
- _bytesio(_d).so and _filesio(_d).so were consolidated into _io(_d).so in
c6247f
r73394 (upstream issue 6215)
c6247f
- use the gdb hooks from the upstream tarball, rather than keeping our own
c6247f
copy. The upstream version has some whitespace changes, a new write_repr for
c6247f
unicode objects, and various bulletproofings for being run on older gdbs
c6247f
c6247f
* Tue Jun 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-0.1.rc1
c6247f
- 2.7rc1:
c6247f
  - rework patches to apply against 2.7 (which among other changes has had a
c6247f
whitespace cleanup of the .c code): .rhconfig (patch0), .binutils-no-dep
c6247f
(patch10), .ascii-tolower (patch11), .socketmodule (patch13), .socketmodule2
c6247f
(patch14), .systemtap (patch55), .lib64 (patch102), .selinux (patch110),
c6247f
.no-static-lib (patch111), .debug-build (patch112), .statvfs-f-flag-constants
c6247f
(patch114), ..CVE-2010-2089 (patch117)
c6247f
  - drop upstream patches: .expat (patch3), .brprpm (patch51), .valgrind
c6247f
(patch52), .db48 (patch53), .CVE-2010-1634 (patch 116), .CVE-2008-5983 (patch
c6247f
118)
c6247f
468e2b
* Tue Jun 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-17
468e2b
- Stop python bailing out with an assertion failure when UnicodeDecodeErrors
468e2b
occur on very large buffers (patch 120, upstream issue 9058)
468e2b
908bb7
* Mon Jun 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-16
908bb7
- Fix an incompatibility between pyexpat and the system expat-2.0.1 that led to
908bb7
a segfault running test_pyexpat.py (patch 119; upstream issue 9054)
908bb7
f078d6
* Tue Jun  8 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-15
f078d6
- add a flag to make it easy to turn off the debug build when troubleshooting
f078d6
the rpm build
f078d6
0c63f1
* Sat Jun  5 2010 Dan Horák <dan[at]danny.cz> - 2.6.5-14
0c63f1
- reading the timestamp counter is available only on some arches (see Python/ceval.c)
0c63f1
- disable --with-valgrind on s390(x) arches
0c63f1
94e850
* Fri Jun  4 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-13
94e850
- ensure that the compiler is invoked with "-fwrapv" (rhbz#594819)
94e850
- CVE-2010-1634: fix various integer overflow checks in the audioop
20184a
module (patch 116)
20184a
- CVE-2010-2089: further checks within the audioop module (patch 117)
20184a
- CVE-2008-5983: the new PySys_SetArgvEx entry point from r81399 (patch 118)
94e850
96cf82
* Thu May 27 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-12
96cf82
- make "pydoc -k" more robust in the face of broken modules (rhbz:461419, patch115)
96cf82
1b84fe
* Wed May 26 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-11
1b84fe
- add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
1b84fe
(patch 114)
1b84fe
ab11e4
* Tue May 25 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-10
ab11e4
- add configure-time support for COUNT_ALLOCS and CALL_PROFILE debug options
ab11e4
(patch 113); enable them and the WITH_TSC option within the debug build
ab11e4
f020ab
* Tue May 18 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-9
f020ab
- build and install two different configurations of Python: debug and standard,
f020ab
packaging the debug build in a new "python-debug" subpackage (patch 112)
f020ab
66ec06
* Tue May  4 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-8
66ec06
- don't delete wsgiref.egg-info (rhbz:588426)
66ec06
000d17
* Mon Apr 26 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-7
000d17
- disable --with-valgrind on sparc arches
000d17
768145
* Mon Apr 12 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-6
768145
- move the "bdist_wininst" command's template .exe files from the core package
768145
to the devel subpackage, to save space (rhbz:525469)
768145
- fix stray doublelisting of config directory wildcard in devel subpackage
768145
01f3a7
* Wed Mar 31 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-5
01f3a7
- update python-gdb.py from v4 to v5 (improving performance and stability,
01f3a7
adding commands)
01f3a7
50d7a9
* Thu Mar 25 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-4
50d7a9
- update python-gdb.py from v3 to v4 (fixing infinite recursion on reference
50d7a9
cycles and tracebacks on bytes 0x80-0xff in strings, adding handlers for sets
50d7a9
and exceptions)
50d7a9
461494
* Wed Mar 24 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-3
461494
- refresh gdb hooks to v3 (reworking how they are packaged)
461494
a95ca8
* Mon Mar 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-2
a95ca8
- remove unnecessary arch-conditionality for patch 101
a95ca8
912b41
* Fri Mar 19 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-1
912b41
- update to 2.6.5: http://www.python.org/download/releases/2.6.5/
912b41
- replace our patch to compile against db4.8 with a patch from
912b41
upstream (patch 53, from r78974); update patch 54 since part of it is now in
912b41
that upstream patch
912b41
- update patch 110 so that it still applies in the face of upstream r78380
912b41
f5df1f
* Tue Mar 16 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.4-23
f5df1f
- fixup distutils/unixccompiler.py to remove standard library path from
f5df1f
rpath (patch 17)
f5df1f
- delete DOS batch files
f5df1f
c22243
* Fri Mar 12 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.4-22
c22243
- add pyfuntop.stp; allow systemtap support to be disabled
c22243
- remove trailing period from tkinter summary
c22243
- don't own /usr/bin/python-config if you're not the main python
c22243
c6af0d
* Thu Mar 11 2010 Marcela Mašláňová <mmaslano@redhat.com> - 2.6.4-21
c6af0d
- rebuild with new gdbm
c6af0d
c905a3
* Thu Feb 11 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.4-20
c905a3
- avoid having the "test" subdirectory and the files within it that are in the
c905a3
core subpackage also be owned by the test subpackage (rhbz:467588)
c905a3
bdbb34
* Wed Feb 10 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.4-19