Updated to Python 2.7.5.

- Refreshed patches: 0 (config), 102 (lib64), 121 (add Modules to build path),
153 (gdb test noise)
- Dropped patches: 126, 127 (big endian issues, both fixed upstream),
175 (configure -Wformat, fixed upstream)
- Synced patch numbers with python3.spec.
This commit is contained in:
Bohuslav Kabrda 2013-05-16 15:15:46 +02:00
parent d2b9971f17
commit 1526d92d52
10 changed files with 86 additions and 72 deletions

View File

@ -0,0 +1,13 @@
--- Python-2.7.5/Lib/site.py.orig 2013-05-16 12:47:55.000000000 +0200
+++ Python-2.7.5/Lib/site.py 2013-05-16 12:56:20.089058109 +0200
@@ -529,6 +529,10 @@ def main():
abs__file__()
known_paths = removeduppaths()
+ from sysconfig import is_python_build
+ if is_python_build():
+ from _sysconfigdata import build_time_vars
+ sys.path.append(os.path.join(build_time_vars['abs_builddir'], 'Modules'))
if ENABLE_USER_SITE is None:
ENABLE_USER_SITE = check_enableusersite()
known_paths = addusersitepackages(known_paths)

View File

@ -1,13 +0,0 @@
diff -up Python-2.7.3/Lib/site.py.00121 Python-2.7.3/Lib/site.py
--- Python-2.7.3/Lib/site.py.00121 2013-02-19 14:07:19.156978291 -0500
+++ Python-2.7.3/Lib/site.py 2013-02-19 14:07:19.233978288 -0500
@@ -123,7 +123,7 @@ def addbuilddir():
s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
if hasattr(sys, 'gettotalrefcount'):
s += '-pydebug'
- s = os.path.join(os.path.dirname(sys.path.pop()), s)
+ s = os.path.join(os.path.dirname(sys.path[-1]), s)
sys.path.append(s)
diff -up Python-2.7.3/Misc/NEWS.00121 Python-2.7.3/Misc/NEWS

View File

@ -16,20 +16,16 @@
'run']
if cmds_after_breakpoint:
commands += cmds_after_breakpoint
@@ -135,8 +144,16 @@ class DebuggerTests(unittest.TestCase):
'Do you need "set solib-search-path" or '
'"set sysroot"?\n',
'')
+ err = '\n'.join([line
+ for line in err.splitlines()
+ if not line.startswith('warning: Unable to open')
+ if not line.startswith('Missing separate debuginfo for')
+ if not line.startswith('Try: yum --disablerepo=')
+ # In case 'set print entry-values no' failed:
+ if not line.startswith('Undefined set print command')])
# Ensure no unexpected error messages:
+ self.maxDiff = None
self.assertEqual(err, '')
return out
--- Lib/test/test_gdb.py.old 2012-04-11 21:04:01.367073855 -0400
+++ Lib/test/test_gdb.py 2012-04-12 08:52:58.320288761 -0400
@@ -144,6 +153,10 @@
'Do you need "set solib-search-path" or '
'"set sysroot"?',
)
+ ignore_patterns += ('warning: Unable to open',
+ 'Missing separate debuginfo for',
+ 'Try: yum --disablerepo=',
+ 'Undefined set print command')
for line in errlines:
if not line.startswith(ignore_patterns):
unexpected_errlines.append(line)

View File

@ -87,15 +87,6 @@ diff -up ./configure.autotool-intermediates ./configure
# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
# merged with this chunk of code?
@@ -6253,7 +6271,7 @@ then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Werror"
+ CFLAGS="$CFLAGS -Werror -Wformat"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9958,6 +9976,50 @@ $as_echo "no" >&6; }
fi

View File

@ -9,7 +9,7 @@
# GNU readline. Unlike previous Python incarnations, GNU readline is
# now incorporated in an optional module, configured in the Setup file
@@ -163,74 +163,74 @@ GLHACK=-Dclear=__GLclear
@@ -163,77 +163,77 @@ GLHACK=-Dclear=__GLclear
# it, depending on your system -- see the GNU readline instructions.
# It's okay for this to be a shared library, too.
@ -57,6 +57,9 @@
-#_locale _localemodule.c # -lintl
+_locale _localemodule.c # -lintl
# Standard I/O baseline
#_io -I$(srcdir)/Modules/_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c
# Modules with some UNIX dependencies -- on by default:
# (If you have a really backward UNIX, select and socket may not be
@ -80,7 +83,7 @@
+_csv _csv.c
# Socket module helper for socket(2)
-#_socket socketmodule.c
-#_socket socketmodule.c timemodule.c
+_socket socketmodule.c timemodule.c
# Socket module helper for SSL support; you must comment out the other

View File

@ -167,8 +167,8 @@ diff -up Python-2.7.3/setup.py.lib64 Python-2.7.3/setup.py
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
self.add_gcc_paths()
self.add_multiarch_paths()
@@ -677,11 +677,11 @@ class PyBuildExt(build_ext):
elif curses_library:
readline_libs.append(curses_library)

View File

@ -105,8 +105,8 @@
Summary: An interpreted, interactive, object-oriented programming language
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.7.4
Release: 5%{?dist}
Version: 2.7.5
Release: 1%{?dist}
License: Python
Group: Development/Languages
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
@ -459,9 +459,8 @@ Patch114: 00114-statvfs-f_flag-constants.patch
# File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/struct.py", line 1, in <module>
# from _struct import *
# ImportError: No module named _struct
#
# For now, revert this patch:
Patch121: 00121-revert-r79310.patch
# This patch adds the build Modules directory to build path.
Patch121: 00121-add-Modules-to-build-path.patch
# 00125 #
# COUNT_ALLOCS is useful for debugging, but the upstream behaviour of always
@ -471,13 +470,11 @@ Patch121: 00121-revert-r79310.patch
# Not yet sent upstream
Patch125: 00125-less-verbose-COUNT_ALLOCS.patch
# Fix dbm module on big-endian 64-bit
# Sent upstream as http://bugs.python.org/issue9687 (rhbz#626756)
Patch126: fix-dbm_contains-on-64bit-bigendian.patch
# Upstream as of Python 2.7.5
# Patch126: fix-dbm_contains-on-64bit-bigendian.patch
# Fix test_structmember on big-endian 64-bit
# Sent upstream as http://bugs.python.org/issue9960
Patch127: fix-test_structmember-on-64bit-bigendian.patch
# Upstream as of Python 2.7.5
# Patch127: fix-test_structmember-on-64bit-bigendian.patch
# 2.7.1 (in r84230) added a test to test_abc which fails if python is
# configured with COUNT_ALLOCS, which is the case for our debug build
@ -772,27 +769,42 @@ Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch
Patch174: 00174-fix-for-usr-move.patch
# 00175 #
# Fix for configure.ac mistakenly detecting
# checking whether gcc supports ParseTuple __format__... yes
# when it doesn't, when compiling with gcc 4.8
#
# Sent upstream as http://bugs.python.org/issue17547
# (rhbz#927358)
Patch175: 00175-fix-configure-Wformat.patch
# Upstream as of Python 2.7.5
# Patch175: 00175-fix-configure-Wformat.patch
# 00176 #
# python3.spec had:
# Patch176: 00176-upstream-issue16754-so-extension.patch
# doesn't affect python2
# 00177 #
# python3.spec has
# Patch177: 00177-platform-unicode.patch
# Does not affect python2
# 00178 #
# python3.spec has
# Patch178: 00178-dont-duplicate-flags-in-sysconfig.patch
# Does not affect python2 AFAICS (different sysconfig values initialization)
# 00179 #
# python3.spec has
# Patch179: 00179-dont-raise-error-on-gdb-corrupted-frames-in-backtrace.patch
# Doesn't seem to affect python2
# 00180 #
# Enable building on ppc64p7
# Not appropriate for upstream, Fedora-specific naming
Patch180: 00180-python-add-support-for-ppc64p7.patch
# 00181 #
# Allow arbitrary timeout for Condition.wait, as reported in
# https://bugzilla.redhat.com/show_bug.cgi?id=917709
# Upstream doesn't want this: http://bugs.python.org/issue17748
# But we have no better solution downstream yet, and since there is
# no API breakage, we apply this patch.
# Doesn't apply to Python 3, where this is fixed otherwise and works.
Patch176: 00176-allow-arbitrary-timeout-in-condition-wait.patch
# 00177 #
# Enable building on ppc64p7
# Not appropriate for upstream, Fedora-specific naming
Patch177: 00177-python-add-support-for-ppc64p7.patch
Patch181: 00181-allow-arbitrary-timeout-in-condition-wait.patch
# (New patches go here ^^^)
@ -1074,8 +1086,8 @@ done
%patch121 -p1
%patch125 -p1 -b .less-verbose-COUNT_ALLOCS
%patch126 -p0 -b .fix-dbm_contains-on-64bit-bigendian
%patch127 -p1 -b .fix-test_structmember-on-64bit-bigendian
# 00126: upstream as of Python 2.7.5
# 00127: upstream as of Python 2.7.5
%patch128 -p1
%patch130 -p1
@ -1133,9 +1145,13 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
# 00171: upstream as of Python 2.7.4
%patch173 -p1
%patch174 -p1 -b .fix-for-usr-move
%patch175 -p1 -b .fix-configure-Wformat
%patch176 -p1
%patch177 -p1
# 00175: upstream as of Python 2.7.5
# 00176: not for python 2
# 00177: not for python 2
# 00178: not for python 2
# 00179: not for python 2
%patch180 -p1
%patch181 -p1
# This shouldn't be necesarry, but is right now (2.2a3)
@ -1965,6 +1981,14 @@ rm -fr %{buildroot}
# ======================================================
%changelog
* Thu May 16 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 2.7.5-1
- Updated to Python 2.7.5.
- Refreshed patches: 0 (config), 102 (lib64), 121 (add Modules to build path),
153 (gdb test noise)
- Dropped patches: 126, 127 (big endian issues, both fixed upstream),
175 (configure -Wformat, fixed upstream)
- Synced patch numbers with python3.spec.
* Tue May 14 2013 David Malcolm <dmalcolm@redhat.com> - 2.7.4-5
- fix multilib issue in python-tools due to /usr/bin/pynche (source 7;
rhbz#831437)

View File

@ -1 +1 @@
86909785aa1ff13b49d87737b75b5f54 Python-2.7.4.tar.xz
5eea8462f69ab1369d32f9c4cd6272ab Python-2.7.5.tar.xz