churchyard / rpms / python38

Forked from rpms/python38 5 years ago
Clone
a3483f9
%global pybasever 3.1
a3483f9
%global pylibdir %{_libdir}/python%{pybasever}
4aab458
%global dynload_dir %{pylibdir}/lib-dynload
a3483f9
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
a3483f9
Summary: Version 3 of the Python programming language aka Python 3000
a3483f9
Name: python3
a3483f9
Version: %{pybasever}.1
4aab458
Release: 21%{?dist}
a3483f9
License: Python
a3483f9
Group: Development/Languages
a3483f9
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
a3483f9
Patch0: python-3.1.1-config.patch
a3483f9
a3483f9
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
# Fixup importlib/_bootstrap.py so that it correctly handles being unable to
a3483f9
# open .pyc files for writing
a3483f9
# Sent upstream as http://bugs.python.org/issue7187
a3483f9
Patch2: python-3.1.1-importlib-fix-handling-of-readonly-pyc-files.patch
a3483f9
a3483f9
# The four TestMIMEAudio tests fail due to "audiotest.au" not being packaged.
a3483f9
# It's simplest to remove them:
a3483f9
Patch3: python-3.1.1-remove-mimeaudio-tests.patch
a3483f9
a3483f9
# ImportTests.test_issue1267 in test_imp.py reads pydoc.py's shebang line and
a3483f9
# checks that it read it correctly.
a3483f9
#
a3483f9
# Since we modify the shebang lines in our packaging, we also need to modify
a3483f9
# the expected value in this test:
a3483f9
Patch4: python-3.1.1-apply-our-changes-to-expected-shebang-for-test_imp.patch
a3483f9
a3483f9
# test_tk test_ttk_guionly and test_ttk_textonly all rely on tkinter/test, but
a3483f9
# upstream's Makefile.pre.in doesn't install that subdirectory; patch it so that
a3483f9
# it does:
a3483f9
Patch5: python-3.1.1-install-tkinter-tests.patch
a3483f9
# (The resulting test support code is in the tkinter subpackage, but
a3483f9
# this is not a major problem)
a3483f9
aa4aef2
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
aa4aef2
# a libpythonMAJOR.MINOR.a (bug 550692):
aa4aef2
Patch6: python-3.1.1-no-static-lib.patch
aa4aef2
a3483f9
Patch102: python-3.1.1-lib64.patch
a3483f9
a3483f9
# http://bugs.python.org/issue6999 -- fixed in r75062
a3483f9
Patch200: python-3.1.1-pathfix.patch
a3483f9
a3483f9
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
a3483f9
a3483f9
URL: http://www.python.org/
a3483f9
a3483f9
# See notes in bug 532118:
a3483f9
Provides: python(abi) = %{pybasever}
a3483f9
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
a3483f9
%prep
a3483f9
%setup -q -n Python-%{version}
a3483f9
chmod +x %{SOURCE1}
6859f23
6859f23
# Ensure that we're using the system copy of libffi, rather than the copy
6859f23
# shipped by upstream in the tarball:
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
a3483f9
%patch0 -p1 -b .config
a3483f9
%patch1 -p1 -b .rpath
a3483f9
%patch2 -p0 -b .fix-handling-of-readonly-pyc-files
a3483f9
%patch3 -p1 -b .remove-mimeaudio-tests
a3483f9
%patch4 -p1 -b .apply-our-changes-to-expected-shebang
a3483f9
%patch5 -p1 -b .install-tkinter-tests
aa4aef2
%patch6 -p1 -b .no-static-lib
a3483f9
a3483f9
%if "%{_lib}" == "lib64"
a3483f9
%patch102 -p1 -b .lib64
a3483f9
%endif
a3483f9
a3483f9
%patch200 -p1 -b .pathfix
a3483f9
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
a3483f9
%build
a3483f9
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC"
a3483f9
export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC"
a3483f9
export CPPFLAGS="`pkg-config --cflags-only-I libffi`"
a3483f9
export OPT="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC"
a3483f9
export LINKCC="gcc"
a3483f9
export CFLAGS="$CFLAGS `pkg-config --cflags openssl`"
a3483f9
export LDFLAGS="$LDFLAGS `pkg-config --libs-only-L openssl`"
a3483f9
a3483f9
autoconf
a3483f9
%configure --enable-ipv6 --with-wide-unicode --enable-shared --with-system-ffi
a3483f9
a3483f9
make OPT="$CFLAGS" %{?_smp_mflags}
a3483f9
a3483f9
a3483f9
%install
a3483f9
rm -fr $RPM_BUILD_ROOT
a3483f9
mkdir -p $RPM_BUILD_ROOT%{_prefix} $RPM_BUILD_ROOT%{_mandir}
a3483f9
a3483f9
make install DESTDIR=$RPM_BUILD_ROOT
a3483f9
a3483f9
mkdir -p ${RPM_BUILD_ROOT}%{pylibdir}/site-packages
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/modulator ${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
a3483f9
install -m755 -d $RPM_BUILD_ROOT%{pylibdir}/Doc
a3483f9
cp -ar Doc/tools $RPM_BUILD_ROOT%{pylibdir}/Doc/
a3483f9
a3483f9
# Demo scripts
a3483f9
cp -ar Demo $RPM_BUILD_ROOT%{pylibdir}/
a3483f9
a3483f9
# Fix for bug #136654
a3483f9
rm -f $RPM_BUILD_ROOT%{pylibdir}/email/test/data/audiotest.au $RPM_BUILD_ROOT%{pylibdir}/test/audiotest.au
a3483f9
a3483f9
%if "%{_lib}" == "lib64"
a3483f9
install -d $RPM_BUILD_ROOT/usr/lib/python%{pybasever}/site-packages
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
a3483f9
mv $RPM_BUILD_ROOT%{_includedir}/python%{pybasever}/pyconfig.h \
a3483f9
   $RPM_BUILD_ROOT%{_includedir}/python%{pybasever}/%{_pyconfig_h}
a3483f9
cat > $RPM_BUILD_ROOT%{_includedir}/python%{pybasever}/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
a3483f9
a3483f9
# Fix for bug 201434: make sure distutils looks at the right pyconfig.h file
a3483f9
sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" $RPM_BUILD_ROOT%{pylibdir}/distutils/sysconfig.py
a3483f9
a3483f9
# Switch all shebangs to refer to the specific Python version.
a3483f9
LD_LIBRARY_PATH=. ./python Tools/scripts/pathfix.py -i "%{_bindir}/python%{pybasever}" $RPM_BUILD_ROOT
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:
a3483f9
find $RPM_BUILD_ROOT -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:
a3483f9
find $RPM_BUILD_ROOT \
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 \
a3483f9
  $RPM_BUILD_ROOT%{pylibdir}/Demo/comparisons/patterns \
a3483f9
  $RPM_BUILD_ROOT%{pylibdir}/distutils/tests/Setup.sample \
a3483f9
  $RPM_BUILD_ROOT%{pylibdir}/Demo/rpc/test \
a3483f9
  $RPM_BUILD_ROOT%{pylibdir}/Tools/README \
a3483f9
  $RPM_BUILD_ROOT%{pylibdir}/Demo/scripts/newslist.doc \
a3483f9
  $RPM_BUILD_ROOT%{pylibdir}/Demo/md5test/foo
a3483f9
a3483f9
# Get rid of DOS batch files:
a3483f9
find $RPM_BUILD_ROOT -name \*.bat -exec rm {} \;
a3483f9
a3483f9
# Get rid of backup files:
a3483f9
find $RPM_BUILD_ROOT/ -name "*~" -exec rm -f {} \;
a3483f9
find . -name "*~" -exec rm -f {} \;
a3483f9
rm -f $RPM_BUILD_ROOT%{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:
a3483f9
rm -f $RPM_BUILD_ROOT%{pylibdir}/test/test_imp.py.apply-our-changes-to-expected-shebang # from patch 4
a3483f9
a3483f9
# Fix end-of-line encodings:
a3483f9
find $RPM_BUILD_ROOT/ -name \*.py -exec sed -i 's/\r//' {} \;
a3483f9
a3483f9
# Fix an encoding:
a3483f9
iconv -f iso8859-1 -t utf-8 $RPM_BUILD_ROOT/%{pylibdir}/Demo/rpc/README > README.conv && mv -f README.conv $RPM_BUILD_ROOT/%{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:
a3483f9
find $RPM_BUILD_ROOT \
a3483f9
    -perm 555 -exec chmod 755 {} \;
a3483f9
a3483f9
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rpm
a3483f9
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/rpm
4aab458
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/rpm
a3483f9
113725a
# Ensure that the curses module was linked against libncursesw.so, rather than
113725a
# libncurses.so (bug 539917)
4aab458
ldd $RPM_BUILD_ROOT/%{dynload_dir}/_curses*.so \
113725a
    | grep curses \
113725a
    | grep libncurses.so && (echo "_curses.so linked against libncurses.so" ; exit 1)
113725a
a3483f9
%check
a3483f9
# Run the upstream test suite, using the "runtests.sh" harness from the upstream
a3483f9
# tarball.
a3483f9
# I'm seeing occasional hangs in "test_httplib" when running the test suite inside
a3483f9
# Koji.  For that reason I exclude that one.
a3483f9
LD_LIBRARY_PATH=$(pwd) ./runtests.sh -x test_httplib
a3483f9
a3483f9
# Note that we're running the tests using the version of the code in the builddir,
a3483f9
# not in the buildroot.
a3483f9
a3483f9
# The harness only emits the names of the test scripts it ran, along with a
a3483f9
# summary of the form:
a3483f9
#   2 BAD
a3483f9
# 313 GOOD
a3483f9
#  22 SKIPPED
a3483f9
# 337 total
a3483f9
# As a byproduct it writes files "GOOD", "BAD", "SKIPPED", listing names of
a3483f9
# files (e.g. "test_imp") along with a subdirectory OUT containing files of the
a3483f9
# form $TEST.out
a3483f9
# Each such logfile starts with a line indicating the name of the test
a3483f9
a3483f9
# Output the logs from failing tests, so that they are captured in the rpmbuild
a3483f9
# log:
a3483f9
for TESTNAME in $(cat BAD); do
a3483f9
  cat OUT/$TESTNAME.out ; 
a3483f9
done
a3483f9
a3483f9
# There are 5 expected BAD results here:
a3483f9
#
a3483f9
# (1) test_distutils.py: tries to build an RPM inside the rpmbuild; I'll simply
a3483f9
# let this one fail for now (has trouble linking against -lpython3.1; perhaps
a3483f9
# LD_LIBRARY_PATH is being discarded somewhere?)
a3483f9
#
a3483f9
# (2) test_imp.py: ImportTests.test_issue1267 in test_imp.py reads pydoc.py's
a3483f9
# shebang line and checks that it read it correctly.tests that the shebang line
a3483f9
# is as expected.  Unfortunately if we patch this up in the buildir (in the
a3483f9
# build phase), then the "make install" will try to reference
a3483f9
# /usr/bin/python%{pybasever} which won't exist on a clean build environment.
a3483f9
# So we fix up the shebang lines after this in the install phase, and expect
a3483f9
# this test to fail in the check phase.  It ought to pass when run on the built
a3483f9
# RPMs
a3483f9
#
a3483f9
# (3) test_socket.py:testSockName can fail here if DNS isn't properly set up:
a3483f9
#     my_ip_addr = socket.gethostbyname(socket.gethostname())
a3483f9
# socket.gaierror: [Errno -2] Name or service not known
a3483f9
#
a3483f9
# (4) test_subprocess: merely get "errors occurred"
a3483f9
#
a3483f9
# (5) test_telnet: can get a "socket.error: [Errno 104] Connection reset by peer"
a3483f9
#
a3483f9
# Some additional tests fail when running the test suite as non-root outside of
a3483f9
# the build, due to permissions issues.
a3483f9
a3483f9
%clean
a3483f9
rm -fr $RPM_BUILD_ROOT
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}
a3483f9
%{_mandir}/*/*
a3483f9
%dir %{pylibdir}
4aab458
%dir %{dynload_dir}
4aab458
%{dynload_dir}/Python-%{version}-py%{pybasever}.egg-info
4aab458
%{dynload_dir}/_bisectmodule.so
4aab458
%{dynload_dir}/_codecs_cn.so
4aab458
%{dynload_dir}/_codecs_hk.so
4aab458
%{dynload_dir}/_codecs_iso2022.so
4aab458
%{dynload_dir}/_codecs_jp.so
4aab458
%{dynload_dir}/_codecs_kr.so
4aab458
%{dynload_dir}/_codecs_tw.so
4aab458
%{dynload_dir}/_collectionsmodule.so
4aab458
%{dynload_dir}/_csv.so
4aab458
%{dynload_dir}/_ctypes.so
4aab458
%{dynload_dir}/_curses.so
4aab458
%{dynload_dir}/_curses_panel.so
4aab458
%{dynload_dir}/_dbm.so
4aab458
%{dynload_dir}/_elementtree.so
4aab458
%{dynload_dir}/_gdbmmodule.so
4aab458
%{dynload_dir}/_hashlib.so
4aab458
%{dynload_dir}/_heapqmodule.so
4aab458
%{dynload_dir}/_json.so
4aab458
%{dynload_dir}/_lsprof.so
4aab458
%{dynload_dir}/_multibytecodecmodule.so
4aab458
%{dynload_dir}/_multiprocessing.so
4aab458
%{dynload_dir}/_pickle.so
4aab458
%{dynload_dir}/_randommodule.so
4aab458
%{dynload_dir}/_sha1module.so
4aab458
%{dynload_dir}/_sha256module.so
4aab458
%{dynload_dir}/_sha512module.so
4aab458
%{dynload_dir}/_socketmodule.so
4aab458
%{dynload_dir}/_sqlite3.so
4aab458
%{dynload_dir}/_ssl.so
4aab458
%{dynload_dir}/_struct.so
4aab458
%{dynload_dir}/_weakref.so
4aab458
%{dynload_dir}/arraymodule.so
4aab458
%{dynload_dir}/atexitmodule.so
4aab458
%{dynload_dir}/audioop.so
4aab458
%{dynload_dir}/binascii.so
4aab458
%{dynload_dir}/bz2.so
4aab458
%{dynload_dir}/cmathmodule.so
4aab458
%{dynload_dir}/cryptmodule.so
4aab458
%{dynload_dir}/datetime.so
4aab458
%{dynload_dir}/fcntlmodule.so
4aab458
%{dynload_dir}/grpmodule.so
4aab458
%{dynload_dir}/itertoolsmodule.so
4aab458
%{dynload_dir}/mathmodule.so
4aab458
%{dynload_dir}/mmapmodule.so
4aab458
%{dynload_dir}/nismodule.so
4aab458
%{dynload_dir}/operator.so
4aab458
%{dynload_dir}/ossaudiodev.so
4aab458
%{dynload_dir}/parsermodule.so
4aab458
%{dynload_dir}/pyexpat.so
4aab458
%{dynload_dir}/readline.so
4aab458
%{dynload_dir}/resource.so
4aab458
%{dynload_dir}/selectmodule.so
4aab458
%{dynload_dir}/spwdmodule.so
4aab458
%{dynload_dir}/syslogmodule.so
4aab458
%{dynload_dir}/termios.so
4aab458
%{dynload_dir}/timemodule.so
4aab458
%{dynload_dir}/unicodedata.so
4aab458
%{dynload_dir}/xxsubtype.so
4aab458
%{dynload_dir}/zlibmodule.so
4aab458
a3483f9
%dir %{pylibdir}/site-packages
a3483f9
%{pylibdir}/site-packages/README
a3483f9
%{pylibdir}/*.py*
a3483f9
%{pylibdir}/*.doc
a3483f9
%{pylibdir}/wsgiref.egg-info
a3483f9
%dir %{pylibdir}/ctypes
a3483f9
%{pylibdir}/ctypes/*.py*
a3483f9
%{pylibdir}/ctypes/macholib
a3483f9
%{pylibdir}/curses
a3483f9
%dir %{pylibdir}/dbm
a3483f9
%{pylibdir}/dbm/*.py*
a3483f9
%dir %{pylibdir}/distutils
a3483f9
%{pylibdir}/distutils/*.py*
a3483f9
%{pylibdir}/distutils/README
a3483f9
%{pylibdir}/distutils/command
a3483f9
%dir %{pylibdir}/email
a3483f9
%{pylibdir}/email/*.py*
a3483f9
%{pylibdir}/email/mime
a3483f9
%{pylibdir}/encodings
a3483f9
%{pylibdir}/html
a3483f9
%{pylibdir}/http
a3483f9
%{pylibdir}/idlelib
a3483f9
%dir %{pylibdir}/importlib
a3483f9
%{pylibdir}/importlib/*.py*
a3483f9
%dir %{pylibdir}/json
a3483f9
%{pylibdir}/json/*.py*
6a82c19
%{pylibdir}/lib2to3
6a82c19
%exclude %{pylibdir}/lib2to3/tests
a3483f9
%{pylibdir}/logging
a3483f9
%{pylibdir}/multiprocessing
a3483f9
%{pylibdir}/plat-linux2
a3483f9
%{pylibdir}/pydoc_data
a3483f9
%dir %{pylibdir}/sqlite3
a3483f9
%{pylibdir}/sqlite3/*.py*
a3483f9
%dir %{pylibdir}/test
a3483f9
%{pylibdir}/test/__init__.py*
a3483f9
%{pylibdir}/urllib
a3483f9
%{pylibdir}/wsgiref
a3483f9
%{pylibdir}/xml
a3483f9
%{pylibdir}/xmlrpc
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
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):
a3483f9
%dir %{pylibdir}/config
a3483f9
%{pylibdir}/config/Makefile
37de674
%dir %{_includedir}/python%{pybasever}
37de674
%{_includedir}/python%{pybasever}/%{_pyconfig_h}
a3483f9
a3483f9
%files libs
a3483f9
%defattr(-,root,root,-)
a3483f9
%{_libdir}/libpython%{pybasever}.so.*
a3483f9
a3483f9
%files devel
a3483f9
%defattr(-,root,root)
a3483f9
%{pylibdir}/config/*
a3483f9
%exclude %{pylibdir}/config/Makefile
a3483f9
/usr/include/python%{pybasever}/*.h
a3483f9
%exclude /usr/include/python%{pybasever}/%{_pyconfig_h}
a3483f9
%doc Misc/README.valgrind Misc/valgrind-python.supp Misc/gdbinit
a3483f9
%{_bindir}/python3-config
a3483f9
%{_bindir}/python%{pybasever}-config
a3483f9
%{_libdir}/libpython%{pybasever}.so
a3483f9
%{_libdir}/pkgconfig/python*.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
a3483f9
%{_bindir}/idle*
a3483f9
%{pylibdir}/Tools
a3483f9
%doc %{pylibdir}/Demo
a3483f9
%exclude %{pylibdir}/Demo/distutils
a3483f9
%exclude %{pylibdir}/Demo/md5test
a3483f9
%doc %{pylibdir}/Doc
a3483f9
a3483f9
%files tkinter
a3483f9
%defattr(-,root,root,755)
a3483f9
%{pylibdir}/tkinter
a3483f9
%exclude %{pylibdir}/tkinter/test
4aab458
%{dynload_dir}/_tkinter.so
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}/json/tests
a3483f9
%{pylibdir}/sqlite3/test
a3483f9
%{pylibdir}/test
4aab458
%{dynload_dir}/_ctypes_test.so
4aab458
%{dynload_dir}/_testcapimodule.so
a3483f9
%{pylibdir}/lib2to3/tests
a3483f9
%doc %{pylibdir}/Demo/distutils
a3483f9
%doc %{pylibdir}/Demo/md5test
a3483f9
%{pylibdir}/tkinter/test
a3483f9
a3483f9
%changelog
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