OBS User unknown
2008-10-13 14:53:57 +00:00
committed by Git OBS Bridge
parent da47da1873
commit 50348391e3
19 changed files with 93 additions and 124 deletions

View File

@@ -1,5 +1,5 @@
#
# spec file for package python (Version 2.6rc2)
# spec file for package python (Version 2.6.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -27,12 +27,13 @@ Url: http://www.python.org/
License: X11/MIT
Group: Development/Languages/Python
AutoReqProv: on
Requires: python-base
Obsoletes: python-nothreads python21 python-elementtree python-sqlite
Summary: Python Interpreter
Version: 2.6rc2
Version: 2.6.0
Release: 1
%define tarname Python-%{version}
Requires: python-base = %{version}
#%define tarname Python-%{version}
%define tarname Python-2.6
Source0: %{tarname}.tar.bz2
Source6: README.SUSE
Source8: pythonstart
@@ -44,15 +45,14 @@ Patch01: Python-2.3.3-dirs.patch
Patch21: Python-2.6b1-multilib.patch
Patch23: python-2.6b3-ssl-compat.patch
Patch25: python-2.6b1-canonicalize2.patch
Patch26: python-2.6b1-localpath.patch
Patch30: python-2.5.1-sqlite.patch
Patch31: python-2.5.2-fwrapv.patch
Patch35: python-2.5.2-configure.patch
Patch38: python-2.6b3-curses-panel.patch
Patch39: python-2.6rc2-sslwrap-simple.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define python_version %(echo %{version} | head -c 3)
%define idle_name idle
Provides: %{name} = %{python_version}
%description
Python is an interpreted, object-oriented programming language, and is
@@ -71,7 +71,7 @@ Authors:
%package idle
License: Python Copyright
Requires: python = %{version} python-tk
Requires: python-base = %{version} python-tk
Summary: An Integrated Development Environment for Python
Group: Development/Languages/Python
AutoReqProv: on
@@ -92,7 +92,7 @@ Authors:
License: Python Copyright
Provides: pyth_dmo
Obsoletes: pyth_dmo
Requires: python = %{version}
Requires: python-base = %{version}
Summary: Python Demonstration Scripts
Group: Development/Languages/Python
AutoReqProv: on
@@ -114,7 +114,7 @@ Provides: pyth_tk python_tkinter_lib pyth_tkl python-tkinter
#Provides: _tkinter.so
#%endif
Obsoletes: pyth_tk pyth_tkl python-tkinter
Requires: python = %{version}
Requires: python-base = %{version}
Summary: TkInter - Python Tk Interface
Group: Development/Libraries/Python
AutoReqProv: on
@@ -131,7 +131,7 @@ Authors:
%package curses
License: Python Copyright
Requires: python = %{version}
Requires: python-base = %{version}
Obsoletes: pyth_cur
Provides: pyth_cur
Summary: Python Interface to the (N)Curses Library
@@ -150,7 +150,7 @@ Authors:
%package gdbm
License: X11/MIT
Requires: python = %{version}
Requires: python-base = %{version}
Obsoletes: pygdmod
Provides: pygdmod
Summary: Python Interface to the GDBM Library
@@ -175,7 +175,6 @@ Authors:
%patch21 -p1
%patch23
%patch25
%patch26
%patch30
%patch31
#%if 0%{?suse_version}
@@ -184,7 +183,6 @@ Authors:
%if %suse_version > 1100
%patch38
%endif
%patch39
# some cleanup
find . -name .cvsignore -type f -print0 | xargs -0 rm -f
find . -name CVS -type d -print0 | xargs -0 rm -rf
@@ -223,22 +221,16 @@ make %{?jobs:-j%jobs} DESTDIR=$RPM_BUILD_ROOT
# 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_urllib2 fails in autobuild env, because it's notoriously impossible to resolve an address in autobuild
EXCLUDE="-x test_urllib2 -x test_file"
# these two tests work fine but are awfully slow
EXCLUDE="$EXCLUDE -x test_nis -x test_threading"
# 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"
LIST="test_urllib test_ssl test_hashlib test_hmac test_urllib2_localnet test_unicodedata test_tarfile test_sqlite test_tcl test_anydbm test_dumbdbm test_gdbm test_whichdb"
make test TESTOPTS="$LIST"
%endif
%install
# replace rest of /usr/local/bin/python or /usr/bin/python2.5 with /usr/bin/python
# replace rest of /usr/local/bin/python or /usr/bin/python2.x with /usr/bin/python
find . -wholename "./Parser" -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/python@'
# the grep inbetween makes it much faster
########################################
@@ -259,7 +251,7 @@ done
# kill imageop.so, it's insecure
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}/lib-dynload/imageop.so
#cleanup for -base
rm $RPM_BUILD_ROOT%{_bindir}/python{,2.6}
rm $RPM_BUILD_ROOT%{_bindir}/python{,%{python_version}}
rm $RPM_BUILD_ROOT%{_bindir}/smtpd.py
rm $RPM_BUILD_ROOT%{_bindir}/pydoc
rm $RPM_BUILD_ROOT%{_bindir}/2to3
@@ -343,7 +335,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_codecs*.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_multibytecodec.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/audioop.so
rm -f $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/dl.so
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/Python-%{version}-py%{python_version}.egg-info
#rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/Python-%{version}-py%{python_version}.egg-info
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/%{tarname}-py%{python_version}.egg-info
%if %suse_version >= 1030
# replace duplicate .pyo/.pyc with hardlinks
%fdupes $RPM_BUILD_ROOT/%{_libdir}/python%{python_version}
@@ -443,6 +436,11 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/python%{python_version}/lib-dynload/readline.so
%changelog
* Thu Oct 09 2008 matejcik@suse.cz
- update to 2.6 (version name is 2.6.0 to prevent upgrade problems)
- don't run the whole test suite, only run tests for
newly built modules
- provide %%name = 2.6
* Fri Sep 19 2008 matejcik@suse.cz
- moved testsuite to %%check section
- update to 2.6rc2, removing the last remaining security patch