From 440a06e890dd4f86d647c29cbe819a60465a4ed6 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: May 31 2007 20:09:48 +0000 Subject: - update to python 2.5.1 --- diff --git a/.cvsignore b/.cvsignore index 21fcb88..b80caad 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -Python-2.5.tar.bz2 +Python-2.5.1.tar.bz2 diff --git a/python-2.5-distutils-bdist-rpm.patch b/python-2.5-distutils-bdist-rpm.patch deleted file mode 100644 index 982430b..0000000 --- a/python-2.5-distutils-bdist-rpm.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- Python-2.5a2/Lib/distutils/command/bdist_rpm.py.bdist-rpm 2005-04-15 02:17:20.000000000 -0400 -+++ Python-2.5a2/Lib/distutils/command/bdist_rpm.py 2006-06-19 09:14:28.000000000 -0400 -@@ -337,37 +337,47 @@ - if not self.keep_temp: - rpm_cmd.append('--clean') - rpm_cmd.append(spec_path) -+ # Determine the binary rpm names that should be built out of this spec -+ # file -+ # Note that some of these may not be really built (if the file -+ # list is empty) -+ nvr_string = "%{name}-%{version}-%{release}" -+ src_rpm = nvr_string + ".src.rpm" -+ non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm" -+ q_cmd = r"rpm -q --qf '%s %s\n' --specfile '%s'" % ( -+ src_rpm, non_src_rpm, spec_path) -+ -+ out = os.popen(q_cmd) -+ binary_rpms = [] -+ source_rpm = None -+ while 1: -+ line = out.readline() -+ if not line: -+ break -+ l = string.split(string.strip(line)) -+ assert(len(l) == 2) -+ binary_rpms.append(l[1]) -+ # The source rpm is named after the first entry in the spec file -+ if source_rpm is None: -+ source_rpm = l[0] -+ -+ status = out.close() -+ if status: -+ raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd)) -+ - self.spawn(rpm_cmd) - -- # XXX this is a nasty hack -- we really should have a proper way to -- # find out the names of the RPM files created; also, this assumes -- # that RPM creates exactly one source and one binary RPM. - if not self.dry_run: - if not self.binary_only: -- srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) -- assert len(srpms) == 1, \ -- "unexpected number of SRPM files found: %s" % srpms -- dist_file = ('bdist_rpm', 'any', -- self._dist_path(srpms[0])) -- self.distribution.dist_files.append(dist_file) -- self.move_file(srpms[0], self.dist_dir) -+ srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) -+ assert(os.path.exists(srpm)) -+ self.move_file(srpm, self.dist_dir) - - if not self.source_only: -- rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) -- debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], -- "*/*debuginfo*.rpm")) -- if debuginfo: -- rpms.remove(debuginfo[0]) -- assert len(rpms) == 1, \ -- "unexpected number of RPM files found: %s" % rpms -- dist_file = ('bdist_rpm', get_python_version(), -- self._dist_path(rpms[0])) -- self.distribution.dist_files.append(dist_file) -- self.move_file(rpms[0], self.dist_dir) -- if debuginfo: -- dist_file = ('bdist_rpm', get_python_version(), -- self._dist_path(debuginfo[0])) -- self.move_file(debuginfo[0], self.dist_dir) -+ for rpm in binary_rpms: -+ rpm = os.path.join(rpm_dir['RPMS'], rpm) -+ if os.path.exists(rpm): -+ self.move_file(rpm, self.dist_dir) - # run() - - def _dist_path(self, path): diff --git a/python-2.5-fix-invalid-assert.patch b/python-2.5-fix-invalid-assert.patch deleted file mode 100644 index bbed09a..0000000 --- a/python-2.5-fix-invalid-assert.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -urp Python-2.5/Lib/test/test_grammar.py Python-2.5-fixes/Lib/test/test_grammar.py ---- Python-2.5/Lib/test/test_grammar.py 2006-09-04 23:56:01.000000000 -0400 -+++ Python-2.5-fixes/Lib/test/test_grammar.py 2006-12-13 12:38:03.000000000 -0500 -@@ -709,6 +709,7 @@ x = {'one': 1, 'two': 2, 'three': 3, 'fo - - x = `x` - x = `1 or 2 or 3` -+x = `1,2` - x = x - x = 'x' - x = 123 -diff -urp Python-2.5/Python/ast.c Python-2.5-fixes/Python/ast.c ---- Python-2.5/Python/ast.c 2006-09-04 23:56:01.000000000 -0400 -+++ Python-2.5-fixes/Python/ast.c 2006-12-13 12:39:30.000000000 -0500 -@@ -538,6 +538,7 @@ seq_for_testlist(struct compiling *c, co - || TYPE(n) == listmaker - || TYPE(n) == testlist_gexp - || TYPE(n) == testlist_safe -+ || TYPE(n) == testlist1 - ); - - seq = asdl_seq_new((NCH(n) + 1) / 2, c->c_arena); diff --git a/python-ctypes-execstack.patch b/python-ctypes-execstack.patch deleted file mode 100644 index 40f716d..0000000 --- a/python-ctypes-execstack.patch +++ /dev/null @@ -1,79 +0,0 @@ ---- Python-2.5/Modules/_ctypes/libffi/src/x86/unix64.S.ctypes-exec 2006-03-08 20:35:32.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/x86/unix64.S 2007-01-03 12:48:32.000000000 -0500 -@@ -410,3 +410,5 @@ - .LEFDE3: - - #endif /* __x86_64__ */ -+ -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/x86/sysv.S.ctypes-exec 2006-03-08 20:35:32.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/x86/sysv.S 2007-01-03 12:48:32.000000000 -0500 -@@ -376,3 +376,5 @@ - #endif - - #endif /* ifndef __x86_64__ */ -+ -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/s390/sysv.S.ctypes-exec 2007-01-03 12:54:40.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/s390/sysv.S 2007-01-03 12:51:32.000000000 -0500 -@@ -427,3 +427,4 @@ - - #endif - -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/powerpc/linux64.S.ctypes-exec 2007-01-03 12:54:40.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/powerpc/linux64.S 2007-01-03 12:51:51.000000000 -0500 -@@ -178,3 +178,5 @@ - .align 3 - .LEFDE1: - #endif -+ -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/powerpc/linux64_closure.S.ctypes-exec 2007-01-03 12:54:40.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/powerpc/linux64_closure.S 2007-01-03 12:53:51.000000000 -0500 -@@ -204,3 +204,5 @@ - .align 3 - .LEFDE1: - #endif -+ -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/powerpc/ppc_closure.S.ctypes-exec 2007-01-03 12:54:40.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/powerpc/ppc_closure.S 2007-01-03 12:52:35.000000000 -0500 -@@ -321,3 +321,5 @@ - .LEFDE1: - - #endif -+ -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/powerpc/sysv.S.ctypes-exec 2007-01-03 12:54:40.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/powerpc/sysv.S 2007-01-03 12:51:57.000000000 -0500 -@@ -215,3 +215,5 @@ - .align 2 - .LEFDE1: - #endif -+ -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/ia64/unix.S.ctypes-exec 2007-01-03 12:54:40.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/ia64/unix.S 2007-01-03 12:54:05.000000000 -0500 -@@ -553,3 +553,5 @@ - data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT - data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE - data8 @pcrel(.Lld_hfa_ldouble) // FFI_IA64_TYPE_HFA_LDOUBLE -+ -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/sparc/v8.S.ctypes-exec 2007-01-03 12:54:40.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/sparc/v8.S 2007-01-03 12:54:24.000000000 -0500 -@@ -265,3 +265,5 @@ - .byte 0x1f ! uleb128 0x1f - .align WS - .LLEFDE2: -+ -+.section .note.GNU-stack,"",@progbits ---- Python-2.5/Modules/_ctypes/libffi/src/sparc/v9.S.ctypes-exec 2007-01-03 12:54:40.000000000 -0500 -+++ Python-2.5/Modules/_ctypes/libffi/src/sparc/v9.S 2007-01-03 12:54:26.000000000 -0500 -@@ -300,3 +300,5 @@ - .align 8 - .LLEFDE2: - #endif -+ -+.section .note.GNU-stack,"",@progbits diff --git a/python-db45.patch b/python-db45.patch deleted file mode 100644 index 61faed2..0000000 --- a/python-db45.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- Python-2.5/setup.py.db45 2006-08-09 19:42:18.000000000 -0400 -+++ Python-2.5/setup.py 2006-12-05 16:05:43.000000000 -0500 -@@ -606,7 +606,7 @@ - # a release. Most open source OSes come with one or more - # versions of BerkeleyDB already installed. - -- max_db_ver = (4, 4) -+ max_db_ver = (4, 5) - min_db_ver = (3, 3) - db_setup_debug = False # verbose debug prints from this script? - -@@ -623,7 +623,7 @@ - '/sw/include/db3', - ] - # 4.x minor number specific paths -- for x in (0,1,2,3,4): -+ for x in (0,1,2,3,4,5): - db_inc_paths.append('/usr/include/db4%d' % x) - db_inc_paths.append('/usr/include/db4.%d' % x) - db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) ---- Python-2.5/Modules/_bsddb.c.db45 2006-12-05 16:12:08.000000000 -0500 -+++ Python-2.5/Modules/_bsddb.c 2006-12-05 16:15:44.000000000 -0500 -@@ -4129,6 +4129,7 @@ - } - - -+#if (DBVER < 45) - static PyObject* - DBEnv_set_lk_max(DBEnvObject* self, PyObject* args) - { -@@ -4144,7 +4145,7 @@ - RETURN_IF_ERR(); - RETURN_NONE(); - } -- -+#endif - - #if (DBVER >= 32) - -@@ -5233,7 +5234,9 @@ - {"set_lg_regionmax",(PyCFunction)DBEnv_set_lg_regionmax, METH_VARARGS}, - #endif - {"set_lk_detect", (PyCFunction)DBEnv_set_lk_detect, METH_VARARGS}, -+#if (DBVER <= 40) - {"set_lk_max", (PyCFunction)DBEnv_set_lk_max, METH_VARARGS}, -+#endif - #if (DBVER >= 32) - {"set_lk_max_locks", (PyCFunction)DBEnv_set_lk_max_locks, METH_VARARGS}, - {"set_lk_max_lockers", (PyCFunction)DBEnv_set_lk_max_lockers, METH_VARARGS}, -@@ -5835,7 +5838,9 @@ - ADD_INT(d, DB_AFTER); - ADD_INT(d, DB_APPEND); - ADD_INT(d, DB_BEFORE); -+#if (DBVER <= 40) - ADD_INT(d, DB_CACHED_COUNTS); -+#endif - #if (DBVER >= 41) - _addIntToDict(d, "DB_CHECKPOINT", 0); - #else -@@ -5870,7 +5875,9 @@ - ADD_INT(d, DB_POSITION); - ADD_INT(d, DB_PREV); - ADD_INT(d, DB_PREV_NODUP); -+#if (DBVER <= 40) - ADD_INT(d, DB_RECORDCOUNT); -+#endif - ADD_INT(d, DB_SET); - ADD_INT(d, DB_SET_RANGE); - ADD_INT(d, DB_SET_RECNO); diff --git a/python-syslog-fail-noatexittb.patch b/python-syslog-fail-noatexittb.patch deleted file mode 100644 index ee0094b..0000000 --- a/python-syslog-fail-noatexittb.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- Python-2.4.4/Lib/logging/handlers.py.syslogexit 2006-12-05 11:41:12.000000000 -0500 -+++ Python-2.4.4/Lib/logging/handlers.py 2006-12-05 11:41:20.000000000 -0500 -@@ -586,11 +586,11 @@ - self.address = address - self.facility = facility - if type(address) == types.StringType: -- self._connect_unixsocket(address) - self.unixsocket = 1 -+ self._connect_unixsocket(address) - else: -- self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - self.unixsocket = 0 -+ self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - - self.formatter = None - diff --git a/python.spec b/python.spec index 186e275..1b8fe67 100644 --- a/python.spec +++ b/python.spec @@ -19,9 +19,8 @@ Summary: An interpreted, interactive, object-oriented programming language. Name: %{python} -#Version: %{pybasever}.3 -Version: 2.5 -Release: 12%{?dist} +Version: 2.5.1 +Release: 1%{?dist} License: Python Software Foundation License v2 Group: Development/Languages Provides: python-abi = %{pybasever} @@ -30,16 +29,11 @@ Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2 Patch0: python-2.5-config.patch Patch1: Python-2.2.1-pydocnogui.patch -Patch2: python-2.5-distutils-bdist-rpm.patch -Patch3: python-2.3.4-pydocnodoc.patch -Patch4: python-2.4.1-canonicalize.patch -Patch5: python-2.5-cflags.patch -Patch6: python-db45.patch -Patch7: python-ctypes-execstack.patch +Patch2: python-2.3.4-pydocnodoc.patch +Patch3: python-2.4.1-canonicalize.patch +Patch4: python-2.5-cflags.patch # upstreamed -Patch25: python-syslog-fail-noatexittb.patch -Patch26: python-2.5-fix-invalid-assert.patch # disable egg-infos for now Patch50: python-2.5-disable-egginfo.patch @@ -158,14 +152,9 @@ user interface for Python programming. %patch0 -p1 -b .rhconfig %patch1 -p1 -b .no_gui -%patch2 -p1 -b .bdist-rpm -%patch3 -p1 -b .no-doc -%patch4 -p1 -b .canonicalize -%patch5 -p1 -b .cflags -%patch6 -p1 -b .db45 -%patch7 -p1 -b .ctypes-exec -%patch25 -p1 -b .syslog-atexit -%patch26 -p1 -b .invalid-assert +%patch2 -p1 -b .no-doc +%patch3 -p1 -b .canonicalize +%patch4 -p1 -b .cflags %patch50 -p1 -b .egginfo @@ -182,10 +171,6 @@ user interface for Python programming. # This shouldn't be necesarry, but is right now (2.2a3) find -name "*~" |xargs rm -f -# Temporary workaround to avoid confusing find-requires: don't ship the tests -# as executable files -chmod 0644 Lib/test/test_*.py - %build topdir=`pwd` export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC" @@ -229,6 +214,9 @@ for fixed in $RPM_BUILD_ROOT%{_bindir}/pydoc; do && cat $fixed- > $fixed && rm -f $fixed- done +# don't include tests that are run at build time in the package +rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{pybasever}/test + %if %{main_python} ln -s python $RPM_BUILD_ROOT%{_bindir}/python2 %else @@ -287,9 +275,6 @@ find . -name ".cvsignore"|xargs rm -f #zero length rm -f $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/site-packages/modulator/Templates/copyright -# Clean up the testsuite - we don't need compiled files for it -find $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/test \ - -name "*.pyc" -o -name "*.pyo" | xargs rm -f rm -f $RPM_BUILD_ROOT%{_libdir}/python%{pybasever}/LICENSE.txt @@ -396,7 +381,6 @@ rm -fr $RPM_BUILD_ROOT /usr/include/* %dir %{_libdir}/python%{pybasever}/config %{_libdir}/python%{pybasever}/config/* -%{_libdir}/python%{pybasever}/test %{_libdir}/libpython%{pybasever}.so %files tools @@ -421,6 +405,9 @@ rm -fr $RPM_BUILD_ROOT %{_libdir}/python%{pybasever}/lib-dynload/_tkinter.so %changelog +* Thu May 31 2007 Jeremy Katz - 2.5.1-1 +- update to python 2.5.1 + * Mon Mar 19 2007 Jeremy Katz - 2.5.3-12 - fix alpha build (#231961) diff --git a/sources b/sources index 99f6917..e8a2035 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ddb7401e711354ca83b7842b733825a3 Python-2.5.tar.bz2 +70084ffa561660f07de466c2c8c4842d Python-2.5.1.tar.bz2