diff options
author | 2016-07-21 19:11:30 -0400 | |
---|---|---|
committer | 2016-07-21 19:11:30 -0400 | |
commit | 4c6a6bc41c2e4c1be90fc0f48224f9b75ac35fe2 (patch) | |
tree | 5d309f408213e8f585664f4e0aed815ec25520b8 | |
parent | Updates for 3.5.1 from Arfrever (diff) | |
download | python-gentoo-patches-3.5.2.tar.gz python-gentoo-patches-3.5.2.tar.bz2 python-gentoo-patches-3.5.2.zip |
-rw-r--r-- | patches/01_all_static_library_location.patch | 4 | ||||
-rw-r--r-- | patches/02_all_disable_modules_and_ssl.patch | 10 | ||||
-rw-r--r-- | patches/03_all_libdir.patch | 33 | ||||
-rw-r--r-- | patches/04_all_non-zero_exit_status_on_failure.patch | 6 | ||||
-rw-r--r-- | patches/05_all_regenerate_platform-specific_modules.patch | 10 | ||||
-rw-r--r-- | patches/21_all_distutils_c++.patch | 6 | ||||
-rw-r--r-- | patches/22_all_tests_environment.patch | 8 | ||||
-rw-r--r-- | patches/24_all_expat-2.2.patch | 19 |
8 files changed, 52 insertions, 44 deletions
diff --git a/patches/01_all_static_library_location.patch b/patches/01_all_static_library_location.patch index ea5d29a..3180c73 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 -@@ -1039,6 +1039,19 @@ +@@ -1061,6 +1061,19 @@ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ $$ensurepip --root=$(DESTDIR)/ ; \ fi @@ -24,7 +24,7 @@ https://bugs.python.org/issue6103 commoninstall: @FRAMEWORKALTINSTALLFIRST@ \ altbininstall libinstall inclinstall libainstall \ -@@ -1372,18 +1385,6 @@ +@@ -1398,18 +1411,6 @@ else true; \ fi; \ done diff --git a/patches/02_all_disable_modules_and_ssl.patch b/patches/02_all_disable_modules_and_ssl.patch index 747a5c1..6ad321a 100644 --- a/patches/02_all_disable_modules_and_ssl.patch +++ b/patches/02_all_disable_modules_and_ssl.patch @@ -19,15 +19,15 @@ def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (after any relative -@@ -465,6 +475,7 @@ - os.unlink(tmpfile) +@@ -488,6 +498,7 @@ + return ['m'] def detect_modules(self): + global disable_ssl # Ensure that /usr/local is always used, but the local build # directories (i.e. '.' and 'Include') must be first. See issue # 10520. -@@ -785,7 +796,7 @@ +@@ -815,7 +826,7 @@ ssl_incs = find_file('openssl/ssl.h', inc_dirs, search_for_ssl_incs_in ) @@ -36,7 +36,7 @@ krb5_h = find_file('krb5.h', inc_dirs, ['/usr/kerberos/include']) if krb5_h: -@@ -796,7 +807,8 @@ +@@ -826,7 +837,8 @@ ] ) if (ssl_incs is not None and @@ -46,7 +46,7 @@ exts.append( Extension('_ssl', ['_ssl.c'], include_dirs = ssl_incs, library_dirs = ssl_libs, -@@ -829,7 +841,7 @@ +@@ -859,7 +871,7 @@ #print('openssl_ver = 0x%08x' % openssl_ver) min_openssl_ver = 0x00907000 diff --git a/patches/03_all_libdir.patch b/patches/03_all_libdir.patch index cd51920..39a70c9 100644 --- a/patches/03_all_libdir.patch +++ b/patches/03_all_libdir.patch @@ -67,7 +67,7 @@ 'data': '{userbase}', --- Lib/test/test_site.py +++ Lib/test/test_site.py -@@ -244,7 +244,7 @@ +@@ -249,7 +249,7 @@ elif os.sep == '/': # OS X non-framwework builds, Linux, FreeBSD, etc self.assertEqual(len(dirs), 1) @@ -100,18 +100,7 @@ # --- Modules/getpath.c +++ Modules/getpath.c -@@ -118,8 +118,8 @@ - #endif - - #ifndef PYTHONPATH --#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ -- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" -+#define PYTHONPATH PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION ":" \ -+ EXEC_PREFIX "/@@GENTOO_LIBDIR@@/python" VERSION "/lib-dynload" - #endif - - #ifndef LANDMARK -@@ -511,7 +511,7 @@ +@@ -494,7 +494,7 @@ _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL); _prefix = Py_DecodeLocale(PREFIX, NULL); _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL); @@ -120,7 +109,7 @@ if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { Py_FatalError( -@@ -700,7 +700,7 @@ +@@ -683,7 +683,7 @@ } else wcsncpy(zip_path, _prefix, MAXPATHLEN); @@ -129,7 +118,7 @@ bufsz = wcslen(zip_path); /* Replace "00" with version */ zip_path[bufsz - 6] = VERSION[0]; zip_path[bufsz - 5] = VERSION[2]; -@@ -712,7 +712,7 @@ +@@ -695,7 +695,7 @@ fprintf(stderr, "Could not find platform dependent libraries <exec_prefix>\n"); wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN); @@ -140,7 +129,7 @@ --- configure.ac +++ configure.ac -@@ -4374,7 +4374,7 @@ +@@ -4456,7 +4456,7 @@ dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) @@ -151,7 +140,7 @@ # Check whether right shifting a negative integer extends the sign bit --- setup.py +++ setup.py -@@ -480,7 +480,7 @@ +@@ -503,7 +503,7 @@ # directories (i.e. '.' and 'Include') must be first. See issue # 10520. if not cross_compiling: @@ -160,7 +149,7 @@ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') # only change this for cross builds for 3.3, issues on Mageia if cross_compiling: -@@ -537,8 +537,7 @@ +@@ -560,8 +560,7 @@ # be assumed that no additional -I,-L directives are needed. if not cross_compiling: lib_dirs = self.compiler.library_dirs + [ @@ -170,7 +159,7 @@ ] inc_dirs = self.compiler.include_dirs + ['/usr/include'] else: -@@ -761,11 +760,11 @@ +@@ -791,11 +790,11 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(lib_dirs + @@ -184,7 +173,7 @@ extra_link_args=readline_extra_link_args, libraries=readline_libs) ) else: -@@ -1022,8 +1021,7 @@ +@@ -1052,8 +1051,7 @@ # check lib directories parallel to the location of the header db_dirs_to_check = [ @@ -194,7 +183,7 @@ ] if host_platform != 'darwin': -@@ -1134,10 +1132,8 @@ +@@ -1164,10 +1162,8 @@ if sqlite_incdir: sqlite_dirs_to_check = [ @@ -207,7 +196,7 @@ ] sqlite_libfile = self.compiler.find_library_file( sqlite_dirs_to_check + lib_dirs, 'sqlite3') -@@ -1785,15 +1781,14 @@ +@@ -1815,15 +1811,14 @@ added_lib_dirs.append('/usr/openwin/lib') elif os.path.exists('/usr/X11R6/include'): include_dirs.append('/usr/X11R6/include') diff --git a/patches/04_all_non-zero_exit_status_on_failure.patch b/patches/04_all_non-zero_exit_status_on_failure.patch index fd8ae40..11667b9 100644 --- a/patches/04_all_non-zero_exit_status_on_failure.patch +++ b/patches/04_all_non-zero_exit_status_on_failure.patch @@ -12,7 +12,7 @@ https://bugs.python.org/issue6731 def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (after any relative directories) if: -@@ -297,7 +299,10 @@ +@@ -313,7 +315,10 @@ " detect_modules() for the module's name.") print() @@ -23,7 +23,7 @@ https://bugs.python.org/issue6731 failed = self.failed[:] print() print("Failed to build these modules:") -@@ -305,6 +310,7 @@ +@@ -321,6 +326,7 @@ print() if self.failed_on_import: @@ -31,7 +31,7 @@ https://bugs.python.org/issue6731 failed = self.failed_on_import[:] print() print("Following modules built successfully" -@@ -2253,6 +2259,7 @@ +@@ -2286,6 +2292,7 @@ scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3", "Tools/scripts/2to3", "Tools/scripts/pyvenv"] ) diff --git a/patches/05_all_regenerate_platform-specific_modules.patch b/patches/05_all_regenerate_platform-specific_modules.patch index a351e1e..39329ad 100644 --- a/patches/05_all_regenerate_platform-specific_modules.patch +++ b/patches/05_all_regenerate_platform-specific_modules.patch @@ -37,7 +37,7 @@ https://bugs.python.org/issue12619 +python$EXE ../../Tools/scripts/h2py.py /usr/include/sys/stropts.h --- Makefile.pre.in +++ Makefile.pre.in -@@ -479,7 +479,7 @@ +@@ -482,7 +482,7 @@ # Default target all: build_all @@ -46,7 +46,7 @@ https://bugs.python.org/issue12619 # Compile a binary with profile guided optimization. profile-opt: -@@ -599,6 +599,32 @@ +@@ -606,6 +606,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) -@@ -1228,7 +1254,7 @@ +@@ -1254,7 +1280,7 @@ unittest unittest/test unittest/test/testmock \ venv venv/scripts venv/scripts/posix \ 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 \ -@@ -1320,23 +1346,6 @@ +@@ -1346,23 +1372,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 Misc/python-config.sh # Substitution happens here, as the completely-expanded BINDIR # is not available in configure -@@ -1664,7 +1673,7 @@ +@@ -1691,7 +1700,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 8a3fa63..877af24 100644 --- a/patches/21_all_distutils_c++.patch +++ b/patches/21_all_distutils_c++.patch @@ -173,7 +173,7 @@ https://bugs.python.org/issue1222585 } if sys.platform[:6] == "darwin": -@@ -108,12 +111,19 @@ +@@ -110,12 +113,19 @@ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): compiler_so = self.compiler_so @@ -195,7 +195,7 @@ https://bugs.python.org/issue1222585 except DistutilsExecError as msg: raise CompileError(msg) -@@ -171,22 +181,16 @@ +@@ -173,22 +183,16 @@ ld_args.extend(extra_postargs) self.mkpath(os.path.dirname(output_filename)) try: @@ -229,7 +229,7 @@ https://bugs.python.org/issue1222585 linker = _osx_support.compiler_fixup(linker, ld_args) --- Makefile.pre.in +++ Makefile.pre.in -@@ -595,7 +595,7 @@ +@@ -602,7 +602,7 @@ *\ -s*|s*) quiet="-q";; \ *) quiet="";; \ esac; \ diff --git a/patches/22_all_tests_environment.patch b/patches/22_all_tests_environment.patch index 5f8d80d..656f00b 100644 --- a/patches/22_all_tests_environment.patch +++ b/patches/22_all_tests_environment.patch @@ -132,7 +132,7 @@ https://bugs.python.org/issue1674555 except KeyboardInterrupt: # print a newline separate from the ^C print() -@@ -1260,8 +1313,9 @@ +@@ -1261,8 +1314,9 @@ for name, get, restore in self.resource_info(): current = get() original = saved_values.pop(name) @@ -164,8 +164,8 @@ https://bugs.python.org/issue1674555 + if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE): # need to add user site directory for tests - os.makedirs(site.USER_SITE) -@@ -438,8 +443,11 @@ + try: +@@ -443,8 +448,11 @@ def test_startup_imports(self): # This tests checks which modules are loaded by Python when it # initially starts upon startup. @@ -179,7 +179,7 @@ https://bugs.python.org/issue1674555 stdout, stderr = popen.communicate() --- Makefile.pre.in +++ Makefile.pre.in -@@ -994,7 +994,7 @@ +@@ -1016,7 +1016,7 @@ ###################################################################### TESTOPTS= $(EXTRATESTOPTS) diff --git a/patches/24_all_expat-2.2.patch b/patches/24_all_expat-2.2.patch new file mode 100644 index 0000000..bd69580 --- /dev/null +++ b/patches/24_all_expat-2.2.patch @@ -0,0 +1,19 @@ +https://bugs.python.org/issue27369 +https://hg.python.org/cpython/rev/0fbf3b88eed8 + +--- Lib/test/test_pyexpat.py ++++ Lib/test/test_pyexpat.py +@@ -656,11 +656,9 @@ + # \xc2\x85 is UTF-8 encoded U+0085 (NEXT LINE) + xml = b"<?xml version\xc2\x85='1.0'?>\r\n" + parser = expat.ParserCreate() +- try: ++ err_pattern = r'XML declaration not well-formed: line 1, column \d+' ++ with self.assertRaisesRegex(expat.ExpatError, err_pattern): + parser.Parse(xml, True) +- self.fail() +- except expat.ExpatError as e: +- self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14') + + class ErrorMessageTest(unittest.TestCase): + def test_codes(self): |