Hello community,
here is the log from the commit of package python3 for openSUSE:Factory
checked in at Tue Jun 28 15:58:43 CEST 2011.
--------
New Changes file:
--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/python3/python3-base.changes 2011-06-15 16:42:42.000000000 +0200
@@ -0,0 +1,62 @@
+-------------------------------------------------------------------
+Wed Jun 15 14:16:38 UTC 2011 - jmatejek@novell.com
+
+- replaced dynamic so version with manual so version, because
+ autobuild does not support autogeneration
+
+-------------------------------------------------------------------
+Tue May 24 13:39:06 UTC 2011 - jmatejek@novell.com
+
+- generate macros.python3 at compile-time with fixed values
+- don't include bogus values in pyconfig.h, as they can break
+ third-party packages (bnc#673071)
+
+-------------------------------------------------------------------
+Tue May 17 12:52:51 UTC 2011 - jmatejek@novell.com
+
+- added Obsoletes: python3 < 3.1 so that the transition from
+ non-split to split packages goes smoothly
+
+-------------------------------------------------------------------
+Fri May 13 12:38:19 UTC 2011 - jmatejek@novell.com
+
+- fixed RPM macros to use python3 instead of python
+- updated to build --with-wide-unicode (for compatibility with
+ fedora and our own python 2.x series)
+
+-------------------------------------------------------------------
+Thu Apr 21 03:39:25 UTC 2011 - termim@gmail.com
+
+- fix python3-base build failure due to pybench.py crash by
+ python-3.2-pybench.patch
+- move pyconfig.h from python3-devel to python3-base package to
+ make python3-base functional again
+
+-------------------------------------------------------------------
+Wed Mar 23 04:26:28 UTC 2011 - termim@gmail.com
+
+- update to python 3.2
+ * stable ABI, ABI-tagged .so files
+ * concurrent.futures and many other new or upgraded modules
+ * PYC repository directories ( __pycache__ )
+ * python WSGI 1.0.1
+ * Unicode 6.0.0 support
+ * a great number of bugfixes and assorted improvements
+
+-------------------------------------------------------------------
+Tue Feb 8 19:42:17 CET 2011 - matejcik@suse.cz
+
+- update to python 3.2 RC2
+- renamed python3-demo to python3-tools, because the demo part
+ became much smaller than the tools part
+- added rpm macros
+
+-------------------------------------------------------------------
+Tue Jan 18 14:13:04 UTC 2011 - jmatejek@novell.com
+
+- update to python 3.2 beta 2, see NEWS for details
+- split off -base package with less dependencies, and a shlib-policy
+ compliant libpython3 package
+- mostly rewritten the spec file with more detailed comments
+- cleaned up lists of patches
+
--- python3/python3-doc.changes 2010-11-29 15:25:09.000000000 +0100
+++ /mounts/work_src_done/STABLE/python3/python3-doc.changes 2011-03-23 05:34:39.000000000 +0100
@@ -1,0 +2,10 @@
+Wed Mar 23 04:26:45 UTC 2011 - termim@gmail.com
+
+- update to python 3.2
+
+-------------------------------------------------------------------
+Tue Feb 8 19:43:20 CET 2011 - matejcik@suse.cz
+
+- updated to build against 3.2 RC2
+
+-------------------------------------------------------------------
--- python3/python3.changes 2011-01-14 21:21:26.000000000 +0100
+++ /mounts/work_src_done/STABLE/python3/python3.changes 2011-05-13 14:44:34.000000000 +0200
@@ -1,0 +2,21 @@
+Fri May 13 12:43:49 UTC 2011 - jmatejek@novell.com
+
+- updated to build --with-wide-unicode (for compatibility with
+ fedora and our own python 2.x series)
+
+-------------------------------------------------------------------
+Wed Mar 23 04:25:53 UTC 2011 - termim@gmail.com
+
+- update to 3.2
+
+-------------------------------------------------------------------
+Tue Feb 8 19:43:07 CET 2011 - matejcik@suse.cz
+
+- update to 3.2 RC2
+
+-------------------------------------------------------------------
+Wed Jan 19 16:11:30 UTC 2011 - jmatejek@novell.com
+
+- update to 3.2 beta 2 and other tales
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
Python-2.3.3-dirs.patch
Python-3.0b1-distutils-rpm-8.patch
Python-3.1-multilib.patch
_service
_service:download_url:Python-3.1.3.tar.bz2
python-2.5.1-sqlite.patch
python-2.5.2-configure.patch
python-2.5.2-docdirs.patch
python-2.5.2-fwrapv.patch
python-2.6b1-localpath.patch
python-2.6b1-subprocess-eintr-safety.patch
python-3.0-https_warn.patch
python-3.0b3-ssl-compat.patch
python-3.1-docs-html.tar.bz2
python-3.1-docs-pdf-a4.tar.bz2
python-3.1-docs-pdf-letter.tar.bz2
python.csh
python.sh
pythonstart
New:
----
Python-3.0b1-record-rpm.patch
Python-3.2.tar.bz2
Python-3.2b2-multilib.patch
macros.python3.py
python-3.2-docs-html.tar.bz2
python-3.2-docs-pdf-a4.tar.bz2
python-3.2-docs-pdf-letter.tar.bz2
python-3.2-fix_date_time_compiler.patch
python-3.2-pybench.patch
python-3.2b2-buildtime-generate.patch
python-3.2rc2-localpath.patch
python3-base.changes
python3-base.spec
python3.csh
python3.sh
python3start
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-base.spec ++++++
#
# spec file for package python3-base
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python3-base
BuildRequires: fdupes pkg-config zlib-devel
Url: http://www.python.org/
License: X11/MIT
Group: Development/Languages/Python
AutoReqProv: on
Summary: Python3 Interpreter
Version: 3.2
Release: 1
%define tarversion %{version}
%define tarname Python-%{tarversion}
# python 3.1 didn't have a separate python-base, so it is wrongly
# not a conflict to have python3-3.1 and python3-base > 3.1
Obsoletes: python3 < 3.2
# no Provides, because python3 is obviously provided by package python3
Source0: %{tarname}.tar.bz2
Source1: baselibs.conf
Source2: README.SUSE
Source3: python3start
Source4: python3.sh
Source5: python3.csh
Source6: distutils.cfg
Source7: macros.python3.py
# implement "--record-rpm" option for distutils installations
Patch01: Python-3.0b1-record-rpm.patch
# support lib-vs-lib64 distinction
Patch02: Python-3.2b2-multilib.patch
# securing usage of readlink/realpath in PySys_SetArgv
Patch03: python-2.6b1-canonicalize2.patch
# support finding packages in /usr/local, install to /usr/local by default
Patch04: python-3.2rc2-localpath.patch
# fix usage of "python" executable in "make install"
Patch05: python-3.2b2-buildtime-generate.patch
# fix crash in pybench which was blocking builds
Patch06: python-3.2-pybench.patch
# replace DATE, TIME and COMPILER by fixed definitions to aid reproducible builds
Patch07: python-3.2-fix_date_time_compiler.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define python_version %(echo %{tarversion} | head -c 3)
%define shortver %(echo %{python_version} | cut -c 1,3)
# three possible ABI kinds: m - pymalloc, d - debug build, u - wide unicode
# see PEP 3149
%define abi_kind mu
# python ABI version - used in some file names, unsure why
%define python_abi %{python_version}%{abi_kind}
# soname ABI tag defined in PEP 3149
%define abi_tag %{shortver}%{abi_kind}
#%define so_version %(echo %{python_version} | tr . _)%{abi_kind}1_0
%define so_version 3_2%{abi_kind}1_0
%description
Python is an interpreted, object-oriented programming language, and is
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
of Python in the documentation and tutorials included in the python-doc
(HTML) or python-doc-pdf (PDF) packages.
If you want to install third party modules using distutils, you need to
install python-devel package.
Authors:
--------
Guido van Rossum
%package -n python3-tools
License: Python Copyright
Requires: %{name} = %{version}
Summary: Python Utility and Demonstration Scripts
Group: Development/Languages/Python
AutoReqProv: on
Obsoletes: python3-demo < %{version}
Provides: python3-demo = %{version}
%description -n python3-tools
A number of scripts that are useful for building, testing or extending Python,
and a set of demonstration programs.
%package -n python3-idle
License: Python Copyright
Requires: %{name} = %{version} python3-tk
Summary: An Integrated Development Environment for Python
Group: Development/Languages/Python
AutoReqProv: on
%description -n python3-idle
IDLE is a Tkinter based integrated development environment for Python.
It features a multi-window text editor with multiple undo, Python
colorizing, and many other things, as well as a Python shell window and
a debugger.
%package -n python3-devel
License: Python Copyright
Requires: %{name} = %{version}
Summary: Include Files and Libraries Mandatory for Building Python Modules
Group: Development/Languages/Python
AutoReqProv: on
%description -n python3-devel
The Python programming language's interpreter can be extended with
dynamically loaded extensions and can be embedded in other programs.
This package contains header files, a static library, and development
tools for building Python modules, extending the Python interpreter or
embedding Python in applications.
This also includes the Python distutils, which were in the Python
package up to version 2.2.2.
%package -n python3-xml
License: Python Copyright
Requires: %{name} = %{version}
Summary: A Python XML Interface
Group: Development/Libraries/Python
AutoReqProv: on
%description -n python3-xml
The expat module is a Python interface to the expat XML parser. Since
Python2.x, it is part of the core Python distribution.
%package -n python3-2to3
License: Python Copyright
Requires: %{name} = %{version}
Summary: Python 3.0 conversion tool
Group: Development/Languages/Python
AutoReqProv: on
%description -n python3-2to3
Python3's version of the 2to3 conversion library. For all intents and
purposes it appears to be identical to the one shipped with Python 2.6.
%package -n libpython%{so_version}
License: MIT License (or similar)
Summary: Python Interpreter shared library
Group: Development/Languages/Python
AutoReqProv: on
%description -n libpython%{so_version}
Python is an interpreted, object-oriented programming language, and is
often compared to Tcl, Perl, Scheme, or Java. You can find an overview
of Python in the documentation and tutorials included in the python-doc
(HTML) or python-doc-pdf (PDF) packages.
This package contains libpython2.6 shared library for embedding in
other applications.
%prep
%setup -q -n %{tarname}
%patch01 -p1
%patch02 -p1
#%patch03
#- canonicalize disabled, needs testing whether the exploit still works
%patch04
%patch05 -p1
%patch06 -p1
%patch07 -p1
# drop Autoconf version requirement
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.in
%build
# use rpm_opt_flags
export OPT="$RPM_OPT_FLAGS"
#export OPT="-O0 -g"
touch -r %{S:0} Makefile.pre.in
autoreconf -fi
# prevent make from trying to rebuild asdl stuff, which requires existing python installation
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--docdir=%{_docdir}/python \
--enable-ipv6 \
--with-fpectl \
--enable-shared \
--with-wide-unicode
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH \
make %{?_smp_mflags} profile-opt
%check
# test_file fails in autobuild env - "stdin.seek(-1)" wrongly succeeds. probably an issue with autobuild's stdin
# test_nis fails in autobuild env. probably a misconfiguration of mbuild servers
EXCLUDE="-x test_file -x test_nis"
# Limit virtual memory to avoid spurious failures
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
ulimit -v 10000000 || :
fi
make test TESTOPTS="-l $EXCLUDE"
# use network, be verbose:
#make test TESTOPTS="-l -u network -v"
%install
# replace rest of /usr/local/bin/python or /usr/bin/python2.5 with /usr/bin/python3
find . -path "./Parser" -prune \
-o -path "./Python/makeopcodetargets.py" -prune \
-o -name '*.py' -type f -print0 \
| xargs -0 grep -lE '^#! *(/usr/.*bin/(env +)?)?python' \
| xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+(\.[0-9]+)?)?@#!/usr/bin/python3@'
# the grep inbetween makes it much faster
# install it
make \
OPT="$RPM_OPT_FLAGS -fPIC" \
DESTDIR=$RPM_BUILD_ROOT \
install
%define sitedir %{_libdir}/python%{python_version}
# remove .a
find ${RPM_BUILD_ROOT} -name "*.a" -exec rm {} ";"
# install "site-packages" and __pycache__ for third parties
install -d -m 755 ${RPM_BUILD_ROOT}%{sitedir}/site-packages
install -d -m 755 ${RPM_BUILD_ROOT}%{sitedir}/site-packages/__pycache__
# cleanup parts that don't belong
for so in _md5 _sha1 _sha256 _sha512; do
rm $RPM_BUILD_ROOT%{sitedir}/lib-dynload/$so.*
done
for dir in curses dbm sqlite3 tkinter; do
rm -r $RPM_BUILD_ROOT%{sitedir}/$dir
done
# install site-specific tweaks
install -m 644 %{S:6} ${RPM_BUILD_ROOT}%{sitedir}/distutils
# overwrite the copied binary with a link
ln -sf python%{python_version} ${RPM_BUILD_ROOT}%{_bindir}/python3
# replace duplicate .pyo/.pyc with hardlinks
%fdupes $RPM_BUILD_ROOT/%{sitedir}
# documentation
export PDOCS=${RPM_BUILD_ROOT}%{_docdir}/%{name}
install -d -m 755 $PDOCS
install -c -m 644 %{S:2} $PDOCS/
install -c -m 644 LICENSE $PDOCS/
install -c -m 644 README $PDOCS/
# tools
for x in `find Tools/ \( -not -name Makefile \) -print | sort` ; do
test -d $x && ( install -c -m 755 -d $PDOCS/$x ) \
|| ( install -c -m 644 $x $PDOCS/$x )
done
# clean up the bat files
find $PDOCS -name "*.bat" -exec rm {} ";"
# install devel files to /config
#cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{sitedir}/config-%{python_abi}/
# move idle config into /etc
install -d -m 755 ${RPM_BUILD_ROOT}/etc/idle3
(
cd ${RPM_BUILD_ROOT}/%{sitedir}/idlelib/
for file in *.def ; do
mv $file ${RPM_BUILD_ROOT}/etc/idle3/
ln -sf /etc/idle3/$file ${RPM_BUILD_ROOT}/%{sitedir}/idlelib/
done
)
# startup scripts
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
install -m 644 %{S:3} $RPM_BUILD_ROOT/etc
install -m 644 %{S:4} %{S:5} $RPM_BUILD_ROOT/etc/profile.d
# RPM macros
mkdir -p $RPM_BUILD_ROOT/etc/rpm
LD_LIBRARY_PATH=. ./python %{S:7} > $RPM_BUILD_ROOT/etc/rpm/macros.python3
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libpython%{so_version} -p /sbin/ldconfig
%postun -n libpython%{so_version} -p /sbin/ldconfig
%define dynlib() %{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}.so
%files -n libpython%{so_version}
%defattr(644, root,root)
%{_libdir}/libpython%{python_abi}.so.*
%files -n python3-tools
%defattr(644, root, root, 755)
%{sitedir}/turtledemo
%doc %{_docdir}/%{name}/Tools
%files -n python3-idle
%defattr(644, root, root, 755)
%{sitedir}/idlelib
%dir /etc/idle3
%config /etc/idle3/*
%doc Lib/idlelib/NEWS.txt
%doc Lib/idlelib/README.txt
%doc Lib/idlelib/TODO.txt
%doc Lib/idlelib/extend.txt
%doc Lib/idlelib/ChangeLog
%attr(755, root, root) %{_bindir}/idle3
%attr(755, root, root) %{_bindir}/idle%{python_version}
%files -n python3-xml
%defattr(644, root, root, 755)
%{sitedir}/xml
%{sitedir}/xmlrpc
%{dynlib pyexpat}
%files -n python3-devel
%defattr(644, root, root, 755)
%{_libdir}/libpython%{python_abi}.so
%{_libdir}/libpython3.so
%{_libdir}/pkgconfig/*
%{_prefix}/include/python%{python_abi}
%exclude %{_prefix}/include/python%{python_abi}/pyconfig.h
%{sitedir}/test
%{dynlib _ctypes_test}
%{dynlib _testcapi}
%defattr(755, root, root)
%{_bindir}/python%{python_abi}-config
%{_bindir}/python%{python_version}-config
%{_bindir}/python3-config
%files -n python3-2to3
%defattr(644, root, root, 755)
%attr(755, root, root) %{_bindir}/2to3
%attr(755, root, root) %{_bindir}/2to3-%{python_version}
%{sitedir}/lib2to3
%files
%defattr(644, root, root, 755)
# profile files
%config /etc/python3start
%config /etc/profile.d/python3.*
# docs
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/LICENSE
%doc %{_docdir}/%{name}/README.SUSE
%doc %{_mandir}/man1/python%{python_version}.1*
# makefile etc
%{sitedir}/config-%{python_abi}
%config /etc/rpm/macros.python3
%{_prefix}/include/python%{python_abi}/pyconfig.h
# binary parts
%dir %{sitedir}/lib-dynload
%{sitedir}/lib-dynload/Python-%{tarversion}-py%{python_version}.egg-info
%{dynlib array}
%{dynlib atexit}
%{dynlib audioop}
%{dynlib binascii}
%{dynlib _bisect}
%{dynlib bz2}
%{dynlib cmath}
%{dynlib _codecs_cn}
%{dynlib _codecs_hk}
%{dynlib _codecs_iso2022}
%{dynlib _codecs_jp}
%{dynlib _codecs_kr}
%{dynlib _codecs_tw}
%{dynlib crypt}
%{dynlib _csv}
%{dynlib _ctypes}
%{dynlib _datetime}
%{dynlib _elementtree}
%{dynlib fcntl}
%{dynlib grp}
%{dynlib _heapq}
%{dynlib _json}
%{dynlib _lsprof}
%{dynlib math}
%{dynlib mmap}
%{dynlib _multibytecodec}
%{dynlib _multiprocessing}
%{dynlib nis}
%{dynlib ossaudiodev}
%{dynlib parser}
%{dynlib _pickle}
%{dynlib _posixsubprocess}
%{dynlib _random}
%{dynlib resource}
%{dynlib select}
%{dynlib _socket}
%{dynlib spwd}
%{dynlib _struct}
%{dynlib syslog}
%{dynlib termios}
%{dynlib time}
%{dynlib unicodedata}
%{dynlib zlib}
# python parts
%dir %{sitedir}
%dir %{sitedir}/site-packages
%dir %{sitedir}/site-packages/__pycache__
%{sitedir}/*.*
%{sitedir}/ctypes
%{sitedir}/concurrent
%{sitedir}/distutils
%{sitedir}/email
%{sitedir}/encodings
%{sitedir}/html
%{sitedir}/http
%{sitedir}/importlib
%{sitedir}/json
%{sitedir}/logging
%{sitedir}/multiprocessing
%{sitedir}/plat-*
%{sitedir}/pydoc_data
%{sitedir}/unittest
%{sitedir}/urllib
%{sitedir}/wsgiref
%{sitedir}/site-packages/README
%{sitedir}/__pycache__
# executables
%attr(755, root, root) %{_bindir}/pydoc3
%attr(755, root, root) %{_bindir}/pydoc%{python_version}
%attr(755, root, root) %{_bindir}/python%{python_abi}
%attr(755, root, root) %{_bindir}/python%{python_version}
%attr(755, root, root) %{_bindir}/python3
%changelog
++++++ python3-doc.spec ++++++
--- /var/tmp/diff_new_pack.iUVtmX/_old 2011-06-28 15:14:37.000000000 +0200
+++ /var/tmp/diff_new_pack.iUVtmX/_new 2011-06-28 15:14:37.000000000 +0200
@@ -23,11 +23,12 @@
Group: Development/Languages/Python
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Additional Package Documentation for Python.
-Version: 3.1
-Release: 12
-%define pyver 3.1.3
+Version: 3.2
+Release: 1
+%define pyver 3.2
BuildArch: noarch
-%define tarname Python-%{pyver}
+#%define tarname Python-%{pyver}
+%define tarname Python-3.2
%define pyname python
Enhances: %{pyname}=%{pyver}
Source0: %{tarname}.tar.bz2
++++++ python3.spec ++++++
--- /var/tmp/diff_new_pack.iUVtmX/_old 2011-06-28 15:14:37.000000000 +0200
+++ /var/tmp/diff_new_pack.iUVtmX/_new 2011-06-28 15:14:37.000000000 +0200
@@ -19,40 +19,36 @@
Name: python3
BuildRequires: db-devel fdupes gcc-c++ gdbm-devel gettext-tools gmp-devel intltool libbz2-devel libopenssl-devel ncurses-devel readline-devel sqlite-devel tk-devel xorg-x11-devel
-#Requires: openssl >= 0.9.8e
Url: http://www.python.org/
-License: Python ..
+License: X11/MIT
Group: Development/Languages/Python
AutoReqProv: on
Summary: Python3 Interpreter
-Version: 3.1.3
+Version: 3.2
Release: 1
-%define tarname Python-%{version}
+#%define tarversion %{version}
+%define tarversion 3.2
+%define tarname Python-%{tarversion}
+
+Requires: python3-base = %{version}
+
Source0: %{tarname}.tar.bz2
Source1: baselibs.conf
-Source6: README.SUSE
-Source8: pythonstart
-Source9: python.sh
-Source10: python.csh
#Source11: testfiles.tar.bz2
# issues with copyrighted Unicode testing files
-Source13: distutils.cfg
-Patch01: Python-2.3.3-dirs.patch
-Patch10: Python-3.0b1-distutils-rpm-8.patch
-Patch21: Python-3.1-multilib.patch
-Patch23: python-3.0b3-ssl-compat.patch
-Patch25: python-2.6b1-canonicalize2.patch
-Patch26: python-2.6b1-localpath.patch
-Patch27: python-3.0-https_warn.patch
-Patch28: python-2.6b1-subprocess-eintr-safety.patch
-Patch30: python-2.5.1-sqlite.patch
-Patch31: python-2.5.2-fwrapv.patch
-Patch34: python-2.5.2-docdirs.patch
-Patch35: python-2.5.2-configure.patch
-Patch36: python-2.6b3-curses-panel.patch
+
+Patch01: Python-3.2b2-multilib.patch
+Patch02: python-2.6b3-curses-panel.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%define python_version %(echo %{version} | head -c 3)
-%define idle_name idle3
+
+%define python_version %(echo %{tarversion} | head -c 3)
+%define shortver %(echo %{python_version} | cut -c 1,3)
+
+%define abi_kind mu
+%define python_abi %{python_version}%{abi_kind}
+%define abi_tag %{shortver}%{abi_kind}
+%define sitedir %{_libdir}/python%{python_version}
%description
Python is an interpreted, object-oriented programming language, and is
@@ -63,62 +59,15 @@
If you want to install third party modules using distutils, you need to
install python-devel package.
-%package idle
-License: Python ..
-Requires: %{name} = %{version} python3-tk
-Summary: An Integrated Development Environment for Python
-Group: Development/Languages/Python
-AutoReqProv: on
-
-%description idle
-IDLE is a Tkinter based integrated development environment for Python.
-It features a multi-window text editor with multiple undo, Python
-colorizing, and many other things, as well as a Python shell window and
-a debugger.
-
-%package demo
-License: Python ..
-Requires: %{name} = %{version}
-Summary: Python Demonstration Scripts
-Group: Development/Languages/Python
-AutoReqProv: on
-
-%description demo
-Various demonstrations of what you can do with Python and a number of
-programs that are useful for building or extending Python.
-
Authors:
--------
Guido van Rossum
-%package devel
-License: Python ..
-Requires: %{name} = %{version}
-Summary: Include Files and Libraries Mandatory for Building Python Modules
-Group: Development/Languages/Python
-AutoReqProv: on
-
-%description devel
-The Python programming language's interpreter can be extended with
-dynamically loaded extensions and can be embedded in other programs.
-
-This package contains header files, a static library, and development
-tools for building Python modules, extending the Python interpreter or
-embedding Python in applications.
-
-This also includes the Python distutils, which were in the Python
-package up to version 2.2.2.
-
-
-
-Authors:
---------
- Guido van Rossum
%package tk
-License: Python ..
+License: Python Copyright
Requires: %{name} = %{version}
Summary: TkInter - Python Tk Interface
Group: Development/Libraries/Python
@@ -129,13 +78,8 @@
"xrpm" package uses this Python interface.
-
-Authors:
---------
- Guido van Rossum
-
%package curses
-License: Python ..
+License: Python Copyright
Requires: %{name} = %{version}
Summary: Python Interface to the (N)Curses Library
Group: Development/Libraries/Python
@@ -146,13 +90,8 @@
Console User Interface.
-
-Authors:
---------
- Guido van Rossum
-
%package dbm
-License: MIT
+License: X11/MIT
Requires: %{name} = %{version}
Summary: Python Interface to the GDBM Library
Group: Development/Languages/Python
@@ -163,85 +102,24 @@
the GNU implementation GDBM.
-
-Authors:
---------
- Guido van Rossum
-
-%package xml
-License: Python ..
-Requires: %{name} = %{version}
-Summary: A Python XML Interface
-Group: Development/Libraries/Python
-AutoReqProv: on
-
-%description xml
-The expat module is a Python interface to the expat XML parser. Since
-Python2.x, it is part of the core Python distribution.
-
-
-
-%package 2to3
-License: Python ..
-Requires: %{name} = %{version}
-Summary: Python 3.0 conversion tool
-Group: Development/Languages/Python
-AutoReqProv: on
-
-%description 2to3
-Python3's version of the 2to3 conversion library. For all intents and
-purposes it appears to be identical to the one shipped with Python 2.6.
-
-
-
-Authors:
---------
- Guido van Rossum
-
%prep
-#%%setup -q -n %{tarname} -a11
%setup -q -n %{tarname}
# patching
-%patch01
-%patch10 -p1
-%patch21 -p1
-%patch23
-##%patch25 - canonicalize disabled, needs testing whether the exploit still works
-%patch26
-%patch27
-##%patch28 - eintr-safety disabled, needs validation and possibly rewrite
-%patch30
-%patch31
-#%if 0%{?suse_version}
-#%endif
-##%patch34
-##%patch35
-%if %suse_version > 1100
-%patch36
-%endif
-# some cleanup
-find . -name .cvsignore -type f -print0 | xargs -0 rm -f
-find . -name CVS -type d -print0 | xargs -0 rm -rf
+%patch01 -p1
+%patch02
+
+# drop Autoconf version requirement
+sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.in
%build
-########################################
-# disable as-needed to fix build
-########################################
export SUSE_ASNEEDED=0
-########################################
-# use rpm_opt_flags
-########################################
export OPT="$RPM_OPT_FLAGS"
-########################################
-# regenerate
-########################################
-autoreconf -f -i . # Modules/_ctypes/libffi
+
+autoreconf -f -i .
# prevent make from trying to rebuild asdl stuff, which requires existing
# python installation
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
-########################################
-# configure
-########################################
+
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
@@ -249,253 +127,94 @@
--docdir=%{_docdir}/python \
--enable-ipv6 \
--with-fpectl \
- --enable-shared
-# --with-dbmliborder=gdbm
-########################################
-# compile
-########################################
-make %{?jobs:-j%jobs} DESTDIR=$RPM_BUILD_ROOT
-########################################
-# test
-########################################
-# on hppa, the threading of glibc is quite broken. The tests just stop
-# at some point, and the machine does not build anything more until a
-# timeout several hours later.
-%ifnarch hppa %arm
-# test_file fails in autobuild env - "stdin.seek(-1)" wrongly succeeds. probably an issue with autobuild's stdin
-# test_nis fails in autobuild env. probably a misconfiguration of mbuild servers
-EXCLUDE="-x test_file -x test_nis"
-# test_distutils fails on some library dir breakage that will need to be solved later, but nevertheless,
-# won't occur on a live system
-EXCLUDE="$EXCLUDE -x test_distutils"
+ --enable-shared \
+ --with-wide-unicode
+
+make %{?jobs:-j%jobs} # DESTDIR=$RPM_BUILD_ROOT
+
+%check
# Limit virtual memory to avoid spurious failures
if test $(ulimit -v) = unlimited || test $(ulimit -v) -gt 10000000; then
ulimit -v 10000000 || :
fi
-make test TESTOPTS="-l $EXCLUDE"
-# use network, be verbose:
-#make test TESTOPTS="-l -u network -v"
-%endif
+# only test the parts skipped in python3-base
+TESTS="test_dbm_gnu test_dbm_ndbm test_readline test_ssl test_tcl test_tk test_ttk_guionly test_ttk_textonly test_curses test_socketserver test_sqlite test_hashlib"
+make test TESTOPTS="-l $TESTS $EXCLUDE"
%install
# replace rest of /usr/local/bin/python or /usr/bin/python2.5 with /usr/bin/python3
find . -path "./Parser" -prune -o -path "./Python/makeopcodetargets.py" -prune -o -name '*.py' -type f -print0 | xargs -0 grep -lE '^#! *(/usr/.*bin/(env +)?)?python' | xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+(\.[0-9]+)?)?@#!/usr/bin/python3@'
# the grep inbetween makes it much faster
-########################################
+
# install it
-########################################
make \
OPT="$RPM_OPT_FLAGS -fPIC" \
DESTDIR=$RPM_BUILD_ROOT \
install
-# install site-specific tweaks
-# install -m 644 %{S:12} ${RPM_BUILD_ROOT}%{_libdir}/python%{python_version}
-install -m 644 %{S:13} ${RPM_BUILD_ROOT}%{_libdir}/python%{python_version}/distutils
-# overwrite the copied binary with a link
-ln -sf python%{python_version} ${RPM_BUILD_ROOT}%{_bindir}/python3
-rm -f ${RPM_BUILD_ROOT}%{_bindir}/smtpd.py
-########################################
-# some cleanups
-########################################
-# remove hard links and replace them with symlinks
-### don't do this for python3
-#for dir in bin include %{_lib} ; do
-# rm -f $RPM_BUILD_ROOT/%{_prefix}/$dir/python
-# ln -s python%{python_version} $RPM_BUILD_ROOT/%{_prefix}/$dir/python
-#done
-# replace duplicate .pyo/.pyc with hardlinks
-%fdupes $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}
-#fdupes -qr1 $RPM_BUILD_ROOT/%{_libdir}/python%{python_version} | \
-# grep '^.*py[oc] .*py[oc] $' | \
-# sed -r 's#^(.*\.py)[oc] .+$#\1c \1o#' | \
-# xargs -L 1 ln -f
-########################################
-# documentation
-########################################
-export PDOCS=${RPM_BUILD_ROOT}%{_docdir}/%{name}
-install -d -m 755 $PDOCS
-install -c -m 644 %{SOURCE6} $PDOCS/
-install -c -m 644 LICENSE $PDOCS/
-install -c -m 644 README $PDOCS/
-########################################
-# tools and demos
-########################################
-find Tools/ Demo/ -type d \( -regex ".*/.cvsignore" \) -exec rm -f \{\} \;
-for x in `find Tools/ Demo/ \( -not -name Makefile \) -print | sort` ; do
- test -d $x && ( install -c -m 755 -d $PDOCS/$x ) \
- || ( install -c -m 644 $x $PDOCS/$x )
-done
-########################################
-# idle
-########################################
-# move idle config into /etc
-install -d -m755 ${RPM_BUILD_ROOT}/etc/%{idle_name}
-(
- cd ${RPM_BUILD_ROOT}/%{_libdir}/python%{python_version}/idlelib/
- for file in *.def ; do
- mv $file ${RPM_BUILD_ROOT}/etc/%{idle_name}/
- ln -sf /etc/%{idle_name}/$file ${RPM_BUILD_ROOT}/%{_libdir}/python%{python_version}/idlelib/
- done
-)
-########################################
-# devel
-########################################
-# install Makefile.pre.in and Makefile.pre
-cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/config/
-########################################
-# startup script
-########################################
-### TODO make this work for py3
-#install -m 644 %{S:8} $RPM_BUILD_ROOT/etc
-#install -d -m 755 $RPM_BUILD_ROOT/etc/profile.d
-#install -m 644 %{S:9} %{S:10} $RPM_BUILD_ROOT/etc/profile.d
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-%post
-%{run_ldconfig}
+# clean out stuff that is in python-base and subpackages
-%postun
-%{run_ldconfig}
+rm $RPM_BUILD_ROOT%{_bindir}/*
+rm $RPM_BUILD_ROOT%{_libdir}/lib*
+rm -r $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+rm -r $RPM_BUILD_ROOT%{_mandir}/*
+rm -r $RPM_BUILD_ROOT%{_includedir}/*
+
+rm -r $RPM_BUILD_ROOT%{sitedir}/config*
+find $RPM_BUILD_ROOT%{sitedir} -name "*.egg-info" -exec rm {} ";"
+rm -r $RPM_BUILD_ROOT%{sitedir}/__pycache__
+rm -r $RPM_BUILD_ROOT%{sitedir}/site-packages
+rm $RPM_BUILD_ROOT%{sitedir}/*.*
+
+for module in \
+ ctypes concurrent distutils email encodings html http importlib json \
+ logging multiprocessing plat-* pydoc_data unittest urllib wsgiref \
+ lib2to3 test xml xmlrpc idlelib turtledemo
+do
+ rm -r $RPM_BUILD_ROOT%{sitedir}/$module
+done
-%files idle
-%defattr(644, root, root, 755)
-%dir /etc/%{idle_name}
-%config /etc/%{idle_name}/*
-%doc Lib/idlelib/NEWS.txt
-%doc Lib/idlelib/README.txt
-%doc Lib/idlelib/TODO.txt
-%doc Lib/idlelib/extend.txt
-%doc Lib/idlelib/ChangeLog
-%{_libdir}/python%{python_version}/idlelib
-%attr(755, root, root) %{_bindir}/%{idle_name}
+for library in \
+ array atexit audioop binascii _bisect bz2 cmath _codecs_* crypt _csv \
+ _ctypes _datetime _elementtree fcntl grp _heapq _json _lsprof math \
+ mmap _multibytecodec _multiprocessing nis ossaudiodev parser _pickle \
+ _posixsubprocess _random resource select _socket spwd _struct syslog \
+ termios time unicodedata zlib \
+ pyexpat _ctypes_test _testcapi
+do
+ eval rm "$RPM_BUILD_ROOT%{sitedir}/lib-dynload/$library.*"
+done
-%files demo
-%defattr(644, root, root, 755)
-%doc %{_docdir}/%{name}/Demo
-%doc %{_docdir}/%{name}/Tools
+%fdupes $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}
+
+%define dynlib() %{sitedir}/lib-dynload/%{1}.cpython-%{abi_tag}.so
%files tk
%defattr(644, root, root, 755)
-%{_libdir}/python%{python_version}/tkinter/
-%{_libdir}/python%{python_version}/lib-dynload/_tkinter.so
+%{sitedir}/tkinter
+%{dynlib _tkinter}
%files curses
%defattr(644, root, root, 755)
-%{_libdir}/python%{python_version}/curses
-%{_libdir}/python%{python_version}/lib-dynload/_curses.so
-%{_libdir}/python%{python_version}/lib-dynload/_curses_panel.so
+%{sitedir}/curses
+%{dynlib _curses}
+%{dynlib _curses_panel}
%files dbm
%defattr(644, root, root, 755)
-%{_libdir}/python%{python_version}/dbm
-%{_libdir}/python%{python_version}/lib-dynload/_dbm.so
-%{_libdir}/python%{python_version}/lib-dynload/_gdbm.so
-
-%files xml
-%defattr(644, root, root, 755)
-%{_libdir}/python%{python_version}/xml
-%{_libdir}/python%{python_version}/xmlrpc
-%{_libdir}/python%{python_version}/lib-dynload/pyexpat.so
-
-%files devel
-%defattr(-, root, root)
-%{_libdir}/python%{python_version}/config
-%defattr(644, root, root, 755)
-%{_libdir}/libpython%{python_version}.so
-%{_libdir}/pkgconfig/*
-%{_prefix}/include/python%{python_version}
-%{_libdir}/python%{python_version}/test
-%defattr(755, root, root)
-%{_bindir}/python%{python_version}-config
-%{_bindir}/python3-config
-
-%files 2to3
-%defattr(644, root, root, 755)
-%attr(755, root, root) %{_bindir}/2to3
-%{_libdir}/python%{python_version}/lib2to3
+%{sitedir}/dbm
+%{dynlib _dbm}
+%{dynlib _gdbm}
%files
%defattr(644, root, root, 755)
-#%config /etc/pythonstart
-#%config /etc/profile.d/python.*
-%dir %{_docdir}/%{name}
-%doc %{_docdir}/%{name}/README
-%doc %{_docdir}/%{name}/LICENSE
-%doc %{_docdir}/%{name}/README.SUSE
-%doc %{_mandir}/man1/python%{python_version}.1*
-%{_libdir}/libpython%{python_version}.so.*
-#%{_libdir}/python
-%dir %{_libdir}/python%{python_version}
-%{_libdir}/python%{python_version}/*.*
-%{_libdir}/python%{python_version}/ctypes
-%{_libdir}/python%{python_version}/distutils
-%{_libdir}/python%{python_version}/email
-%{_libdir}/python%{python_version}/encodings
-%{_libdir}/python%{python_version}/html
-%{_libdir}/python%{python_version}/http
-%{_libdir}/python%{python_version}/importlib
-%{_libdir}/python%{python_version}/json
-%{_libdir}/python%{python_version}/logging
-%{_libdir}/python%{python_version}/multiprocessing
-%{_libdir}/python%{python_version}/plat-*
-%{_libdir}/python%{python_version}/pydoc_data
-%{_libdir}/python%{python_version}/sqlite3
-%{_libdir}/python%{python_version}/urllib
-%{_libdir}/python%{python_version}/wsgiref
-%dir %{_libdir}/python%{python_version}/site-packages
-%{_libdir}/python%{python_version}/site-packages/README
-%dir %{_libdir}/python%{python_version}/lib-dynload
-%{_libdir}/python%{python_version}/lib-dynload/_bisect.so
-%{_libdir}/python%{python_version}/lib-dynload/_csv.so
-%{_libdir}/python%{python_version}/lib-dynload/_collections.so
-%{_libdir}/python%{python_version}/lib-dynload/_ctypes.so
-%{_libdir}/python%{python_version}/lib-dynload/_ctypes_test.so
-%{_libdir}/python%{python_version}/lib-dynload/_elementtree.so
-%{_libdir}/python%{python_version}/lib-dynload/_hashlib.so
-%{_libdir}/python%{python_version}/lib-dynload/_heapq.so
-%{_libdir}/python%{python_version}/lib-dynload/_json.so
-%{_libdir}/python%{python_version}/lib-dynload/_lsprof.so
-%{_libdir}/python%{python_version}/lib-dynload/_multiprocessing.so
-%{_libdir}/python%{python_version}/lib-dynload/_pickle.so
-%{_libdir}/python%{python_version}/lib-dynload/_random.so
-%{_libdir}/python%{python_version}/lib-dynload/_socket.so
-%{_libdir}/python%{python_version}/lib-dynload/_sqlite3.so
-%{_libdir}/python%{python_version}/lib-dynload/_ssl.so
-%{_libdir}/python%{python_version}/lib-dynload/_struct.so
-%{_libdir}/python%{python_version}/lib-dynload/_testcapi.so
-%{_libdir}/python%{python_version}/lib-dynload/array.so
-%{_libdir}/python%{python_version}/lib-dynload/atexit.so
-%{_libdir}/python%{python_version}/lib-dynload/binascii.so
-%{_libdir}/python%{python_version}/lib-dynload/bz2.so
-%{_libdir}/python%{python_version}/lib-dynload/cmath.so
-%{_libdir}/python%{python_version}/lib-dynload/crypt.so
-%{_libdir}/python%{python_version}/lib-dynload/datetime.so
-%{_libdir}/python%{python_version}/lib-dynload/fcntl.so
-%{_libdir}/python%{python_version}/lib-dynload/grp.so
-%{_libdir}/python%{python_version}/lib-dynload/itertools.so
-%{_libdir}/python%{python_version}/lib-dynload/math.so
-%{_libdir}/python%{python_version}/lib-dynload/mmap.so
-%{_libdir}/python%{python_version}/lib-dynload/nis.so
-%{_libdir}/python%{python_version}/lib-dynload/operator.so
-%{_libdir}/python%{python_version}/lib-dynload/ossaudiodev.so
-%{_libdir}/python%{python_version}/lib-dynload/parser.so
-%{_libdir}/python%{python_version}/lib-dynload/readline.so
-%{_libdir}/python%{python_version}/lib-dynload/resource.so
-%{_libdir}/python%{python_version}/lib-dynload/select.so
-%{_libdir}/python%{python_version}/lib-dynload/spwd.so
-%{_libdir}/python%{python_version}/lib-dynload/syslog.so
-%{_libdir}/python%{python_version}/lib-dynload/termios.so
-%{_libdir}/python%{python_version}/lib-dynload/time.so
-%{_libdir}/python%{python_version}/lib-dynload/unicodedata.so
-%{_libdir}/python%{python_version}/lib-dynload/zlib.so
-%{_libdir}/python%{python_version}/lib-dynload/_codecs*.so
-%{_libdir}/python%{python_version}/lib-dynload/_multibytecodec.so
-%{_libdir}/python%{python_version}/lib-dynload/audioop.so
-%{_libdir}/python%{python_version}/lib-dynload/Python-%{version}-py%{python_version}.egg-info
-%attr(755, root, root) %{_bindir}/pydoc3
-%attr(755, root, root) %{_bindir}/python%{python_version}
-%attr(755, root, root) %{_bindir}/python3
+%dir %{sitedir}
+%dir %{sitedir}/lib-dynload
+%{sitedir}/sqlite3
+%{dynlib _hashlib}
+%{dynlib readline}
+%{dynlib _sqlite3}
+%{dynlib _ssl}
+%{dynlib xxlimited}
%changelog
++++++ Python-3.0b1-record-rpm.patch ++++++
Index: Python-3.1/Lib/distutils/command/install.py
===================================================================
--- Python-3.1.orig/Lib/distutils/command/install.py
+++ Python-3.1/Lib/distutils/command/install.py
@@ -178,6 +178,8 @@ class install(Command):
('record=', None,
"filename in which to record list of installed files"),
+ ('record-rpm=', None,
+ "filename in which to record list of installed files and directories suitable as filelist for rpm"),
]
boolean_options = ['compile', 'force', 'skip-build']
@@ -259,6 +261,7 @@ class install(Command):
#self.install_info = None
self.record = None
+ self.record_rpm = None
# -- Option finalizing methods -------------------------------------
@@ -595,12 +598,61 @@ class install(Command):
self.create_path_file()
# write list of installed files, if requested.
- if self.record:
+ if self.record or self.record_rpm:
outputs = self.get_outputs()
if self.root: # strip any package prefix
root_len = len(self.root)
for counter in range(len(outputs)):
outputs[counter] = outputs[counter][root_len:]
+ if self.record_rpm: # add directories
+ self.record = self.record_rpm
+ dirs = []
+ # directories to reject:
+ rejectdirs = [
+ '/etc',
+ '/',
+ '',
+ self.prefix,
+ self.exec_prefix,
+ self.install_base,
+ self.install_platbase,
+ self.install_purelib,
+ self.install_platlib,
+ self.install_headers[:len(self.install_headers) - len(self.distribution.get_name()) - 1],
+ self.install_libbase,
+ self.install_scripts,
+ self.install_data,
+ os.path.join(self.install_data, 'share'),
+ os.path.join(self.install_data, 'share', 'doc'),
+ ]
+ # directories whose childs reject:
+ rejectdirs2 = [
+ os.path.join(self.install_data, 'share', 'man'),
+ ]
+ # directories whose grandsons reject:
+ rejectdirs3 = [
+ os.path.join(self.install_data, 'share', 'man'),
+ os.path.join(self.install_data, 'share', 'locale'),
+ ]
+ for counter in range(len(rejectdirs)):
+ if len(rejectdirs[counter]) > root_len:
+ rejectdirs[counter] = rejectdirs[counter][root_len:]
+ for counter in range(len(rejectdirs2)):
+ if len(rejectdirs2[counter]) > root_len:
+ rejectdirs2[counter] = rejectdirs2[counter][root_len:]
+ for counter in range(len(rejectdirs3)):
+ if len(rejectdirs3[counter]) > root_len:
+ rejectdirs3[counter] = rejectdirs3[counter][root_len:]
+ for counter in range(len(outputs)):
+ directory = os.path.dirname(outputs[counter])
+ while directory not in rejectdirs and \
+ os.path.dirname(directory) not in rejectdirs2 and \
+ os.path.dirname(os.path.dirname(directory)) not in rejectdirs3:
+ dirname = '%dir ' + directory
+ if dirname not in dirs:
+ dirs.append(dirname)
+ directory = os.path.dirname(directory)
+ outputs += dirs
self.execute(write_file,
(self.record, outputs),
"writing list of installed files to '%s'" %
++++++ Python-3.2b2-multilib.patch ++++++
Index: Python-3.2b2/Include/pythonrun.h
===================================================================
--- Python-3.2b2.orig/Include/pythonrun.h
+++ Python-3.2b2/Include/pythonrun.h
@@ -141,6 +141,8 @@ int _Py_CheckPython3();
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
PyAPI_FUNC(const char *) Py_GetPlatform(void);
+PyAPI_FUNC(const char *) Py_GetArch(void);
+PyAPI_FUNC(const char *) Py_GetLib(void);
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
Index: Python-3.2b2/Lib/distutils/command/install.py
===================================================================
--- Python-3.2b2.orig/Lib/distutils/command/install.py
+++ Python-3.2b2/Lib/distutils/command/install.py
@@ -27,6 +27,8 @@ else:
from site import USER_SITE
HAS_USER_SITE = True
+libname = sys.lib
+
if sys.version < "2.2":
WINDOWS_SCHEME = {
'purelib': '$base',
@@ -47,7 +49,7 @@ else:
INSTALL_SCHEMES = {
'unix_prefix': {
'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
Index: Python-3.2b2/Lib/distutils/sysconfig.py
===================================================================
--- Python-3.2b2.orig/Lib/distutils/sysconfig.py
+++ Python-3.2b2/Lib/distutils/sysconfig.py
@@ -124,8 +124,11 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
if os.name == "posix":
- libpython = os.path.join(prefix,
- "lib", "python" + get_python_version())
+ if plat_specific or standard_lib:
+ lib = sys.lib
+ else:
+ lib = "lib"
+ libpython = os.path.join(prefix, lib, "python" + get_python_version())
if standard_lib:
return libpython
else:
Index: Python-3.2b2/Lib/pydoc.py
===================================================================
--- Python-3.2b2.orig/Lib/pydoc.py
+++ Python-3.2b2/Lib/pydoc.py
@@ -359,7 +359,7 @@ class Doc:
docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
- basedir = os.path.join(sys.exec_prefix, "lib",
+ basedir = os.path.join(sys.exec_prefix, sys.lib,
"python%d.%d" % sys.version_info[:2])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
Index: Python-3.2b2/Lib/site.py
===================================================================
--- Python-3.2b2.orig/Lib/site.py
+++ Python-3.2b2/Lib/site.py
@@ -275,13 +275,19 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
- sitepackages.append(os.path.join(prefix, "lib",
+ sitepackages.append(os.path.join(prefix, sys.lib,
"python" + sys.version[:3],
"site-packages"))
- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
+ if sys.lib != "lib":
+ sitepackages.append(os.path.join(prefix, "lib",
+ "python" + sys.version[:3],
+ "site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
+ if sys.lib != "lib":
+ sitepackages.append(os.path.join(prefix, "lib", "site-python"))
else:
sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
Index: Python-3.2b2/Lib/trace.py
===================================================================
--- Python-3.2b2.orig/Lib/trace.py
+++ Python-3.2b2/Lib/trace.py
@@ -750,10 +750,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
s = s.replace("$prefix",
- os.path.join(sys.prefix, "lib",
+ os.path.join(sys.prefix, sys.lib,
"python" + sys.version[:3]))
s = s.replace("$exec_prefix",
- os.path.join(sys.exec_prefix, "lib",
+ os.path.join(sys.exec_prefix, sys.lib,
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
Index: Python-3.2b2/Makefile.pre.in
===================================================================
--- Python-3.2b2.orig/Makefile.pre.in
+++ Python-3.2b2/Makefile.pre.in
@@ -86,6 +86,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLA
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
+LIB= @LIB@
+ARCH= @ARCH@
# Install prefix for architecture-independent files
prefix= @prefix@
@@ -102,7 +104,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
-SCRIPTDIR= $(prefix)/lib
+SCRIPTDIR= @libdir@
ABIFLAGS= @ABIFLAGS@
# Detailed destination directories
@@ -556,6 +558,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
+ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
@@ -601,7 +604,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
+ $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
Index: Python-3.2b2/Modules/getpath.c
===================================================================
--- Python-3.2b2.orig/Modules/getpath.c
+++ Python-3.2b2/Modules/getpath.c
@@ -121,9 +121,11 @@
#define EXEC_PREFIX PREFIX
#endif
+#define LIB_PYTHON LIB "/python" VERSION
+
#ifndef PYTHONPATH
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
#endif
#ifndef LANDMARK
@@ -134,7 +136,7 @@ static wchar_t prefix[MAXPATHLEN+1];
static wchar_t exec_prefix[MAXPATHLEN+1];
static wchar_t progpath[MAXPATHLEN+1];
static wchar_t *module_search_path = NULL;
-static wchar_t *lib_python = L"lib/python" VERSION;
+static wchar_t *lib_python = L"" LIB_PYTHON;
static void
reduce(wchar_t *dir)
Index: Python-3.2b2/Python/getplatform.c
===================================================================
--- Python-3.2b2.orig/Python/getplatform.c
+++ Python-3.2b2/Python/getplatform.c
@@ -10,3 +10,23 @@ Py_GetPlatform(void)
{
return PLATFORM;
}
+
+#ifndef ARCH
+#define ARCH "unknown"
+#endif
+
+const char *
+Py_GetArch(void)
+{
+ return ARCH;
+}
+
+#ifndef LIB
+#define LIB "lib"
+#endif
+
+const char *
+Py_GetLib(void)
+{
+ return LIB;
+}
Index: Python-3.2b2/Python/sysmodule.c
===================================================================
--- Python-3.2b2.orig/Python/sysmodule.c
+++ Python-3.2b2/Python/sysmodule.c
@@ -1606,6 +1606,10 @@ _PySys_Init(void)
PyUnicode_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyUnicode_FromString(Py_GetPlatform()));
+ SET_SYS_FROM_STRING("arch",
+ PyUnicode_FromString(Py_GetArch()));
+ SET_SYS_FROM_STRING("lib",
+ PyUnicode_FromString(Py_GetLib()));
SET_SYS_FROM_STRING("executable",
PyUnicode_FromWideChar(
Py_GetProgramFullPath(), -1));
Index: Python-3.2b2/configure.in
===================================================================
--- Python-3.2b2.orig/configure.in
+++ Python-3.2b2/configure.in
@@ -580,6 +580,41 @@ hp*|HP*)
esac;;
esac
+AC_SUBST(ARCH)
+AC_MSG_CHECKING(ARCH)
+ARCH=`uname -m`
+case $ARCH in
+i?86) ARCH=i386;;
+esac
+AC_MSG_RESULT($ARCH)
+
+AC_SUBST(LIB)
+AC_MSG_CHECKING(LIB)
+case $ac_sys_system in
+Linux*)
+ # Test if the compiler is 64bit
+ echo 'int i;' > conftest.$ac_ext
+ python_cv_cc_64bit_output=no
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *"ELF 64"*)
+ python_cv_cc_64bit_output=yes
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+case $ARCH:$python_cv_cc_64bit_output in
+ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+ LIB="lib64"
+ ;;
+*:*)
+ LIB="lib"
+ ;;
+esac
+AC_MSG_RESULT($LIB)
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
Index: Python-3.2b2/setup.py
===================================================================
--- Python-3.2b2.orig/setup.py
+++ Python-3.2b2/setup.py
@@ -373,7 +373,7 @@ class PyBuildExt(build_ext):
# Ensure that /usr/local is always used, but the local build
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+ add_dir_to_list(self.compiler.library_dirs, os.path.join('/usr/local', sys.lib))
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# Add paths specified in the environment variables LDFLAGS and
@@ -425,8 +425,7 @@ class PyBuildExt(build_ext):
# if a file is found in one of those directories, it can
# be assumed that no additional -I,-L directives are needed.
lib_dirs = self.compiler.library_dirs + [
- '/lib64', '/usr/lib64',
- '/lib', '/usr/lib',
+ '/' + sys.lib, '/usr/' + sys.lib,
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
exts = []
@@ -619,11 +618,11 @@ class PyBuildExt(build_ext):
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
- ['/usr/lib/termcap'],
+ ['/usr/'+sys.lib+'/termcap'],
'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
+ library_dirs=['/usr/'+sys.lib+'/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
@@ -1528,18 +1527,17 @@ class PyBuildExt(build_ext):
# Check for various platform-specific directories
if platform == 'sunos5':
include_dirs.append('/usr/openwin/include')
- added_lib_dirs.append('/usr/openwin/lib')
+ added_lib_dirs.append('/usr/openwin/' + sys.lib)
elif os.path.exists('/usr/X11R6/include'):
include_dirs.append('/usr/X11R6/include')
- added_lib_dirs.append('/usr/X11R6/lib64')
- added_lib_dirs.append('/usr/X11R6/lib')
+ added_lib_dirs.append('/usr/X11R6/' + sys.lib)
elif os.path.exists('/usr/X11R5/include'):
include_dirs.append('/usr/X11R5/include')
- added_lib_dirs.append('/usr/X11R5/lib')
+ added_lib_dirs.append('/usr/X11R5/' + sys.lib)
else:
# Assume default location for X11
include_dirs.append('/usr/X11/include')
- added_lib_dirs.append('/usr/X11/lib')
+ added_lib_dirs.append('/usr/X11/' + sys.lib)
# If Cygwin, then verify that X is installed before proceeding
if platform == 'cygwin':
Index: Python-3.2b2/Lib/sysconfig.py
===================================================================
--- Python-3.2b2.orig/Lib/sysconfig.py
+++ Python-3.2b2/Lib/sysconfig.py
@@ -21,10 +21,10 @@ __all__ = [
_INSTALL_SCHEMES = {
'posix_prefix': {
- 'stdlib': '{base}/lib/python{py_version_short}',
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
'purelib': '{base}/lib/python{py_version_short}/site-packages',
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include':
'{base}/include/python{py_version_short}{abiflags}',
'platinclude':
@@ -33,10 +33,10 @@ _INSTALL_SCHEMES = {
'data': '{base}',
},
'posix_home': {
- 'stdlib': '{base}/lib/python',
- 'platstdlib': '{base}/lib/python',
+ 'stdlib': '{base}/'+sys.lib+'/python',
+ 'platstdlib': '{base}/'+sys.lib+'/python',
'purelib': '{base}/lib/python',
- 'platlib': '{base}/lib/python',
+ 'platlib': '{base}/'+sys.lib+'/python',
'include': '{base}/include/python',
'platinclude': '{base}/include/python',
'scripts': '{base}/bin',
@@ -81,10 +81,10 @@ _INSTALL_SCHEMES = {
'data' : '{userbase}',
},
'posix_user': {
- 'stdlib': '{userbase}/lib/python{py_version_short}',
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
++++++ README.SUSE ++++++
--- /var/tmp/diff_new_pack.iUVtmX/_old 2011-06-28 15:14:37.000000000 +0200
+++ /var/tmp/diff_new_pack.iUVtmX/_new 2011-06-28 15:14:37.000000000 +0200
@@ -1,21 +1,24 @@
-Python in SUSE
+Python 3 in SUSE
==============
* Documentation *
-You can find documentation in seprarate packages: python-doc and
-python-doc-pdf. These contan following documents:
+You can find documentation in seprarate packages: python3-doc and
+python3-doc-pdf. These contan following documents:
Tutorial, What's New in Python, Global Module Index, Library Reference,
Macintosh Module Reference, Installing Python Modules, Distributing Python
Modules, Language Reference, Extending and Embedding, Python/C API,
Documenting Python
-The python-doc package constains many text files from source tarball.
+The python3-doc package constains many text files from source tarball.
+* PYTHONSTARTUP environment variable *
+
+SUSE's Python 3 tries to start a script specified
* Interactive mode *
Interactive mode is by default enhanced with of history and command completion.
-If you don't like these features, you can unset PYTHONSTARTUP variable in your
-.profile or disable it system wide in /etc/profile.d/python.sh.
+If you don't like these features, you can unset PYTHON3STARTUP and PYTHONSTARTUP
+variables in your .profile or disable it system wide in /etc/profile.d/python.sh.
++++++ macros.python3.py ++++++
#!/usr/bin/python3
""" generate macros.python3 file from known values """
import sys,os
from distutils.sysconfig import get_python_lib
version = "{}.{}".format(*sys.version_info)
macros = {
"py3_ver": version,
"py3_prefix": sys.prefix,
"py3_incdir": os.path.join(sys.prefix, "include", "python" + version),
"python3_sitelib": get_python_lib(),
"python3_sitearch": get_python_lib(True),
"py3_compile(O)": """
find %1 -name '*.pyc' -exec rm -f {} ";"
python3 -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1
%{-O:
find %1 -name '*.pyo' -exec rm -f {} ";"
python3 -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1
}""",
}
for (macro,definition) in macros.items():
definition = "\\\n".join(definition.split("\n"))
print( "%{} {}".format(macro, definition))
++++++ python-3.1-docs-html.tar.bz2 -> python-3.2-docs-html.tar.bz2 ++++++
++++ 410982 lines of diff (skipped)
++++++ python-3.1-docs-pdf-a4.tar.bz2 -> python-3.2-docs-pdf-a4.tar.bz2 ++++++
python3/python-3.1-docs-pdf-a4.tar.bz2 /mounts/work_src_done/STABLE/python3/python-3.2-docs-pdf-a4.tar.bz2 differ: char 11, line 1
++++++ python-3.1-docs-pdf-letter.tar.bz2 -> python-3.2-docs-pdf-letter.tar.bz2 ++++++
python3/python-3.1-docs-pdf-letter.tar.bz2 /mounts/work_src_done/STABLE/python3/python-3.2-docs-pdf-letter.tar.bz2 differ: char 11, line 1
++++++ python-3.2-fix_date_time_compiler.patch ++++++
Index: Python-3.2/Makefile.pre.in
===================================================================
--- Python-3.2.orig/Makefile.pre.in
+++ Python-3.2/Makefile.pre.in
@@ -554,7 +554,15 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(SIGNAL_OBJS) \
$(MODOBJS) \
$(srcdir)/Modules/getbuildinfo.c
- $(CC) -c $(PY_CORE_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c
+ $(CC) -c $(PY_CORE_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" \
+ -DDATE="\"`date -u -r Makefile.pre.in +"%b %d %Y"`\"" \
+ -DTIME="\"`date -u -r Makefile.pre.in +"%T"`\"" \
+ -o $@ $(srcdir)/Modules/getbuildinfo.c
+
+Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile
+ $(CC) -c $(PY_CORE_CFLAGS) \
+ -DCOMPILER='"[GCC]"' \
+ -o $@ $(srcdir)/Python/getcompiler.c
Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
++++++ python-3.2-pybench.patch ++++++
diff -r -u Python-3.2.original/Tools/pybench/pybench.py Python-3.2/Tools/pybench/pybench.py
--- Python-3.2.original/Tools/pybench/pybench.py 2009-11-25 12:46:26.000000000 -0500
+++ Python-3.2/Tools/pybench/pybench.py 2011-04-20 17:32:11.000000000 -0400
@@ -276,7 +276,7 @@
for i in calibration_loops:
pass
t = timer() - t
- prep_times.append(t)
+ prep_times.append(t / CALIBRATION_LOOPS)
min_prep_time = min(prep_times)
if _debug:
print()
++++++ python-3.2b2-buildtime-generate.patch ++++++
Index: Python-3.2b2/Makefile.pre.in
===================================================================
--- Python-3.2b2.orig/Makefile.pre.in
+++ Python-3.2b2/Makefile.pre.in
@@ -645,7 +645,7 @@ Python/formatter_unicode.o: $(srcdir)/Py
Objects/typeobject.o: $(srcdir)/Objects/typeslots.inc
$(srcdir)/Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
- $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > $(srcdir)/Objects/typeslots.inc
+ $(RUNSHARED) ./$(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > $(srcdir)/Objects/typeslots.inc
############################################################################
# Header files
++++++ python-3.2rc2-localpath.patch ++++++
Index: Lib/site.py
===================================================================
--- Lib/site.py.orig
+++ Lib/site.py
@@ -57,7 +57,7 @@ import os
import traceback
# Prefixes for site-packages; add additional prefixes like /usr/local here
-PREFIXES = [sys.prefix, sys.exec_prefix]
+PREFIXES = [sys.prefix, sys.exec_prefix, '/usr/local']
# Enable per user site-packages directory
# set it to False to disable the feature or True to force the feature
ENABLE_USER_SITE = None
Index: Lib/test/test_site.py
===================================================================
--- Lib/test/test_site.py.orig
+++ Lib/test/test_site.py
@@ -164,12 +164,27 @@ class HelperFunctionsTests(unittest.Test
wanted = os.path.join('xoxo', 'Lib', 'site-packages')
self.assertEqual(dirs[0], wanted)
elif os.sep == '/':
- self.assertEqual(len(dirs), 2)
- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
+ i = 0
+ wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3],
'site-packages')
- self.assertEqual(dirs[0], wanted)
- wanted = os.path.join('xoxo', 'lib', 'site-python')
- self.assertEqual(dirs[1], wanted)
+ self.assertEqual(dirs[i], wanted)
+ i += 1
+ if sys.lib != 'lib':
+ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
+ 'site-packages')
+ self.assertEqual(dirs[i], wanted)
+ i += 1
+
+ wanted = os.path.join('xoxo', sys.lib, 'site-python')
+ self.assertEqual(dirs[i], wanted)
+ i += 1
+ if sys.lib != 'lib':
+ wanted = os.path.join('xoxo', 'lib', 'site-python')
+ self.assertEqual(dirs[i], wanted)
+ i += 1
+
+ self.assertTrue(i in [2,4])
+ self.assertEqual(len(dirs), i)
else:
self.assertEqual(len(dirs), 2)
self.assertEqual(dirs[0], 'xoxo')
++++++ python.csh -> python3.csh ++++++
++++++ python.csh -> python3.sh ++++++
--- python3/python.csh 2008-06-27 15:47:00.000000000 +0200
+++ /mounts/work_src_done/STABLE/python3/python3.sh 2011-01-19 18:28:35.000000000 +0100
@@ -1,2 +1,2 @@
# add python startup script for interactive sessions
-setenv PYTHONSTARTUP /etc/pythonstart
+export PYTHONSTARTUP=/etc/pythonstart
++++++ pythonstart -> python3start ++++++
--- python3/pythonstart 2008-06-27 15:45:26.000000000 +0200
+++ /mounts/work_src_done/STABLE/python3/python3start 2011-01-19 18:28:35.000000000 +0100
@@ -8,7 +8,7 @@
import rlcompleter
# where is history saved
-historyPath = os.path.expanduser("~/.pyhistory")
+historyPath = os.path.expanduser("~/.py3history")
# handler for saving history
def save_history(historyPath=historyPath):
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org