From e28c8236366a8996f1a1d9a59f800dc3bc75adf7 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 6 Dec 2015 19:41:40 +0100 Subject: Version bump to 2.7.11, from Arfrever --- patches/01_all_static_library_location.patch | 4 +- patches/03_all_libdir.patch | 24 ++++---- patches/05_all_loadable_sqlite_extensions.patch | 2 +- ..._all_regenerate_platform-specific_modules.patch | 12 ++-- patches/21_all_distutils_c++.patch | 44 +++++++------- patches/23_all_arm_OABI.patch | 18 +++--- patches/24_all_tests_environment.patch | 71 ++++++++++++++-------- 7 files changed, 97 insertions(+), 78 deletions(-) diff --git a/patches/01_all_static_library_location.patch b/patches/01_all_static_library_location.patch index 4af8e46..60cd481 100644 --- a/patches/01_all_static_library_location.patch +++ b/patches/01_all_static_library_location.patch @@ -4,7 +4,7 @@ https://bugs.python.org/issue6103 --- Makefile.pre.in +++ Makefile.pre.in -@@ -924,6 +924,19 @@ +@@ -954,6 +954,19 @@ fi; \ else true; \ fi @@ -24,7 +24,7 @@ https://bugs.python.org/issue6103 # Install the versioned manual page altmaninstall: -@@ -1121,18 +1134,6 @@ +@@ -1151,18 +1164,6 @@ else true; \ fi; \ done diff --git a/patches/03_all_libdir.patch b/patches/03_all_libdir.patch index da3f90c..dfafeb2 100644 --- a/patches/03_all_libdir.patch +++ b/patches/03_all_libdir.patch @@ -86,7 +86,7 @@ # other platforms --- Makefile.pre.in +++ Makefile.pre.in -@@ -106,7 +106,7 @@ +@@ -111,7 +111,7 @@ MANDIR= @mandir@ INCLUDEDIR= @includedir@ CONFINCLUDEDIR= $(exec_prefix)/include @@ -95,6 +95,17 @@ # Detailed destination directories BINLIBDEST= $(LIBDIR)/python$(VERSION) +--- Modules/Setup.dist ++++ Modules/Setup.dist +@@ -464,7 +464,7 @@ + # Andrew Kuchling's zlib module. + # This require zlib 1.1.3 (or later). + # See http://www.gzip.org/zlib/ +-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz ++#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz + + # Interface to the Expat XML parser + # --- Modules/getpath.c +++ Modules/getpath.c @@ -129,7 +129,7 @@ @@ -124,17 +135,6 @@ } /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ ---- Modules/Setup.dist -+++ Modules/Setup.dist -@@ -464,7 +464,7 @@ - # Andrew Kuchling's zlib module. - # This require zlib 1.1.3 (or later). - # See http://www.gzip.org/zlib/ --#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz -+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz - - # Interface to the Expat XML parser - # --- setup.py +++ setup.py @@ -452,7 +452,7 @@ diff --git a/patches/05_all_loadable_sqlite_extensions.patch b/patches/05_all_loadable_sqlite_extensions.patch index e63314f..28756cb 100644 --- a/patches/05_all_loadable_sqlite_extensions.patch +++ b/patches/05_all_loadable_sqlite_extensions.patch @@ -3,7 +3,7 @@ https://bugs.python.org/issue10268 --- configure.ac +++ configure.ac -@@ -2332,6 +2332,15 @@ +@@ -2377,6 +2377,15 @@ TCLTK_LIBS="$with_tcltk_libs" fi diff --git a/patches/06_all_regenerate_platform-specific_modules.patch b/patches/06_all_regenerate_platform-specific_modules.patch index 51b4913..848c055 100644 --- a/patches/06_all_regenerate_platform-specific_modules.patch +++ b/patches/06_all_regenerate_platform-specific_modules.patch @@ -37,16 +37,16 @@ https://bugs.python.org/issue12619 +python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h --- Makefile.pre.in +++ Makefile.pre.in -@@ -408,7 +408,7 @@ +@@ -422,7 +422,7 @@ # Default target all: build_all -build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks +build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods gdbhooks - # Compile a binary with gcc profile guided optimization. + # Compile a binary with profile guided optimization. profile-opt: -@@ -476,6 +476,32 @@ +@@ -501,6 +501,32 @@ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build @@ -79,7 +79,7 @@ https://bugs.python.org/issue12619 # Build static library # avoid long command lines, same as LIBRARY_OBJS $(LIBRARY): $(LIBRARY_OBJS) -@@ -995,7 +1021,7 @@ +@@ -1025,7 +1051,7 @@ unittest unittest/test \ lib-old \ curses pydoc_data $(MACHDEPS) @@ -88,7 +88,7 @@ https://bugs.python.org/issue12619 @for i in $(SCRIPTDIR) $(LIBDEST); \ do \ if test ! -d $(DESTDIR)$$i; then \ -@@ -1078,23 +1104,6 @@ +@@ -1108,23 +1134,6 @@ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt @@ -112,7 +112,7 @@ https://bugs.python.org/issue12619 python-config: $(srcdir)/Misc/python-config.in # Substitution happens here, as the completely-expanded BINDIR # is not available in configure -@@ -1388,7 +1397,7 @@ +@@ -1420,7 +1429,7 @@ Python/thread.o: @THREADHEADERS@ # Declare targets that aren't real files diff --git a/patches/21_all_distutils_c++.patch b/patches/21_all_distutils_c++.patch index eb5552e..b30b2eb 100644 --- a/patches/21_all_distutils_c++.patch +++ b/patches/21_all_distutils_c++.patch @@ -1,5 +1,26 @@ https://bugs.python.org/issue1222585 +--- Lib/_osx_support.py ++++ Lib/_osx_support.py +@@ -14,13 +14,13 @@ + # configuration variables that may contain universal build flags, + # like "-arch" or "-isdkroot", that may need customization for + # the user environment +-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', +- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', +- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', +- 'PY_CORE_CFLAGS') ++_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', ++ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', ++ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', ++ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') + + # configuration variables that may contain compiler calls +-_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') ++_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') + + # prefix added to original configuration variable names + _INITPRE = '_OSX_SUPPORT_INITIAL_' --- Lib/distutils/cygwinccompiler.py +++ Lib/distutils/cygwinccompiler.py @@ -117,8 +117,10 @@ @@ -239,30 +260,9 @@ https://bugs.python.org/issue1222585 if sys.platform == 'darwin': linker = _osx_support.compiler_fixup(linker, ld_args) ---- Lib/_osx_support.py -+++ Lib/_osx_support.py -@@ -14,13 +14,13 @@ - # configuration variables that may contain universal build flags, - # like "-arch" or "-isdkroot", that may need customization for - # the user environment --_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS', -- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX', -- 'PY_CFLAGS', 'PY_LDFLAGS', 'PY_CPPFLAGS', -- 'PY_CORE_CFLAGS') -+_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'CPPFLAGS', -+ 'BASECFLAGS', 'BLDSHARED', 'LDSHARED', 'LDCXXSHARED', -+ 'CC', 'CXX', 'PY_CFLAGS', 'PY_LDFLAGS', -+ 'PY_CPPFLAGS', 'PY_CORE_CFLAGS') - - # configuration variables that may contain compiler calls --_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'CC', 'CXX') -+_COMPILER_CONFIG_VARS = ('BLDSHARED', 'LDSHARED', 'LDCXXSHARED', 'CC', 'CXX') - - # prefix added to original configuration variable names - _INITPRE = '_OSX_SUPPORT_INITIAL_' --- Makefile.pre.in +++ Makefile.pre.in -@@ -472,7 +472,7 @@ +@@ -497,7 +497,7 @@ *\ -s*|s*) quiet="-q";; \ *) quiet="";; \ esac; \ diff --git a/patches/23_all_arm_OABI.patch b/patches/23_all_arm_OABI.patch index 70474d7..0edb541 100644 --- a/patches/23_all_arm_OABI.patch +++ b/patches/23_all_arm_OABI.patch @@ -3,7 +3,7 @@ https://bugs.python.org/issue1762561 --- Objects/floatobject.c +++ Objects/floatobject.c -@@ -1850,9 +1850,18 @@ +@@ -1859,9 +1859,18 @@ /* this is for the benefit of the pack/unpack routines below */ typedef enum { @@ -23,7 +23,7 @@ https://bugs.python.org/issue1762561 static float_format_type double_format, float_format; static float_format_type detected_double_format, detected_float_format; -@@ -1889,6 +1898,8 @@ +@@ -1898,6 +1907,8 @@ return PyString_FromString("IEEE, little-endian"); case ieee_big_endian_format: return PyString_FromString("IEEE, big-endian"); @@ -32,7 +32,7 @@ https://bugs.python.org/issue1762561 default: Py_FatalError("insane float_format or double_format"); return NULL; -@@ -1902,8 +1913,9 @@ +@@ -1911,8 +1922,9 @@ "used in Python's test suite.\n" "\n" "typestr must be 'double' or 'float'. This function returns whichever of\n" @@ -44,7 +44,7 @@ https://bugs.python.org/issue1762561 static PyObject * float_setformat(PyTypeObject *v, PyObject* args) -@@ -1941,11 +1953,15 @@ +@@ -1950,11 +1962,15 @@ else if (strcmp(format, "IEEE, big-endian") == 0) { f = ieee_big_endian_format; } @@ -62,7 +62,7 @@ https://bugs.python.org/issue1762561 return NULL; } -@@ -1968,8 +1984,10 @@ +@@ -1977,8 +1993,10 @@ "used in Python's test suite.\n" "\n" "typestr must be 'double' or 'float'. fmt must be one of 'unknown',\n" @@ -75,7 +75,7 @@ https://bugs.python.org/issue1762561 "\n" "Override the automatic determination of C-level floating point type.\n" "This affects how floats are converted to and from binary strings."); -@@ -2164,7 +2182,11 @@ +@@ -2173,7 +2191,11 @@ Note that if we're on some whacked-out platform which uses IEEE formats but isn't strictly little-endian or big- endian, we will fall back to the portable shifts & masks @@ -88,7 +88,7 @@ https://bugs.python.org/issue1762561 #if SIZEOF_DOUBLE == 8 { -@@ -2173,6 +2195,8 @@ +@@ -2182,6 +2204,8 @@ detected_double_format = ieee_big_endian_format; else if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0) detected_double_format = ieee_little_endian_format; @@ -97,7 +97,7 @@ https://bugs.python.org/issue1762561 else detected_double_format = unknown_format; } -@@ -2518,17 +2542,31 @@ +@@ -2527,17 +2551,31 @@ } else { const char *s = (char*)&x; @@ -137,7 +137,7 @@ https://bugs.python.org/issue1762561 } return 0; } -@@ -2687,22 +2725,33 @@ +@@ -2696,22 +2734,33 @@ } else { double x; diff --git a/patches/24_all_tests_environment.patch b/patches/24_all_tests_environment.patch index 8de7cc4..d1a8fbc 100644 --- a/patches/24_all_tests_environment.patch +++ b/patches/24_all_tests_environment.patch @@ -19,7 +19,7 @@ https://bugs.python.org/issue1674555 setquit() --- Lib/test/regrtest.py +++ Lib/test/regrtest.py -@@ -168,6 +168,7 @@ +@@ -169,6 +169,7 @@ import imp import platform import sysconfig @@ -27,25 +27,28 @@ https://bugs.python.org/issue1674555 # Some times __path__ and __file__ are not absolute (e.g. while running from -@@ -451,6 +452,49 @@ +@@ -464,9 +465,62 @@ test_support.use_resources = use_resources save_modules = sys.modules.keys() + opt_args = test_support.args_from_interpreter_flags() + base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest'] ++ # required to spawn a new process with PGO flag on/off ++ if pgo: ++ base_cmd = base_cmd + ['--pgo'] + debug_output_pat = re.compile(r"\[\d+ refs\]$") + -+ def get_args_tuple(test, verbose, quiet, huntrleaks, use_resources): ++ def get_args_tuple(test, verbose, quiet, huntrleaks, use_resources, pgo): + return ( + (test, verbose, quiet), -+ dict(huntrleaks=huntrleaks, use_resources=use_resources) ++ dict(huntrleaks=huntrleaks, use_resources=use_resources, pgo=pgo) + ) + + def _runtest(test, verbose, quiet, huntrleaks=False, -+ use_resources=None): ++ use_resources=None, pgo=False): + if test == "test_site": + args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks, -+ use_resources) ++ use_resources, pgo) + env = os.environ.copy() + try: + del env["_PYTHONNOSITEPACKAGES"] @@ -55,29 +58,40 @@ https://bugs.python.org/issue1674555 + stdout=PIPE, stderr=PIPE, + universal_newlines=True, + close_fds=(os.name != 'nt'), ++ cwd=test_support.SAVEDCWD, + env=env) + stdout, stderr = popen.communicate() + # Strip last refcount output line if it exists, since it + # comes from the shutdown of the interpreter in the subcommand. + stderr = debug_output_pat.sub("", stderr) + stdout, _, result = stdout.strip().rpartition("\n") ++ if not result: ++ return (None, None) + result = json.loads(result) ++ stdout = stdout.rstrip() ++ stderr = stderr.rstrip() + if stdout: + print stdout -+ if stderr: ++ if stderr and not pgo: + print >>sys.stderr, stderr ++ sys.stdout.flush() ++ sys.stderr.flush() + if result[0] == INTERRUPTED: -+ assert result[1] == 'KeyboardInterrupt' + raise KeyboardInterrupt + return result + else: -+ return runtest(test, verbose, quiet, huntrleaks=False, -+ use_resources=None) ++ return runtest(test, verbose, quiet, huntrleaks=huntrleaks, ++ use_resources=use_resources, pgo=pgo) + def accumulate_result(test, result): ok, test_time = result - test_times.append((test_time, test)) -@@ -489,19 +533,13 @@ +- test_times.append((test_time, test)) ++ if ok not in (None, INTERRUPTED): ++ test_times.append((test_time, test)) + if ok == PASSED: + good.append(test) + elif ok == FAILED: +@@ -501,23 +555,13 @@ print "Multiprocess option requires thread support" sys.exit(2) from Queue import Queue @@ -88,18 +102,22 @@ https://bugs.python.org/issue1674555 for test in tests: - args_tuple = ( - (test, verbose, quiet), -- dict(huntrleaks=huntrleaks, use_resources=use_resources) +- dict(huntrleaks=huntrleaks, use_resources=use_resources, +- pgo=pgo) - ) + args_tuple = get_args_tuple(test, verbose, quiet, huntrleaks, -+ use_resources) ++ use_resources, pgo) yield (test, args_tuple) pending = tests_and_args() - opt_args = test_support.args_from_interpreter_flags() - base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest'] +- # required to spawn a new process with PGO flag on/off +- if pgo: +- base_cmd = base_cmd + ['--pgo'] def work(): # A worker thread. try: -@@ -571,15 +609,15 @@ +@@ -587,16 +631,16 @@ if trace: # If we're tracing code coverage, then we don't exit with status # if on a false return value from main. @@ -108,26 +126,27 @@ https://bugs.python.org/issue1674555 globals=globals(), locals=vars()) else: try: -- result = runtest(test, verbose, quiet, huntrleaks) -+ result = _runtest(test, verbose, quiet, huntrleaks) +- result = runtest(test, verbose, quiet, huntrleaks, None, pgo) ++ result = _runtest(test, verbose, quiet, huntrleaks, None, pgo) accumulate_result(test, result) if verbose3 and result[0] == FAILED: - print "Re-running test %r in verbose mode" % test -- runtest(test, True, quiet, huntrleaks) -+ _runtest(test, True, quiet, huntrleaks) + if not pgo: + print "Re-running test %r in verbose mode" % test +- runtest(test, True, quiet, huntrleaks, None, pgo) ++ _runtest(test, True, quiet, huntrleaks, None, pgo) except KeyboardInterrupt: interrupted = True break -@@ -649,7 +687,7 @@ +@@ -664,7 +708,7 @@ sys.stdout.flush() try: test_support.verbose = True -- ok = runtest(test, True, quiet, huntrleaks) -+ ok = _runtest(test, True, quiet, huntrleaks) +- ok = runtest(test, True, quiet, huntrleaks, None, pgo) ++ ok = _runtest(test, True, quiet, huntrleaks, None, pgo) except KeyboardInterrupt: # print a newline separate from the ^C print -@@ -869,8 +907,9 @@ +@@ -893,8 +937,9 @@ for name, get, restore in self.resource_info(): current = get() original = saved_values.pop(name) @@ -138,7 +157,7 @@ https://bugs.python.org/issue1674555 + if current != original and self.testname != "test_site": self.changed = True restore(original) - if not self.quiet: + if not self.quiet and not self.pgo: --- Lib/test/test_site.py +++ Lib/test/test_site.py @@ -8,6 +8,7 @@ @@ -161,7 +180,7 @@ https://bugs.python.org/issue1674555 --- Makefile.pre.in +++ Makefile.pre.in -@@ -807,7 +807,7 @@ +@@ -837,7 +837,7 @@ TESTOPTS= -l $(EXTRATESTOPTS) TESTPROG= $(srcdir)/Lib/test/regrtest.py -- cgit v1.2.3-65-gdbad