7eb10c8
%global pybasever 3.2
5080ffc
5080ffc
# pybasever without the dot:
5080ffc
%global pyshortver 32
5080ffc
a3483f9
%global pylibdir %{_libdir}/python%{pybasever}
4aab458
%global dynload_dir %{pylibdir}/lib-dynload
a3483f9
5080ffc
# SOABI is defined in the upstream configure.in from Python-3.2a2 onwards,
5080ffc
# for PEP 3149:
5080ffc
#   http://www.python.org/dev/peps/pep-3149/
5080ffc
5080ffc
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
5080ffc
%global ABIFLAGS_optimized mu
5080ffc
%global ABIFLAGS_debug     dmu
5080ffc
5080ffc
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
5080ffc
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
5080ffc
5080ffc
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}
5080ffc
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}
5080ffc
7eb10c8
# All bytecode files are now in a __pycache__ subdirectory, with a name
7eb10c8
# reflecting the version of the bytecode (to permit sharing of python libraries
7eb10c8
# between different runtimes)
7eb10c8
# See http://www.python.org/dev/peps/pep-3147/
7eb10c8
# For example,
7eb10c8
#   foo/bar.py
7eb10c8
# now has bytecode at:
7eb10c8
#   foo/__pycache__/bar.cpython-32.pyc
7eb10c8
#   foo/__pycache__/bar.cpython-32.pyo
7eb10c8
%global bytecode_suffixes .cpython-32.py?
7eb10c8
d5a5bf3
# Python's configure script defines SOVERSION, and this is used in the Makefile
d5a5bf3
# to determine INSTSONAME, the name of the libpython DSO:
d5a5bf3
#   LDLIBRARY='libpython$(VERSION).so'
d5a5bf3
#   INSTSONAME="$LDLIBRARY".$SOVERSION
d5a5bf3
# We mirror this here in order to make it easier to add the -gdb.py hooks.
d5a5bf3
# (if these get out of sync, the payload of the libs subpackage will fail
d5a5bf3
# and halt the build)
d5a5bf3
%global py_SOVERSION 1.0
5080ffc
%global py_INSTSONAME_optimized libpython%{LDVERSION_optimized}.so.%{py_SOVERSION}
5080ffc
%global py_INSTSONAME_debug     libpython%{LDVERSION_debug}.so.%{py_SOVERSION}
d5a5bf3
815994f
%global with_debug_build 1
815994f
b2154fa
%global with_gdb_hooks 1
b2154fa
c969609
%global with_systemtap 1
c969609
31a06df
# some arches don't have valgrind so we need to disable its support on them
31a06df
%ifarch %{ix86} x86_64 ppc ppc64 s390x
31a06df
%global with_valgrind 1
31a06df
%else
31a06df
%global with_valgrind 0
31a06df
%endif
31a06df
91b7804
# Change from yes to no to turn this off
91b7804
%global with_computed_gotos yes
91b7804
a3483f9
# We want to byte-compile the .py files within the packages using the new
a3483f9
# python3 binary.
a3483f9
# 
a3483f9
# Unfortunately, rpmbuild's infrastructure requires us to jump through some
a3483f9
# hoops to avoid byte-compiling with the system python 2 version:
a3483f9
#   /usr/lib/rpm/redhat/macros sets up build policy that (amongst other things)
a3483f9
# defines __os_install_post.  In particular, "brp-python-bytecompile" is
a3483f9
# invoked without an argument thus using the wrong version of python
a3483f9
# (/usr/bin/python, rather than the freshly built python), thus leading to
a3483f9
# numerous syntax errors, and incorrect magic numbers in the .pyc files.  We
a3483f9
# thus override __os_install_post to avoid invoking this script:
a3483f9
%global __os_install_post /usr/lib/rpm/redhat/brp-compress \
a3483f9
  %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
a3483f9
  /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
a3483f9
  /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
a3483f9
  /usr/lib/rpm/redhat/brp-python-hardlink 
a3483f9
# to remove the invocation of brp-python-bytecompile, whilst keeping the
a3483f9
# invocation of brp-python-hardlink (since this should still work for python3
a3483f9
# pyc/pyo files)
a3483f9
7eb10c8
7eb10c8
# We need to get a newer configure generated out of configure.in for the following
7eb10c8
# patches:
7eb10c8
#   patch 55 (systemtap)
7eb10c8
#   patch 103 (debug build)
7eb10c8
#   patch 104 (more config flags)
7eb10c8
#
7eb10c8
# For patch 55 (systemtap), we need to get a new header for configure to use
7eb10c8
#
7eb10c8
# configure.in requires autoconf-2.65, but the version in Fedora is currently
7eb10c8
# autoconf-2.66
7eb10c8
#
7eb10c8
# For now, we'll generate a patch to the generated configure script and
7eb10c8
# pyconfig.h.in on a machine that has a local copy of autoconf 2.65
7eb10c8
#
7eb10c8
# Instructions on obtaining such a copy can be seen at
7eb10c8
#   http://bugs.python.org/issue7997
7eb10c8
#
7eb10c8
# To make it easy to regenerate the patch, this specfile can be run in two
7eb10c8
# ways:
7eb10c8
# (i) regenerate_autotooling_patch  0 : the normal approach: prep the
7eb10c8
# source tree using a pre-generated patch to the "configure" script, and do a
7eb10c8
# full build
7eb10c8
# (ii) regenerate_autotooling_patch 1 : intended to be run on a developer's
7eb10c8
# workstation: prep the source tree without patching configure, then rerun a
7eb10c8
# local copy of autoconf-2.65, regenerate the patch, then exit, without doing
7eb10c8
# the rest of the build
7eb10c8
%global regenerate_autotooling_patch 0
7eb10c8
7eb10c8
a3483f9
Summary: Version 3 of the Python programming language aka Python 3000
a3483f9
Name: python3
b218f78
Version: %{pybasever}.3
b218f78
Release: 1%{?dist}
a3483f9
License: Python
a3483f9
Group: Development/Languages
607ce95
Source: http://python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
a3483f9
a3483f9
# Avoid having various bogus auto-generated Provides lines for the various
a3483f9
# python c modules' SONAMEs:
a3483f9
Source1: find-provides-without-python-sonames.sh
a3483f9
%global _use_internal_dependency_generator 0
a3483f9
%global __find_provides %{SOURCE1}
a3483f9
a3483f9
# Supply various useful macros for building python 3 modules:
a3483f9
#  __python3, python3_sitelib, python3_sitearch
a3483f9
Source2: macros.python3
a3483f9
4aab458
# Supply an RPM macro "py_byte_compile" for the python3-devel subpackage
4aab458
# to enable specfiles to selectively byte-compile individual files and paths
4aab458
# with different Python runtimes as necessary:
4aab458
Source3: macros.pybytecompile
4aab458
b2154fa
# We install a collection of hooks for gdb that make it easier to debug
b2154fa
# executables linked against libpython (such as /usr/lib/python itself)
b2154fa
#
d5a5bf3
# These hooks are implemented in Python itself (though they are for the version
d5a5bf3
# of python that gdb is linked with, in this case Python 2.6)
b2154fa
#
d5a5bf3
# gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
d5a5bf3
# We put them in the debuginfo package by installing them to e.g.:
b2154fa
#  /usr/lib/debug/usr/lib/libpython3.1.so.1.0.debug-gdb.py
b2154fa
#
b2154fa
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
b2154fa
# information
b2154fa
#
bbd09cc
# This is the version from 
bbd09cc
#  http://bugs.python.org/issue8380
bbd09cc
#
bbd09cc
# This is Tools/gdb/libpython.py from:
bbd09cc
#  http://bugs.python.org/file16902/port-gdb7-hooks-to-py3k.patch
bbd09cc
# when applied to r80008 of the py3k branch
485fd76
Source4: python-gdb.py
b2154fa
c969609
# Systemtap tapset to make it easier to use the systemtap static probes
c969609
# (actually a template; LIBRARY_PATH will get fixed up during install)
c969609
# Written by dmalcolm; not yet sent upstream
c969609
Source5: libpython.stp
c969609
c969609
# Example systemtap script using the tapset
c969609
# Written by wcohen, mjw, dmalcolm; not yet sent upstream
c969609
Source6: systemtap-example.stp
c969609
71040c9
# Another example systemtap script that uses the tapset
71040c9
# Written by dmalcolm; not yet sent upstream
71040c9
Source7: pyfuntop.stp
71040c9
71040c9
a3483f9
# Fixup distutils/unixccompiler.py to remove standard library path from rpath:
a3483f9
# Was Patch0 in ivazquez' python3000 specfile:
a3483f9
Patch1:         Python-3.1.1-rpath.patch
a3483f9
a3483f9
# The four TestMIMEAudio tests fail due to "audiotest.au" not being packaged.
a3483f9
# It's simplest to remove them:
5080ffc
Patch3: python-3.2b2-remove-mimeaudio-tests.patch
a3483f9
aa4aef2
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
aa4aef2
# a libpythonMAJOR.MINOR.a (bug 550692):
b218f78
Patch6: python-3.2.1-no-static-lib.patch
1ae4dd3
c969609
# Systemtap support: add statically-defined probe points
c969609
# Patch based on upstream bug: http://bugs.python.org/issue4111
c969609
# fixed up by mjw and wcohen for 2.6.2, then fixed up by dmalcolm for 2.6.4
c969609
# then rewritten by mjw (attachment 390110 of rhbz 545179); ported to 3.1.1 by
c969609
# dmalcolm
5080ffc
Patch8: python-3.2b2-systemtap.patch
c969609
b218f78
Patch102: python-3.2.3-lib64.patch
a3483f9
021b2bc
# Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options
021b2bc
# described at http://svn.python.org/projects/python/trunk/Misc/SpecialBuilds.txt
021b2bc
# so that if they are enabled, they will be in that build's pyconfig.h, so that
021b2bc
# extension modules will reliably use them
021b2bc
Patch104: python-3.1.2-more-configuration-flags.patch
021b2bc
d73e38d
# Add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
d73e38d
# (rhbz:553020); partially upstream as http://bugs.python.org/issue7647
7eb10c8
Patch105: python-3.2a1-statvfs-f_flag-constants.patch
5c9590b
7eb10c8
# COUNT_ALLOCS is useful for debugging, but the upstream behaviour of always
7eb10c8
# emitting debug info to stdout on exit is too verbose and makes it harder to
7eb10c8
# use the debug build.  Add a "PYTHONDUMPCOUNTS" environment variable which
7eb10c8
# must be set to enable the output on exit
7eb10c8
# Not yet sent upstream:
7eb10c8
Patch125: less-verbose-COUNT_ALLOCS.patch
7eb10c8
5080ffc
# test_weakref's test_callback_in_cycle_resurrection doesn't work with
5080ffc
# COUNT_ALLOCS, as the metrics keep "C" alive.  Work around this for our
5080ffc
# debug build:
5080ffc
# Not yet sent upstream
5080ffc
Patch126: python-3.2b2-test-weakref-COUNT_ALLOCS_fix.patch
5080ffc
5080ffc
# Similar COUNT_ALLOCS fixes for test_gc
5080ffc
# Not yet sent upstream
5080ffc
Patch127: python-3.2b2-fix-test-gc-COUNT_ALLOCS.patch
5080ffc
5080ffc
# Similar COUNT_ALLOCS fixes for test_sys
5080ffc
# Not yet sent upstream
5080ffc
Patch128: python-3.2b2-test_sys-COUNT_ALLOCS.patch
5080ffc
c23ee7d
# In my koji builds, /root/bin is in the PATH for some reason
c23ee7d
# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error"
c23ee7d
# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising
c23ee7d
#  OSError: [Errno 13] Permission denied
c23ee7d
# when it tries to read /root/bin, rather than raising "No such file"
c23ee7d
#
c23ee7d
# Work around this by specifying an absolute path for the non-existant
c23ee7d
# executable
c23ee7d
# Not yet sent upstream
b218f78
Patch129: python-3.2.3-fix-test-subprocess-with-nonreadable-path-dir.patch
b218f78
b218f78
# Add non-standard hooks to unittest for use in the "check" phase below, when
b218f78
# running selftests within the build:
b218f78
#   @unittest._skipInRpmBuild(reason)
b218f78
# for tests that hang or fail intermittently within the build environment, and:
b218f78
#   @unittest._expectedFailureInRpmBuild
b218f78
# for tests that always fail within the build environment
b218f78
#
b218f78
# The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the
b218f78
# environment, which we set manually in the appropriate portion of the "check"
b218f78
# phase below (and which potentially other python-* rpms could set, to reuse
b218f78
# these unittest hooks in their own "check" phases)
b218f78
Patch132: 00132-add-rpmbuild-hooks-to-unittest.patch
b218f78
b218f78
# Fix a regex in test_gdb so that it doesn't choke when gdb provides a full
b218f78
# path to Python/bltinmodule.c:
b218f78
Patch152: 00152-fix-test-gdb-regex.patch
b218f78
b218f78
# Strip out lines of the form "warning: Unable to open ..." from gdb's stderr
b218f78
# when running test_gdb.py; also cope with change to gdb in F17 onwards in
b218f78
# which values are printed as "v@entry" rather than just "v":
b218f78
Patch153: 00153-fix-test_gdb-noise.patch
b218f78
b218f78
# Skip a test that requires sane DNS during rpmbuild, since this was failing
b218f78
# inside Koji for some reason:
b218f78
Patch154: 00154-skip-urllib-test-requiring-working-DNS.patch
c23ee7d
7eb10c8
# This is the generated patch to "configure"; see the description of
7eb10c8
#   %{regenerate_autotooling_patch}
7eb10c8
# above:
7eb10c8
Patch300: autotool-intermediates.patch
ab3441a
a3483f9
BuildRoot: %{_tmppath}/%{name}-%{version}-root
a3483f9
BuildRequires: readline-devel, openssl-devel, gmp-devel
a3483f9
BuildRequires: ncurses-devel, gdbm-devel, zlib-devel, expat-devel
a3483f9
BuildRequires: libGL-devel gcc-c++ libX11-devel glibc-devel
a3483f9
BuildRequires: bzip2 tar /usr/bin/find pkgconfig tcl-devel tk-devel
a3483f9
BuildRequires: tix-devel bzip2-devel sqlite-devel
a3483f9
BuildRequires: autoconf
a3483f9
BuildRequires: db4-devel >= 4.7
a3483f9
BuildRequires: libffi-devel
31a06df
%if 0%{?with_valgrind}
31a06df
BuildRequires: valgrind-devel
31a06df
%endif
a3483f9
c969609
%if 0%{?with_systemtap}
c969609
BuildRequires: systemtap-sdt-devel
c969609
%global tapsetdir      /usr/share/systemtap/tapset
c969609
%endif
c969609
a3483f9
URL: http://www.python.org/
a3483f9
a3483f9
# See notes in bug 532118:
a3483f9
Provides: python(abi) = %{pybasever}
a3483f9
26c1be5
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
26c1be5
a3483f9
%description
a3483f9
Python 3 is a new version of the language that is incompatible with the 2.x
a3483f9
line of releases. The language is mostly the same, but many details, especially
a3483f9
how built-in objects like dictionaries and strings work, have changed
a3483f9
considerably, and a lot of deprecated features have finally been removed.
a3483f9
a3483f9
%package libs
a3483f9
Summary:        Python 3 runtime libraries
a3483f9
Group:          Development/Libraries
a3483f9
#Requires:       %{name} = %{version}-%{release}
a3483f9
a3483f9
%description libs
a3483f9
This package contains files used to embed Python 3 into applications.
a3483f9
a3483f9
%package devel
a3483f9
Summary: Libraries and header files needed for Python 3 development
a3483f9
Group: Development/Libraries
6859f23
Requires: %{name}%{?_isa} = %{version}-%{release}
a3483f9
Conflicts: %{name} < %{version}-%{release}
a3483f9
a3483f9
%description devel
a3483f9
This package contains libraries and header files used to build applications 
a3483f9
with and native libraries for Python 3
a3483f9
a3483f9
%package tools
a3483f9
Summary: A collection of tools included with Python 3
a3483f9
Group: Development/Tools
a3483f9
Requires: %{name} = %{version}-%{release}
a3483f9
Requires: %{name}-tkinter = %{version}-%{release}
a3483f9
a3483f9
%description tools
a3483f9
This package contains several tools included with Python 3
a3483f9
a3483f9
%package tkinter
a3483f9
Summary: A GUI toolkit for Python 3
a3483f9
Group: Development/Languages
a3483f9
BuildRequires:  tcl, tk
a3483f9
Requires: %{name} = %{version}-%{release}
a3483f9
a3483f9
%description tkinter
a3483f9
The Tkinter (Tk interface) program is an graphical user interface for
a3483f9
the Python scripting language.
a3483f9
a3483f9
%package test
a3483f9
Summary: The test modules from the main python 3 package
a3483f9
Group: Development/Languages
a3483f9
Requires: %{name} = %{version}-%{release}
a3483f9
Requires: %{name}-tools = %{version}-%{release}
a3483f9
a3483f9
%description test
a3483f9
The test modules from the main %{name} package.
a3483f9
These are in a separate package to save space, as they are almost never used
a3483f9
in production.
a3483f9
a3483f9
You might want to install the python3-test package if you're developing
a3483f9
python 3 code that uses more than just unittest and/or test_support.py.
a3483f9
815994f
%if 0%{?with_debug_build}
55cf580
%package debug
55cf580
Summary: Debug version of the Python 3 runtime
55cf580
Group: Applications/System
55cf580
55cf580
# The debug build is an all-in-one package version of the regular build, and
55cf580
# shares the same .py/.pyc files and directories as the regular build.  Hence
55cf580
# we depend on all of the subpackages of the regular build:
55cf580
Requires: %{name}%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-test%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-tkinter%{?_isa} = %{version}-%{release}
55cf580
Requires: %{name}-tools%{?_isa} = %{version}-%{release}
55cf580
55cf580
%description debug
55cf580
python3-debug provides a version of the Python 3 runtime with numerous debugging
55cf580
features enabled, aimed at advanced Python users, such as developers of Python
55cf580
extension modules.
55cf580
55cf580
This version uses more memory and will be slower than the regular Python 3 build,
55cf580
but is useful for tracking down reference-counting issues, and other bugs.
55cf580
55cf580
The bytecodes are unchanged, so that .pyc files are compatible between the two
55cf580
versions of Python 3, but the debugging features mean that C/C++ extension
55cf580
modules are ABI-incompatible with those built for the standard runtime.
55cf580
55cf580
It shares installation directories with the standard Python 3 runtime, so that
55cf580
.py and .pyc files can be shared.  All compiled extension modules gain a "_d"
55cf580
suffix ("foo_d.so" rather than "foo.so") so that each Python 3 implementation
55cf580
can load its own extensions.
7eb10c8
%endif # with_debug_build
55cf580
a3483f9
%prep
607ce95
%setup -q -n Python-%{version}
a3483f9
chmod +x %{SOURCE1}
6859f23
c969609
%if 0%{?with_systemtap}
c969609
# Provide an example of usage of the tapset:
c969609
cp -a %{SOURCE6} .
71040c9
cp -a %{SOURCE7} .
c969609
%endif # with_systemtap
c969609
1ae4dd3
# Ensure that we're using the system copy of various libraries, rather than
1ae4dd3
# copies shipped by upstream in the tarball:
1ae4dd3
#   Remove embedded copy of expat:
1ae4dd3
rm -r Modules/expat || exit 1
1ae4dd3
1ae4dd3
#   Remove embedded copy of libffi:
6859f23
for SUBDIR in darwin libffi libffi_arm_wince libffi_msvc libffi_osx ; do
6859f23
  rm -r Modules/_ctypes/$SUBDIR || exit 1 ;
6859f23
done
6859f23
1ae4dd3
#   Remove embedded copy of zlib:
1ae4dd3
rm -r Modules/zlib || exit 1
1ae4dd3
1ae4dd3
#
1ae4dd3
# Apply patches:
1ae4dd3
#
7eb10c8
%patch1 -p1
a3483f9
%patch3 -p1 -b .remove-mimeaudio-tests
aa4aef2
%patch6 -p1 -b .no-static-lib
7eb10c8
c969609
%if 0%{?with_systemtap}
c969609
%patch8 -p1 -b .systemtap
c969609
%endif
a3483f9
a3483f9
%if "%{_lib}" == "lib64"
7eb10c8
%patch102 -p1
a3483f9
%endif
a3483f9
021b2bc
%patch104 -p1 -b .more-configuration-flags
55cf580
d73e38d
%patch105 -p1 -b .statvfs-f-flag-constants
55cf580
7eb10c8
%patch125 -p1 -b .less-verbose-COUNT_ALLOCS
5080ffc
%patch126 -p1
5080ffc
%patch127 -p1
5080ffc
%patch128 -p1
c23ee7d
%patch129 -p1
7eb10c8
b218f78
%patch132 -p1
b218f78
b218f78
%patch152 -p0
b218f78
%patch153 -p0
b218f78
%patch154 -p1
b218f78
a9e268f
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
a9e268f
# are many differences between 2.6 and the Python 3 library.
a9e268f
#
a9e268f
# Fix up the URLs within pydoc to point at the documentation for this
a9e268f
# MAJOR.MINOR version:
a9e268f
#
a9e268f
sed --in-place \
a9e268f
    --expression="s|http://docs.python.org/library|http://docs.python.org/%{pybasever}/library|g" \
a9e268f
    Lib/pydoc.py || exit 1
a3483f9
7eb10c8
%if ! 0%{regenerate_autotooling_patch}
7eb10c8
# Normally we apply the patch to "configure"
7eb10c8
# We don't apply the patch if we're working towards regenerating it
7eb10c8
%patch300 -p0 -b .autotool-intermediates
7eb10c8
%endif
7eb10c8
a3483f9
%build
55cf580
topdir=$(pwd)
5c9590b
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
5c9590b
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
a3483f9
export CPPFLAGS="`pkg-config --cflags-only-I libffi`"
5c9590b
export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
a3483f9
export LINKCC="gcc"
a3483f9
export CFLAGS="$CFLAGS `pkg-config --cflags openssl`"
a3483f9
export LDFLAGS="$LDFLAGS `pkg-config --libs-only-L openssl`"
a3483f9
7eb10c8
%if 0%{regenerate_autotooling_patch}
7eb10c8
# If enabled, this code regenerates the patch to "configure", using a
7eb10c8
# local copy of autoconf-2.65, then exits the build
7eb10c8
#
7eb10c8
# The following assumes that the copy is installed to ~/autoconf-2.65/bin
7eb10c8
# as per these instructions:
7eb10c8
#   http://bugs.python.org/issue7997
7eb10c8
7eb10c8
for f in pyconfig.h.in configure ; do
7eb10c8
    cp $f $f.autotool-intermediates ;
7eb10c8
done
7eb10c8
7eb10c8
# Rerun the autotools:
7eb10c8
PATH=~/autoconf-2.65/bin:$PATH autoreconf
c969609
7eb10c8
# Regenerate the patch:
7eb10c8
gendiff . .autotool-intermediates > %{PATCH300}
7eb10c8
7eb10c8
7eb10c8
# Exit the build
7eb10c8
exit 1
7eb10c8
%endif
c969609
55cf580
# Define a function, for how to perform a "build" of python for a given
55cf580
# configuration:
55cf580
BuildPython() {
55cf580
  ConfName=$1	      
55cf580
  BinaryName=$2
55cf580
  SymlinkName=$3
55cf580
  ExtraConfigArgs=$4
55cf580
  PathFixWithThisBinary=$5
55cf580
55cf580
  ConfDir=build/$ConfName
55cf580
55cf580
  echo STARTING: BUILD OF PYTHON FOR CONFIGURATION: $ConfName - %{_bindir}/$BinaryName
55cf580
  mkdir -p $ConfDir
55cf580
55cf580
  pushd $ConfDir
55cf580
55cf580
  # Use the freshly created "configure" script, but in the directory two above:
55cf580
  %global _configure $topdir/configure
55cf580
c969609
%configure \
c969609
  --enable-ipv6 \
c969609
  --with-wide-unicode \
c969609
  --enable-shared \
c969609
%if 0%{?with_systemtap}
c969609
  --with-dtrace \
c969609
  --with-tapset-install-dir=%{tapsetdir} \
c969609
%endif
c969609
  --with-system-ffi \
31a06df
%if 0%{?with_valgrind}
31a06df
  --with-valgrind \
31a06df
%endif
55cf580
  --with-system-expat \
55cf580
  $ExtraConfigArgs \
91b7804
  --with-computed-gotos=%{with_computed_gotos} \
55cf580
  %{nil}
c969609
5659c63
  # Set EXTRA_CFLAGS to our CFLAGS (rather than overriding OPT, as we've done
5659c63
  # in the past).
5659c63
  # This should fix a problem with --with-valgrind where it adds
5659c63
  #   -DDYNAMIC_ANNOTATIONS_ENABLED=1
5659c63
  # to OPT which must be passed to all compilation units in the build,
5659c63
  # otherwise leading to linker errors, e.g.
5659c63
  #    missing symbol AnnotateRWLockDestroy
5659c63
  #
5659c63
  # Invoke the build:
5659c63
  make EXTRA_CFLAGS="$CFLAGS" %{?_smp_mflags}
a3483f9
55cf580
  popd
55cf580
  echo FINISHED: BUILD OF PYTHON FOR CONFIGURATION: $ConfDir
55cf580
}
55cf580
55cf580
# Use "BuildPython" to support building with different configurations:
55cf580
815994f
%if 0%{?with_debug_build}
55cf580
BuildPython debug \
55cf580
  python-debug \
55cf580
  python%{pybasever}-debug \
66cf571
%ifarch %{ix86} x86_64 ppc ppc64
021b2bc
  "--with-pydebug --with-tsc --with-count-allocs --with-call-profile" \
66cf571
%else
66cf571
  "--with-pydebug --with-count-allocs --with-call-profile" \
66cf571
%endif
55cf580
  false
815994f
%endif # with_debug_build
55cf580
55cf580
BuildPython optimized \
55cf580
  python \
55cf580
  python%{pybasever} \
55cf580
  "" \
55cf580
  true
55cf580
a3483f9
a3483f9
%install
55cf580
topdir=$(pwd)
71040c9
rm -fr %{buildroot}
71040c9
mkdir -p %{buildroot}%{_prefix} %{buildroot}%{_mandir}
a3483f9
55cf580
InstallPython() {
55cf580
55cf580
  ConfName=$1	      
55cf580
  PyInstSoName=$2
55cf580
55cf580
  ConfDir=build/$ConfName
55cf580
55cf580
  echo STARTING: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
  mkdir -p $ConfDir
55cf580
55cf580
  pushd $ConfDir
55cf580
71040c9
make install DESTDIR=%{buildroot} INSTALL="install -p"
a3483f9
55cf580
55cf580
# Copy up the gdb hooks into place; the python file will be autoloaded by gdb
55cf580
# when visiting libpython.so, provided that the python file is installed to the
55cf580
# same path as the library (or its .debug file) plus a "-gdb.py" suffix, e.g:
55cf580
#  /usr/lib/debug/usr/lib64/libpython3.1.so.1.0.debug-gdb.py
55cf580
# (note that the debug path is /usr/lib/debug for both 32/64 bit)
55cf580
# 
55cf580
# Initially I tried:
55cf580
#  /usr/lib/libpython3.1.so.1.0-gdb.py
55cf580
# but doing so generated noise when ldconfig was rerun (rhbz:562980)
55cf580
#
55cf580
%if 0%{?with_gdb_hooks}
55cf580
DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
55cf580
PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
55cf580
55cf580
mkdir -p %{buildroot}$DirHoldingGdbPy
55cf580
cp %{SOURCE4} %{buildroot}$PathOfGdbPy
55cf580
%endif # with_gdb_hooks
55cf580
55cf580
  popd
55cf580
55cf580
  echo FINISHED: INSTALL OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
}
55cf580
55cf580
# Use "InstallPython" to support building with different configurations:
55cf580
55cf580
# Install the "debug" build first, so that we can move some files aside
815994f
%if 0%{?with_debug_build}
55cf580
InstallPython debug \
55cf580
  %{py_INSTSONAME_debug}
815994f
%endif # with_debug_build
55cf580
55cf580
# Now the optimized build:
55cf580
InstallPython optimized \
55cf580
  %{py_INSTSONAME_optimized}
55cf580
13c4a4f
install -d -m 0755 ${RPM_BUILD_ROOT}%{pylibdir}/site-packages/__pycache__
a3483f9
4aab458
mv ${RPM_BUILD_ROOT}%{_bindir}/2to3 ${RPM_BUILD_ROOT}%{_bindir}/python3-2to3
a3483f9
a3483f9
# Development tools
a3483f9
install -m755 -d ${RPM_BUILD_ROOT}%{pylibdir}/Tools
a3483f9
install Tools/README ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
cp -ar Tools/freeze ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
cp -ar Tools/i18n ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
cp -ar Tools/pynche ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
cp -ar Tools/scripts ${RPM_BUILD_ROOT}%{pylibdir}/Tools/
a3483f9
a3483f9
# Documentation tools
71040c9
install -m755 -d %{buildroot}%{pylibdir}/Doc
71040c9
cp -ar Doc/tools %{buildroot}%{pylibdir}/Doc/
a3483f9
a3483f9
# Demo scripts
34c15c7
cp -ar Tools/demo %{buildroot}%{pylibdir}/Tools/
a3483f9
a3483f9
# Fix for bug #136654
71040c9
rm -f %{buildroot}%{pylibdir}/email/test/data/audiotest.au %{buildroot}%{pylibdir}/test/audiotest.au
a3483f9
a3483f9
%if "%{_lib}" == "lib64"
13c4a4f
install -d -m 0755 %{buildroot}/usr/lib/python%{pybasever}/site-packages/__pycache__
a3483f9
%endif
a3483f9
a3483f9
# Make python3-devel multilib-ready (bug #192747, #139911)
a3483f9
%global _pyconfig32_h pyconfig-32.h
a3483f9
%global _pyconfig64_h pyconfig-64.h
a3483f9
a3483f9
%ifarch ppc64 s390x x86_64 ia64 alpha sparc64
a3483f9
%global _pyconfig_h %{_pyconfig64_h}
a3483f9
%else
a3483f9
%global _pyconfig_h %{_pyconfig32_h}
a3483f9
%endif
815994f
5080ffc
# ABIFLAGS, LDVERSION and SOABI are in the upstream Makefile
5080ffc
%global ABIFLAGS_optimized mu
5080ffc
%global ABIFLAGS_debug     dmu
5080ffc
5080ffc
%global LDVERSION_optimized %{pybasever}%{ABIFLAGS_optimized}
5080ffc
%global LDVERSION_debug     %{pybasever}%{ABIFLAGS_debug}
5080ffc
5080ffc
%global SOABI_optimized cpython-%{pyshortver}%{ABIFLAGS_optimized}
5080ffc
%global SOABI_debug     cpython-%{pyshortver}%{ABIFLAGS_debug}
5080ffc
815994f
%if 0%{?with_debug_build}
5080ffc
%global PyIncludeDirs python%{LDVERSION_optimized} python%{LDVERSION_debug}
5080ffc
815994f
%else
5080ffc
%global PyIncludeDirs python%{LDVERSION_optimized}
815994f
%endif
815994f
815994f
for PyIncludeDir in %{PyIncludeDirs} ; do
55cf580
  mv %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h \
55cf580
     %{buildroot}%{_includedir}/$PyIncludeDir/%{_pyconfig_h}
55cf580
  cat > %{buildroot}%{_includedir}/$PyIncludeDir/pyconfig.h << EOF
a3483f9
#include <bits/wordsize.h>
a3483f9
a3483f9
#if __WORDSIZE == 32
a3483f9
#include "%{_pyconfig32_h}"
a3483f9
#elif __WORDSIZE == 64
a3483f9
#include "%{_pyconfig64_h}"
a3483f9
#else
a3483f9
#error "Unknown word size"
a3483f9
#endif
a3483f9
EOF
55cf580
done
a3483f9
a3483f9
# Fix for bug 201434: make sure distutils looks at the right pyconfig.h file
824c34b
# Similar for sysconfig: sysconfig.get_config_h_filename tries to locate
824c34b
# pyconfig.h so it can be parsed, and needs to do this at runtime in site.py
824c34b
# when python starts up (bug 653058)
824c34b
#
824c34b
# Split this out so it goes directly to the pyconfig-32.h/pyconfig-64.h
824c34b
# variants:
824c34b
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \
824c34b
  %{buildroot}%{pylibdir}/distutils/sysconfig.py \
824c34b
  %{buildroot}%{pylibdir}/sysconfig.py
a3483f9
a3483f9
# Switch all shebangs to refer to the specific Python version.
55cf580
LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \
55cf580
  Tools/scripts/pathfix.py \
55cf580
  -i "%{_bindir}/python%{pybasever}" \
55cf580
  %{buildroot}
a3483f9
a3483f9
# Remove shebang lines from .py files that aren't executable, and
a3483f9
# remove executability from .py files that don't have a shebang line:
71040c9
find %{buildroot} -name \*.py \
a3483f9
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
a3483f9
  -print -exec sed -i '1d' {} \; \) -o \( \
a3483f9
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
a3483f9
  -exec chmod a-x {} \; \) \)
a3483f9
a3483f9
# .xpm and .xbm files should not be executable:
71040c9
find %{buildroot} \
a3483f9
  \( -name \*.xbm -o -name \*.xpm -o -name \*.xpm.1 \) \
a3483f9
  -exec chmod a-x {} \;
a3483f9
a3483f9
# Remove executable flag from files that shouldn't have it:
a3483f9
chmod a-x \
71040c9
  %{buildroot}%{pylibdir}/distutils/tests/Setup.sample \
34c15c7
  %{buildroot}%{pylibdir}/Tools/README
a3483f9
a3483f9
# Get rid of DOS batch files:
71040c9
find %{buildroot} -name \*.bat -exec rm {} \;
a3483f9
a3483f9
# Get rid of backup files:
71040c9
find %{buildroot}/ -name "*~" -exec rm -f {} \;
a3483f9
find . -name "*~" -exec rm -f {} \;
71040c9
rm -f %{buildroot}%{pylibdir}/LICENSE.txt
a3483f9
# Junk, no point in putting in -test sub-pkg
a3483f9
rm -f ${RPM_BUILD_ROOT}/%{pylibdir}/idlelib/testcode.py*
a3483f9
a3483f9
# Get rid of stray patch file from buildroot:
71040c9
rm -f %{buildroot}%{pylibdir}/test/test_imp.py.apply-our-changes-to-expected-shebang # from patch 4
a3483f9
a3483f9
# Fix end-of-line encodings:
71040c9
find %{buildroot}/ -name \*.py -exec sed -i 's/\r//' {} \;
a3483f9
a3483f9
# Fix an encoding:
71040c9
iconv -f iso8859-1 -t utf-8 %{buildroot}/%{pylibdir}/Demo/rpc/README > README.conv && mv -f README.conv %{buildroot}/%{pylibdir}/Demo/rpc/README
a3483f9
a3483f9
# Note that 
a3483f9
#  %{pylibdir}/Demo/distutils/test2to3/setup.py
a3483f9
# is in iso-8859-1 encoding, and that this is deliberate; this is test data
a3483f9
# for the 2to3 tool, and one of the functions of the 2to3 tool is to fixup
a3483f9
# character encodings within python source code
a3483f9
a3483f9
# Do bytecompilation with the new interpreter.
a3483f9
LD_LIBRARY_PATH=. /usr/lib/rpm/brp-python-bytecompile ./python
a3483f9
a3483f9
# Fixup permissions for shared libraries from non-standard 555 to standard 755:
71040c9
find %{buildroot} \
a3483f9
    -perm 555 -exec chmod 755 {} \;
a3483f9
71040c9
mkdir -p %{buildroot}/%{_sysconfdir}/rpm
71040c9
install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm
71040c9
install -m 644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/rpm
a3483f9
113725a
# Ensure that the curses module was linked against libncursesw.so, rather than
113725a
# libncurses.so (bug 539917)
71040c9
ldd %{buildroot}/%{dynload_dir}/_curses*.so \
113725a
    | grep curses \
113725a
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
113725a
55cf580
# Ensure that the debug modules are linked against the debug libpython, and
55cf580
# likewise for the optimized modules and libpython:
55cf580
for Module in %{buildroot}/%{dynload_dir}/*.so ; do
55cf580
    case $Module in
5080ffc
    *.%{SOABI_debug})
55cf580
        ldd $Module | grep %{py_INSTSONAME_optimized} &&
5080ffc
            (echo Debug module $Module linked against optimized %{py_INSTSONAME_optimized} ; exit 1)
55cf580
            
55cf580
        ;;
5080ffc
    *.%{SOABI_optimized})
55cf580
        ldd $Module | grep %{py_INSTSONAME_debug} &&
5080ffc
            (echo Optimized module $Module linked against debug %{py_INSTSONAME_debug} ; exit 1)
55cf580
        ;;
55cf580
    esac
55cf580
done
b2154fa
607ce95
# Create "/usr/bin/python3-debug", a symlink to the python3 debug binary, to
607ce95
# avoid the user having to know the precise version and ABI flags.  (see
607ce95
# e.g. rhbz#676748):
607ce95
ln -s \
607ce95
  %{_bindir}/python%{LDVERSION_debug} \
607ce95
  %{buildroot}%{_bindir}/python3-debug
607ce95
c969609
#
c969609
# Systemtap hooks:
c969609
#
c969609
%if 0%{?with_systemtap}
c969609
# Install a tapset for this libpython into tapsetdir, fixing up the path to the
c969609
# library:
c969609
mkdir -p %{buildroot}%{tapsetdir}
c969609
%ifarch ppc64 s390x x86_64 ia64 alpha sparc64
55cf580
%global libpython_stp_optimized libpython%{pybasever}-64.stp
55cf580
%global libpython_stp_debug     libpython%{pybasever}-debug-64.stp
c969609
%else
55cf580
%global libpython_stp_optimized libpython%{pybasever}-32.stp
55cf580
%global libpython_stp_debug     libpython%{pybasever}-debug-32.stp
c969609
%endif
c969609
c969609
sed \
55cf580
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_optimized}|" \
23be907
   %{_sourcedir}/libpython.stp \
55cf580
   > %{buildroot}%{tapsetdir}/%{libpython_stp_optimized}
55cf580
815994f
%if 0%{?with_debug_build}
55cf580
sed \
55cf580
   -e "s|LIBRARY_PATH|%{_libdir}/%{py_INSTSONAME_debug}|" \
23be907
   %{_sourcedir}/libpython.stp \
55cf580
   > %{buildroot}%{tapsetdir}/%{libpython_stp_debug}
815994f
%endif # with_debug_build
55cf580
c969609
%endif # with_systemtap
c969609
a3483f9
%check
55cf580
topdir=$(pwd)
55cf580
CheckPython() {
55cf580
  ConfName=$1	      
5080ffc
  ConfDir=$(pwd)/build/$ConfName
55cf580
55cf580
  echo STARTING: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
Daniel Drake fa4c8e4
  # Notes about disabled tests:
Daniel Drake fa4c8e4
  #
Daniel Drake fa4c8e4
  # test_distutils.py
Daniel Drake fa4c8e4
  #    This one tries to build an RPM inside the rpmbuild; I'll simply
Daniel Drake fa4c8e4
  # let this one fail for now (has trouble linking against -lpython3.1; perhaps
Daniel Drake fa4c8e4
  # LD_LIBRARY_PATH is being discarded somewhere?)
Daniel Drake fa4c8e4
  #
Daniel Drake fa4c8e4
  # test_http*
Daniel Drake fa4c8e4
  #   I've seen occasional hangs in some http tests when running the test suite
Daniel Drake fa4c8e4
  #   inside Koji on Python 3.  For that reason I exclude them
Daniel Drake fa4c8e4
  #
Daniel Drake fa4c8e4
  # test_openpty:
Daniel Drake fa4c8e4
  #   Fails in Koji, possibly due to a mock issue (rhbz#714627)
Daniel Drake fa4c8e4
  #     test test_openpty failed -- Traceback (most recent call last):
Daniel Drake fa4c8e4
  #       File "/builddir/build/BUILD/Python-3.2/Lib/test/test_openpty.py", line 12, in test
Daniel Drake fa4c8e4
  #         master, slave = os.openpty()
Daniel Drake fa4c8e4
  #     OSError: [Errno 2] No such file or directory
Daniel Drake fa4c8e4
  #
Daniel Drake fa4c8e4
  # test_pty:
Daniel Drake fa4c8e4
  #   Fails in Koji, possibly due to a mock issue (rhbz#714627)
Daniel Drake fa4c8e4
  #     test test_pty failed -- Traceback (most recent call last):
Daniel Drake fa4c8e4
  #       File "/builddir/build/BUILD/Python-3.2/Lib/test/test_pty.py", line 114, in test_fork
Daniel Drake fa4c8e4
  #         pid, master_fd = pty.fork()
Daniel Drake fa4c8e4
  #       File "/builddir/build/BUILD/Python-3.2/Lib/pty.py", line 107, in fork
Daniel Drake fa4c8e4
  #         master_fd, slave_fd = openpty()
Daniel Drake fa4c8e4
  #       File "/builddir/build/BUILD/Python-3.2/Lib/pty.py", line 29, in openpty
Daniel Drake fa4c8e4
  #         master_fd, slave_name = _open_terminal()
Daniel Drake fa4c8e4
  #       File "/builddir/build/BUILD/Python-3.2/Lib/pty.py", line 70, in _open_terminal
Daniel Drake fa4c8e4
  #         raise os.error('out of pty devices')
Daniel Drake fa4c8e4
  #     OSError: out of pty devices
Daniel Drake fa4c8e4
  #
Daniel Drake fa4c8e4
  # test_socket:
Daniel Drake fa4c8e4
  #   test_socket.py:testSockName can fail here if DNS isn't properly set up:
Daniel Drake fa4c8e4
  #     my_ip_addr = socket.gethostbyname(socket.gethostname())
Daniel Drake fa4c8e4
  #   socket.gaierror: [Errno -2] Name or service not known
Daniel Drake fa4c8e4
  #
Daniel Drake fa4c8e4
  # test_telnet:
Daniel Drake fa4c8e4
  #    can get a "socket.error: [Errno 104] Connection reset by peer"
Daniel Drake fa4c8e4
  #
Daniel Drake fa4c8e4
  # Some additional tests fail when running the test suite as non-root outside of
Daniel Drake fa4c8e4
  # the build, due to permissions issues.
Daniel Drake fa4c8e4
Daniel Drake fa4c8e4
%ifarch %{arm}
Daniel Drake fa4c8e4
  EXCLUDED_TESTS="\
Daniel Drake fa4c8e4
      test_distutils \
Daniel Drake fa4c8e4
      test_httplib \
Daniel Drake fa4c8e4
      test_http_cookies \
Daniel Drake fa4c8e4
      test_openpty \
Daniel Drake fa4c8e4
      test_pty.py \
Daniel Drake fa4c8e4
      test_pty \
Daniel Drake fa4c8e4
      test_socket \
Daniel Drake fa4c8e4
      test_telnet \
Daniel Drake fa4c8e4
      test_float \
Daniel Drake fa4c8e4
  %{nil}"
Daniel Drake fa4c8e4
%else
Daniel Drake fa4c8e4
  EXCLUDED_TESTS="\
Daniel Drake fa4c8e4
      test_distutils \
Daniel Drake fa4c8e4
      test_httplib \
Daniel Drake fa4c8e4
      test_http_cookies \
Daniel Drake fa4c8e4
      test_openpty \
Daniel Drake fa4c8e4
      test_pty.py \
Daniel Drake fa4c8e4
      test_socket \
Daniel Drake fa4c8e4
      test_telnet \
Daniel Drake fa4c8e4
  %{nil}"
Daniel Drake fa4c8e4
%endif
a3483f9
Daniel Drake fa4c8e4
  # Note that we're running the tests using the version of the code in the builddir,
Daniel Drake fa4c8e4
  # not in the buildroot.
a3483f9
b218f78
  # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the
b218f78
  # our non-standard decorators take effect on the relevant tests:
b218f78
  #   @unittest._skipInRpmBuild(reason)
b218f78
  #   @unittest._expectedFailureInRpmBuild
b218f78
  WITHIN_PYTHON_RPM_BUILD= \
b218f78
  LD_LIBRARY_PATH=$ConfDir $ConfDir/python -m test.regrtest -v -x $EXCLUDED_TESTS
a3483f9
Daniel Drake fa4c8e4
  echo FINISHED: CHECKING OF PYTHON FOR CONFIGURATION: $ConfName
55cf580
55cf580
}
55cf580
55cf580
# Check each of the configurations:
815994f
%if 0%{?with_debug_build}
55cf580
CheckPython debug
815994f
%endif # with_debug_build
55cf580
CheckPython optimized
55cf580
55cf580
a3483f9
%clean
71040c9
rm -fr %{buildroot}
a3483f9
a3483f9
%post libs -p /sbin/ldconfig
a3483f9
a3483f9
%postun libs -p /sbin/ldconfig
a3483f9
4aab458
%files
a3483f9
%defattr(-, root, root)
a3483f9
%doc LICENSE README
a3483f9
%{_bindir}/pydoc*
a3483f9
%{_bindir}/python3
a3483f9
%{_bindir}/python%{pybasever}
5080ffc
%{_bindir}/python%{pybasever}mu
a3483f9
%{_mandir}/*/*
26c1be5
26c1be5
%files libs
26c1be5
%defattr(-,root,root,-)
26c1be5
%doc LICENSE README
a3483f9
%dir %{pylibdir}
4aab458
%dir %{dynload_dir}
607ce95
%{dynload_dir}/Python-%{version}-py%{pybasever}.egg-info
5080ffc
%{dynload_dir}/_bisect.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_cn.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_hk.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_iso2022.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_jp.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_kr.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_codecs_tw.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_csv.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_ctypes.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_curses.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_curses_panel.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_dbm.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_elementtree.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_gdbm.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_hashlib.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_heapq.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_json.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_lsprof.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_multibytecodec.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_multiprocessing.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_pickle.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_posixsubprocess.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_random.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_socket.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_sqlite3.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_ssl.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_struct.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/array.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/atexit.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/audioop.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/binascii.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/bz2.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/cmath.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/crypt.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_datetime.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/fcntl.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/grp.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/math.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/mmap.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/nis.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/ossaudiodev.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/parser.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/pyexpat.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/readline.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/resource.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/select.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/spwd.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/syslog.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/termios.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/time.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/unicodedata.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/xxlimited.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/zlib.%{SOABI_optimized}.so
4aab458
13c4a4f
%dir %{pylibdir}/site-packages/
13c4a4f
%dir %{pylibdir}/site-packages/__pycache__/
a3483f9
%{pylibdir}/site-packages/README
7eb10c8
%{pylibdir}/*.py
e1c7be0
%dir %{pylibdir}/__pycache__/
7eb10c8
%{pylibdir}/__pycache__/*%{bytecode_suffixes}
a3483f9
%{pylibdir}/wsgiref.egg-info
5080ffc
5080ffc
%dir %{pylibdir}/concurrent/
5080ffc
%dir %{pylibdir}/concurrent/__pycache__/
5080ffc
%{pylibdir}/concurrent/*.py
5080ffc
%{pylibdir}/concurrent/__pycache__/*%{bytecode_suffixes}
5080ffc
5080ffc
%dir %{pylibdir}/concurrent/futures/
5080ffc
%dir %{pylibdir}/concurrent/futures/__pycache__/
5080ffc
%{pylibdir}/concurrent/futures/*.py
5080ffc
%{pylibdir}/concurrent/futures/__pycache__/*%{bytecode_suffixes}
5080ffc
5080ffc
%dir %{pylibdir}/ctypes/
e1c7be0
%dir %{pylibdir}/ctypes/__pycache__/
7eb10c8
%{pylibdir}/ctypes/*.py
7eb10c8
%{pylibdir}/ctypes/__pycache__/*%{bytecode_suffixes}
a3483f9
%{pylibdir}/ctypes/macholib
5080ffc
a3483f9
%{pylibdir}/curses
5080ffc
5080ffc
%dir %{pylibdir}/dbm/
e1c7be0
%dir %{pylibdir}/dbm/__pycache__/
7eb10c8
%{pylibdir}/dbm/*.py
7eb10c8
%{pylibdir}/dbm/__pycache__/*%{bytecode_suffixes}
5080ffc
5080ffc
%dir %{pylibdir}/distutils/
e1c7be0
%dir %{pylibdir}/distutils/__pycache__/
7eb10c8
%{pylibdir}/distutils/*.py
7eb10c8
%{pylibdir}/distutils/__pycache__/*%{bytecode_suffixes}
a3483f9
%{pylibdir}/distutils/README
a3483f9
%{pylibdir}/distutils/command
5080ffc
5080ffc
%dir %{pylibdir}/email/
e1c7be0
%dir %{pylibdir}/email/__pycache__/
7eb10c8
%{pylibdir}/email/*.py
7eb10c8
%{pylibdir}/email/__pycache__/*%{bytecode_suffixes}
a3483f9
%{pylibdir}/email/mime
5080ffc
a3483f9
%{pylibdir}/encodings
a3483f9
%{pylibdir}/html
a3483f9
%{pylibdir}/http
a3483f9
%{pylibdir}/idlelib
5080ffc
5080ffc
%dir %{pylibdir}/importlib/
e1c7be0
%dir %{pylibdir}/importlib/__pycache__/
7eb10c8
%{pylibdir}/importlib/*.py
7eb10c8
%{pylibdir}/importlib/__pycache__/*%{bytecode_suffixes}
5080ffc
5080ffc
%dir %{pylibdir}/json/
e1c7be0
%dir %{pylibdir}/json/__pycache__/
7eb10c8
%{pylibdir}/json/*.py
7eb10c8
%{pylibdir}/json/__pycache__/*%{bytecode_suffixes}
5080ffc
6a82c19
%{pylibdir}/lib2to3
6a82c19
%exclude %{pylibdir}/lib2to3/tests
a3483f9
%{pylibdir}/logging
a3483f9
%{pylibdir}/multiprocessing
a3483f9
%{pylibdir}/plat-linux2
a3483f9
%{pylibdir}/pydoc_data
5080ffc
5080ffc
%dir %{pylibdir}/sqlite3/
e1c7be0
%dir %{pylibdir}/sqlite3/__pycache__/
7eb10c8
%{pylibdir}/sqlite3/*.py
7eb10c8
%{pylibdir}/sqlite3/__pycache__/*%{bytecode_suffixes}
5080ffc
5080ffc
%dir %{pylibdir}/test/
e1c7be0
%dir %{pylibdir}/test/__pycache__/
7eb10c8
%{pylibdir}/test/__init__.py
e1c7be0
%{pylibdir}/test/support.py
7eb10c8
%{pylibdir}/test/__pycache__/__init__%{bytecode_suffixes}
e1c7be0
%{pylibdir}/test/__pycache__/support%{bytecode_suffixes}
5080ffc
5080ffc
%exclude %{pylibdir}/turtle.py
5080ffc
%exclude %{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
5080ffc
5080ffc
%dir %{pylibdir}/unittest/
e1c7be0
%dir %{pylibdir}/unittest/__pycache__/
7eb10c8
%{pylibdir}/unittest/*.py
7eb10c8
%{pylibdir}/unittest/__pycache__/*%{bytecode_suffixes}
5080ffc
a3483f9
%{pylibdir}/urllib
a3483f9
%{pylibdir}/wsgiref
a3483f9
%{pylibdir}/xml
a3483f9
%{pylibdir}/xmlrpc
5080ffc
a3483f9
%if "%{_lib}" == "lib64"
37de674
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}
37de674
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages
13c4a4f
%attr(0755,root,root) %dir %{_prefix}/lib/python%{pybasever}/site-packages/__pycache__/
a3483f9
%endif
a3483f9
a3483f9
# "Makefile" and the config-32/64.h file are needed by
a3483f9
# distutils/sysconfig.py:_init_posix(), so we include them in the core
a3483f9
# package, along with their parent directories (bug 531901):
5080ffc
%dir %{pylibdir}/config-%{LDVERSION_optimized}/
5080ffc
%{pylibdir}/config-%{LDVERSION_optimized}/Makefile
5080ffc
%dir %{_includedir}/python%{LDVERSION_optimized}/
5080ffc
%{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a3483f9
55cf580
%{_libdir}/%{py_INSTSONAME_optimized}
34c15c7
%{_libdir}/libpython3.so
c969609
%if 0%{?with_systemtap}
55cf580
%{tapsetdir}/%{libpython_stp_optimized}
71040c9
%doc systemtap-example.stp pyfuntop.stp
c969609
%endif
a3483f9
a3483f9
%files devel
a3483f9
%defattr(-,root,root)
5080ffc
%{pylibdir}/config-%{LDVERSION_optimized}/*
5080ffc
%exclude %{pylibdir}/config-%{LDVERSION_optimized}/Makefile
5080ffc
%{_includedir}/python%{LDVERSION_optimized}/*.h
5080ffc
%exclude %{_includedir}/python%{LDVERSION_optimized}/%{_pyconfig_h}
a3483f9
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
a3483f9
%{_bindir}/python3-config
a3483f9
%{_bindir}/python%{pybasever}-config
5080ffc
%{_bindir}/python%{LDVERSION_optimized}-config
5080ffc
%{_libdir}/libpython%{LDVERSION_optimized}.so
5080ffc
%{_libdir}/pkgconfig/python-%{LDVERSION_optimized}.pc
55cf580
%{_libdir}/pkgconfig/python-%{pybasever}.pc
55cf580
%{_libdir}/pkgconfig/python3.pc
a3483f9
%config(noreplace) %{_sysconfdir}/rpm/macros.python3
4aab458
%config(noreplace) %{_sysconfdir}/rpm/macros.pybytecompile
a3483f9
a3483f9
%files tools
a3483f9
%defattr(-,root,root,755)
4aab458
%{_bindir}/python3-2to3
34c15c7
%{_bindir}/2to3-%{pybasever}
a3483f9
%{_bindir}/idle*
a3483f9
%{pylibdir}/Tools
a3483f9
%doc %{pylibdir}/Doc
a3483f9
a3483f9
%files tkinter
a3483f9
%defattr(-,root,root,755)
a3483f9
%{pylibdir}/tkinter
a3483f9
%exclude %{pylibdir}/tkinter/test
5080ffc
%{dynload_dir}/_tkinter.%{SOABI_optimized}.so
5080ffc
%{pylibdir}/turtle.py
5080ffc
%{pylibdir}/__pycache__/turtle*%{bytecode_suffixes}
5080ffc
%dir %{pylibdir}/turtledemo
5080ffc
%{pylibdir}/turtledemo/*.py
5080ffc
%{pylibdir}/turtledemo/*.txt
5080ffc
%{pylibdir}/turtledemo/*.cfg
5080ffc
%dir %{pylibdir}/turtledemo/__pycache__/
5080ffc
%{pylibdir}/turtledemo/__pycache__/*%{bytecode_suffixes}
a3483f9
a3483f9
%files test
a3483f9
%defattr(-, root, root)
a3483f9
%{pylibdir}/ctypes/test
a3483f9
%{pylibdir}/distutils/tests
a3483f9
%{pylibdir}/email/test
a3483f9
%{pylibdir}/importlib/test
a3483f9
%{pylibdir}/sqlite3/test
a3483f9
%{pylibdir}/test
5080ffc
%{dynload_dir}/_ctypes_test.%{SOABI_optimized}.so
5080ffc
%{dynload_dir}/_testcapi.%{SOABI_optimized}.so
a3483f9
%{pylibdir}/lib2to3/tests
a3483f9
%{pylibdir}/tkinter/test
e1c7be0
%{pylibdir}/unittest/test
a3483f9
55cf580
55cf580
# We don't bother splitting the debug build out into further subpackages:
55cf580
# if you need it, you're probably a developer.
55cf580
55cf580
# Hence the manifest is the combination of analogous files in the manifests of
55cf580
# all of the other subpackages
55cf580
815994f
%if 0%{?with_debug_build}
55cf580
%files debug
55cf580
%defattr(-,root,root,-)
55cf580
55cf580
# Analog of the core subpackage's files:
5080ffc
%{_bindir}/python%{LDVERSION_debug}
607ce95
%{_bindir}/python3-debug
55cf580
26c1be5
# Analog of the -libs subpackage's files:
55cf580
# ...with debug builds of the built-in "extension" modules:
5080ffc
%{dynload_dir}/_bisect.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_cn.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_hk.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_iso2022.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_jp.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_kr.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_codecs_tw.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_csv.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_ctypes.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_curses.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_curses_panel.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_dbm.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_elementtree.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_gdbm.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_hashlib.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_heapq.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_json.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_lsprof.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_md5.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_multibytecodec.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_multiprocessing.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_pickle.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_posixsubprocess.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_random.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_sha1.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_sha256.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_sha512.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_socket.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_sqlite3.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_ssl.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_struct.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/array.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/atexit.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/audioop.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/binascii.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/bz2.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/cmath.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/crypt.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_datetime.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/fcntl.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/grp.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/math.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/mmap.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/nis.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/ossaudiodev.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/parser.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/pyexpat.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/readline.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/resource.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/select.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/spwd.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/syslog.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/termios.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/time.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/unicodedata.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/zlib.%{SOABI_debug}.so
55cf580
55cf580
# No need to split things out the "Makefile" and the config-32/64.h file as we
55cf580
# do for the regular build above (bug 531901), since they're all in one package
55cf580
# now; they're listed below, under "-devel":
55cf580
55cf580
%{_libdir}/%{py_INSTSONAME_debug}
55cf580
%if 0%{?with_systemtap}
55cf580
%{tapsetdir}/%{libpython_stp_debug}
55cf580
%endif
55cf580
55cf580
# Analog of the -devel subpackage's files:
5080ffc
%{pylibdir}/config-%{LDVERSION_debug}
5080ffc
%{_includedir}/python%{LDVERSION_debug}
5080ffc
%{_bindir}/python%{LDVERSION_debug}-config
5080ffc
%{_libdir}/libpython%{LDVERSION_debug}.so
5080ffc
%{_libdir}/pkgconfig/python-%{LDVERSION_debug}.pc
55cf580
55cf580
# Analog of the -tools subpackage's files:
55cf580
#  None for now; we could build precanned versions that have the appropriate
55cf580
# shebang if needed
55cf580
55cf580
# Analog  of the tkinter subpackage's files:
5080ffc
%{dynload_dir}/_tkinter.%{SOABI_debug}.so
55cf580
55cf580
# Analog  of the -test subpackage's files:
5080ffc
%{dynload_dir}/_ctypes_test.%{SOABI_debug}.so
5080ffc
%{dynload_dir}/_testcapi.%{SOABI_debug}.so
55cf580
815994f
%endif # with_debug_build
815994f
d5a5bf3
# We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from
d5a5bf3
# ldconfig (rhbz:562980).
d5a5bf3
# 
d5a5bf3
# The /usr/lib/rpm/redhat/macros defines %__debug_package to use
d5a5bf3
# debugfiles.list, and it appears that everything below /usr/lib/debug and
d5a5bf3
# (/usr/src/debug) gets added to this file (via LISTFILES) in
d5a5bf3
# /usr/lib/rpm/find-debuginfo.sh
d5a5bf3
# 
d5a5bf3
# Hence by installing it below /usr/lib/debug we ensure it is added to the
d5a5bf3
# -debuginfo subpackage
d5a5bf3
# (if it doesn't, then the rpmbuild ought to fail since the debug-gdb.py 
d5a5bf3
# payload file would be unpackaged)
d5a5bf3
d5a5bf3
a3483f9
%changelog
b218f78
* Thu Apr 12 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-1
b218f78
- 3.2.3; refresh patch 6 (no static lib), patch 102 (lib64) and patch 129
b218f78
(test_subprocess); fix test_gdb (patches 152 and 153); regenerate the autotool
b218f78
intermediates patch (patch 300); run unit tests verbosely; add support for
b218f78
skipping unit tests in rpmbuild (patch 132), use it to skip a specific urllib
b218f78
test (patch 154)
b218f78
Daniel Drake fa4c8e4
* Sun Oct 09 2011 Daniel Drake <dsd@laptop.org> - 3.2-3
Daniel Drake fa4c8e4
- don't run test_openpty and test_pty in %%check
Daniel Drake fa4c8e4
- exclude failing tests on ARM
Daniel Drake fa4c8e4
23be907
* Tue Apr 19 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-2
23be907
- fix the libpython.stp systemtap tapset (rhbz#697730)
23be907
607ce95
* Mon Feb 21 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-1
607ce95
- 3.2
607ce95
- remove alphatag
607ce95
- regenerate autotool patch
607ce95
- add a /usr/bin/python3-debug symlink within the debug subpackage
607ce95
fef240e
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2-0.11.rc2
fef240e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
fef240e
fc9ba51
* Mon Jan 31 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.10.rc2
fc9ba51
- 3.2rc2
fc9ba51
34c15c7
* Mon Jan 17 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.9.rc1
34c15c7
- 3.2rc1
34c15c7
- rework patch 6 (static lib removal)
34c15c7
- remove upstreamed patch 130 (ppc debug build)
34c15c7
- regenerate patch 300 (autotool intermediates)
34c15c7
- updated packaging to reflect upstream rewrite of "Demo" (issue 7962)
34c15c7
- added libpython3.so and 2to3-3.2
34c15c7
5659c63
* Wed Jan  5 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.8.b2
5659c63
- set EXTRA_CFLAGS to our CFLAGS, rather than overriding OPT, fixing a linker
5659c63
error with dynamic annotations (when configured using --with-valgrind)
5659c63
- fix the ppc build of the debug configuration (patch 130; rhbz#661510)
5659c63
31a06df
* Tue Jan  4 2011 David Malcolm <dmalcolm@redhat.com> - 3.2-0.7.b2
31a06df
- add --with-valgrind to configuration (on architectures that support this)
31a06df
c23ee7d
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.6.b2
c23ee7d
- work around test_subprocess failure seen in koji (patch 129)
c23ee7d
5080ffc
* Tue Dec 28 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.5.b2
5080ffc
- 3.2b2
5080ffc
- rework patch 3 (removal of mimeaudio tests), patch 6 (no static libs),
5080ffc
patch 8 (systemtap), patch 102 (lib64)
5080ffc
- remove patch 4 (rendered redundant by upstream r85537), patch 103 (PEP 3149),
5080ffc
patch 110 (upstreamed expat fix), patch 111 (parallel build fix for grammar
5080ffc
fixed upstream)
5080ffc
- regenerate patch 300 (autotool intermediates)
5080ffc
- workaround COUNT_ALLOCS weakref issues in test suite (patch 126, patch 127,
5080ffc
patch 128)
5080ffc
- stop using runtest.sh in %%check (dropped by upstream), replacing with
5080ffc
regrtest; fixup list of failing tests
5080ffc
- introduce "pyshortver", "SOABI_optimized" and "SOABI_debug" macros
5080ffc
- rework manifests of shared libraries to use "SOABI_" macros, reflecting
5080ffc
PEP 3149
5080ffc
- drop itertools, operator and _collections modules from the manifests as py3k
5080ffc
commit r84058 moved these inside libpython; json/tests moved to test/json_tests
5080ffc
- move turtle code into the tkinter subpackage
5080ffc
824c34b
* Wed Nov 17 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.5.a1
824c34b
- fix sysconfig to not rely on the -devel subpackage (rhbz#653058)
824c34b
26c1be5
* Thu Sep  9 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.4.a1
26c1be5
- move most of the content of the core package to the libs subpackage, given
26c1be5
that the libs aren't meaningfully usable without the standard libraries
26c1be5
e1c7be0
* Wed Sep  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.3.a1
e1c7be0
- Move test.support to core package (rhbz#596258)
e1c7be0
- Add various missing __pycache__ directories to payload
e1c7be0
13c4a4f
* Sun Aug 22 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.2-0.2.a1
13c4a4f
- Add __pycache__ directory for site-packages
13c4a4f
997d5a2
* Sun Aug 22 2010 Thomas Spura <tomspur@fedoraproject.org> - 3.2-0.1.a1
997d5a2
- on 64bit "stdlib" was still "/usr/lib/python*" (modify *lib64.patch)
997d5a2
- make find-provides-without-python-sonames.sh 64bit aware
997d5a2
7eb10c8
* Sat Aug 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-0.0.a1
7eb10c8
- 3.2a1; add alphatag
7eb10c8
- rework %%files in the light of PEP 3147 (__pycache__)
7eb10c8
- drop our configuration patch to Setup.dist (patch 0): setup.py should do a
7eb10c8
better job of things, and the %%files explicitly lists our modules (r82746
7eb10c8
appears to break the old way of doing things).  This leads to various modules
7eb10c8
changing from "foomodule.so" to "foo.so".  It also leads to the optimized build
7eb10c8
dropping the _sha1, _sha256 and _sha512 modules, but these are provided by
7eb10c8
_hashlib; _weakref becomes a builtin module; xxsubtype goes away (it's only for
7eb10c8
testing/devel purposes)
7eb10c8
- fixup patches 3, 4, 6, 8, 102, 103, 105, 111 for the rebase
7eb10c8
- remove upstream patches: 7 (system expat), 106, 107, 108 (audioop reformat
7eb10c8
plus CVE-2010-1634 and CVE-2010-2089), 109 (CVE-2008-5983)
7eb10c8
- add machinery for rebuilding "configure" and friends, using the correct
7eb10c8
version of autoconf (patch 300)
7eb10c8
- patch the debug build's usage of COUNT_ALLOCS to be less verbose (patch 125)
7eb10c8
- "modulator" was removed upstream
7eb10c8
- drop "-b" from patch applications affecting .py files to avoid littering the
7eb10c8
installation tree
7eb10c8
ab3441a
* Thu Aug 19 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 3.1.2-13
91b7804
- Turn on computed-gotos.
ab3441a
- Fix for parallel make and graminit.c
91b7804
9b81ebe
* Fri Jul  2 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-12
9b81ebe
- rebuild
9b81ebe
03b7fb2
* Fri Jul  2 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-11
03b7fb2
- Fix an incompatibility between pyexpat and the system expat-2.0.1 that led to
03b7fb2
a segfault running test_pyexpat.py (patch 110; upstream issue 9054; rhbz#610312)
03b7fb2
5c9590b
* Fri Jun  4 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-10
5c9590b
- ensure that the compiler is invoked with "-fwrapv" (rhbz#594819)
5c9590b
- reformat whitespace in audioop.c (patch 106)
5c9590b
- CVE-2010-1634: fix various integer overflow checks in the audioop
5c9590b
module (patch 107)
5c9590b
- CVE-2010-2089: further checks within the audioop module (patch 108)
5c9590b
- CVE-2008-5983: the new PySys_SetArgvEx entry point from r81399 (patch 109)
5c9590b
66cf571
* Thu May 27 2010 Dan HorĂ¡k <dan[at]danny.cz> - 3.1.2-9
66cf571
- reading the timestamp counter is available only on some arches (see Python/ceval.c)
66cf571
d73e38d
* Wed May 26 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-8
d73e38d
- add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
d73e38d
(patch 105)
d73e38d
021b2bc
* Tue May 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-7
021b2bc
- add configure-time support for COUNT_ALLOCS and CALL_PROFILE debug options
021b2bc
(patch 104); enable them and the WITH_TSC option within the debug build
021b2bc
55cf580
* Mon May 24 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-6
55cf580
- build and install two different configurations of Python 3: debug and
55cf580
standard, packaging the debug build in a new "python3-debug" subpackage
55cf580
(patch 103)
55cf580
bbd09cc
* Tue Apr 13 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-5
bbd09cc
- exclude test_http_cookies when running selftests, due to hang seen on
bbd09cc
http://koji.fedoraproject.org/koji/taskinfo?taskID=2088463 (cancelled after
bbd09cc
11 hours)
bbd09cc
- update python-gdb.py from v5 to py3k version submitted upstream
bbd09cc
80325d9
* Wed Mar 31 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-4
80325d9
- update python-gdb.py from v4 to v5 (improving performance and stability,
80325d9
adding commands)
80325d9
da0826a
* Thu Mar 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-3
da0826a
- update python-gdb.py from v3 to v4 (fixing infinite recursion on reference
da0826a
cycles and tracebacks on bytes 0x80-0xff in strings, adding handlers for sets
da0826a
and exceptions)
da0826a
485fd76
* Wed Mar 24 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-2
485fd76
- refresh gdb hooks to v3 (reworking how they are packaged)
485fd76
eeb0b9b
* Sun Mar 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.2-1
eeb0b9b
- update to 3.1.2: http://www.python.org/download/releases/3.1.2/
eeb0b9b
- drop upstreamed patch 2 (.pyc permissions handling)
eeb0b9b
- drop upstream patch 5 (fix for the test_tk and test_ttk_* selftests)
eeb0b9b
- drop upstreamed patch 200 (path-fixing script)
eeb0b9b
536a207
* Sat Mar 20 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-28
536a207
- fix typo in libpython.stp (rhbz:575336)
536a207
71040c9
* Fri Mar 12 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-27
71040c9
- add pyfuntop.stp example (source 7)
71040c9
- convert usage of $$RPM_BUILD_ROOT to %%{buildroot} throughout, for
71040c9
consistency with python.spec
71040c9
3d86c8f
* Mon Feb 15 2010 Thomas Spura <tomspur@fedoraproject.org> - 3.1.1-26
3d86c8f
- rebuild for new package of redhat-rpm-config (rhbz:564527)
3d86c8f
- use 'install -p' when running 'make install'
3d86c8f
c969609
* Fri Feb 12 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-25
c969609
- split configure options into multiple lines for easy of editing
c969609
- add systemtap static markers (wcohen, mjw, dmalcolm; patch 8), a systemtap
c969609
tapset defining "python.function.entry" and "python.function.return" to make
c969609
the markers easy to use (dmalcolm; source 5), and an example of using the
c969609
tapset to the docs (dmalcolm; source 6) (rhbz:545179)
c969609
d5a5bf3
* Mon Feb  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-24
d5a5bf3
- move the -gdb.py file from %%{_libdir}/INSTSONAME-gdb.py to
d5a5bf3
%%{_prefix}/lib/debug/%%{_libdir}/INSTSONAME.debug-gdb.py to avoid noise from
d5a5bf3
ldconfig (bug 562980), and which should also ensure it becomes part of the
d5a5bf3
debuginfo subpackage, rather than the libs subpackage
d5a5bf3
- introduce %%{py_SOVERSION} and %%{py_INSTSONAME} to reflect the upstream
d5a5bf3
configure script, and to avoid fragile scripts that try to figure this out
d5a5bf3
dynamically (e.g. for the -gdb.py change)
d5a5bf3
b2154fa
* Mon Feb  8 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-23
b2154fa
- add gdb hooks for easier debugging (Source 4)
b2154fa
1ae4dd3
* Thu Jan 28 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-22
1ae4dd3
- update python-3.1.1-config.patch to remove downstream customization of build
1ae4dd3
of pyexpat and elementtree modules
1ae4dd3
- add patch adapted from upstream (patch 7) to add support for building against
1ae4dd3
system expat; add --with-system-expat to "configure" invocation
1ae4dd3
- remove embedded copies of expat and zlib from source tree during "prep"
1ae4dd3
4aab458
* Mon Jan 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-21
4aab458
- introduce %%{dynload_dir} macro
4aab458
- explicitly list all lib-dynload files, rather than dynamically gathering the
4aab458
payload into a temporary text file, so that we can be sure what we are
4aab458
shipping
4aab458
- introduce a macros.pybytecompile source file, to help with packaging python3
4aab458
modules (Source3; written by Toshio)
4aab458
- rename "2to3-3" to "python3-2to3" to better reflect python 3 module packaging
4aab458
plans
4aab458
113725a
* Mon Jan 25 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-20
113725a
- change python-3.1.1-config.patch to remove our downstream change to curses
113725a
configuration in Modules/Setup.dist, so that the curses modules are built using
113725a
setup.py with the downstream default (linking against libncursesw.so, rather
113725a
than libncurses.so), rather than within the Makefile; add a test to %%install
113725a
to verify the dso files that the curses module is linked against the correct
113725a
DSO (bug 539917; changes _cursesmodule.so -> _curses.so)
113725a
d5d2307
* Fri Jan 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-19
d5d2307
- add %%py3dir macro to macros.python3 (to be used during unified python 2/3
d5d2307
builds for setting up the python3 copy of the source tree)
d5d2307
6a82c19
* Wed Jan 20 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-18
6a82c19
- move lib2to3 from -tools subpackage to main package (bug 556667)
6a82c19
aa4aef2
* Sun Jan 17 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-17
aa4aef2
- patch Makefile.pre.in to avoid building static library (patch 6, bug 556092)
aa4aef2
6859f23
* Fri Jan 15 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-16
6859f23
- use the %%{_isa} macro to ensure that the python-devel dependency on python
6859f23
is for the correct multilib arch (#555943)
6859f23
- delete bundled copy of libffi to make sure we use the system one
6859f23
a9e268f
* Fri Jan 15 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-15
a9e268f
- fix the URLs output by pydoc so they point at python.org's 3.1 build of the
a9e268f
docs, rather than the 2.6 build
a9e268f
37de674
* Wed Jan 13 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-14
37de674
- replace references to /usr with %%{_prefix}; replace references to
37de674
/usr/include with %%{_includedir} (Toshio)
37de674
a3483f9
* Mon Jan 11 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-13
a3483f9
- fix permission on find-provides-without-python-sonames.sh from 775 to 755
a3483f9
a3483f9
* Mon Jan 11 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-12
a3483f9
- remove build-time requirements on tix and tk, since we already have
a3483f9
build-time requirements on the -devel subpackages for each of these (Thomas
a3483f9
Spura)
a3483f9
- replace usage of %%define with %%global (Thomas Spura)
a3483f9
- remove forcing of CC=gcc as this old workaround for bug 109268 appears to
a3483f9
longer be necessary
a3483f9
- move various test files from the "tools"/"tkinter" subpackages to the "test"
a3483f9
subpackage
a3483f9
a3483f9
* Thu Jan  7 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-11
a3483f9
- add %%check section (thanks to Thomas Spura)
a3483f9
- update patch 4 to use correct shebang line
a3483f9
- get rid of stray patch file from buildroot
a3483f9
a3483f9
* Tue Nov 17 2009 Andrew McNabb <amcnabb@mcnabbs.org> - 3.1.1-10
a3483f9
- switched a few instances of "find |xargs" to "find -exec" for consistency.
a3483f9
- made the description of __os_install_post more accurate.
a3483f9
a3483f9
* Wed Nov  4 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-9
a3483f9
- add macros.python3 to the -devel subpackage, containing common macros for use
a3483f9
when packaging python3 modules
a3483f9
a3483f9
* Tue Nov  3 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-8
a3483f9
- add a provides of "python(abi)" (see bug 532118)
a3483f9
- fix issues identified by a.badger in package review (bug 526126, comment 39):
a3483f9
  - use "3" thoughout metadata, rather than "3.*"
a3483f9
  - remove conditional around "pkg-config openssl"
a3483f9
  - use standard cleanup of RPM_BUILD_ROOT
a3483f9
  - replace hardcoded references to /usr with _prefix macro
a3483f9
  - stop removing egg-info files
a3483f9
  - use /usr/bin/python3.1 rather than /use/bin/env python3.1 when fixing
a3483f9
up shebang lines
a3483f9
  - stop attempting to remove no-longer-present .cvsignore files
a3483f9
  - move the post/postun sections above the "files" sections
a3483f9
a3483f9
* Thu Oct 29 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-7
a3483f9
- remove commented-away patch 51 (python-2.6-distutils_rpm.patch): the -O1
a3483f9
flag is used by default in the upstream code
a3483f9
- "Makefile" and the config-32/64.h file are needed by distutils/sysconfig.py
a3483f9
_init_posix(), so we include them in the core package, along with their parent
a3483f9
directories (bug 531901)
a3483f9
a3483f9
* Tue Oct 27 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-6
a3483f9
- reword description, based on suggestion by amcnabb
a3483f9
- fix the test_email and test_imp selftests (patch 3 and patch 4 respectively)
a3483f9
- fix the test_tk and test_ttk_* selftests (patch 5)
a3483f9
- fix up the specfile's handling of shebang/perms to avoid corrupting
a3483f9
test_httpservers.py (sed command suggested by amcnabb)
a3483f9
a3483f9
* Thu Oct 22 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-5
a3483f9
- fixup importlib/_bootstrap.py so that it correctly handles being unable to
a3483f9
open .pyc files for writing (patch 2, upstream issue 7187)
a3483f9
- actually apply the rpath patch (patch 1)
a3483f9
a3483f9
* Thu Oct 22 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-4
a3483f9
- update patch0's setup of the crypt module to link it against libcrypt
a3483f9
- update patch0 to comment "datetimemodule" back out, so that it is built
a3483f9
using setup.py (see Setup, option 3), thus linking it statically against
a3483f9
timemodule.c and thus avoiding a run-time "undefined symbol:
a3483f9
_PyTime_DoubleToTimet" failure on "import datetime"
a3483f9
a3483f9
* Wed Oct 21 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-3
a3483f9
- remove executable flag from various files that shouldn't have it
a3483f9
- fix end-of-line encodings
a3483f9
- fix a character encoding
a3483f9
a3483f9
* Tue Oct 20 2009 David Malcolm <dmalcolm@redhat.com> - 3.1.1-2
a3483f9
- disable invocation of brp-python-bytecompile in postprocessing, since
a3483f9
it would be with the wrong version of python (adapted from ivazquez'
a3483f9
python3000 specfile)
a3483f9
- use a custom implementation of __find_provides in order to filter out bogus
a3483f9
provides lines for the various .so modules
a3483f9
- fixup distutils/unixccompiler.py to remove standard library path from rpath
a3483f9
(patch 1, was Patch0 in ivazquez' python3000 specfile)
a3483f9
- split out libraries into a -libs subpackage
a3483f9
- update summaries and descriptions, basing content on ivazquez' specfile
a3483f9
- fixup executable permissions on .py, .xpm and .xbm files, based on work in
a3483f9
ivazquez's specfile
a3483f9
- get rid of DOS batch files
a3483f9
- fixup permissions for shared libraries from non-standard 555 to standard 755
a3483f9
- move /usr/bin/python*-config to the -devel subpackage
a3483f9
- mark various directories as being documentation
a3483f9
a3483f9
* Thu Sep 24 2009 Andrew McNabb <amcnabb@mcnabbs.org> 3.1.1-1
a3483f9
- Initial package for Python 3.
a3483f9