summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2017-10-04 11:16:02 -0400
committerMike Gilbert <floppym@gentoo.org>2017-10-04 11:16:02 -0400
commit4449e9d212523862ef0188fd20c2332086e57da5 (patch)
tree833e8b72e6202cae77566bd4b36c753c7bdca416
parentUpdates for 3.6 from Arfrever (diff)
downloadpython-gentoo-patches-3.6.tar.gz
python-gentoo-patches-3.6.tar.bz2
python-gentoo-patches-3.6.zip
Arfrever updates for 3.6.23.6.2-03.6
-rw-r--r--patches/01_all_static_library_location.patch4
-rw-r--r--patches/02_all_disable_modules_and_ssl.patch6
-rw-r--r--patches/03_all_libdir.patch18
-rw-r--r--patches/04_all_non-zero_exit_status_on_failure.patch2
-rw-r--r--patches/21_all_distutils_c++.patch8
-rw-r--r--patches/22_all_tests_environment.patch77
6 files changed, 64 insertions, 51 deletions
diff --git a/patches/01_all_static_library_location.patch b/patches/01_all_static_library_location.patch
index ad799a3..cd4cbb1 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
-@@ -1065,6 +1065,19 @@
+@@ -1068,6 +1068,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 \
-@@ -1388,18 +1401,6 @@
+@@ -1391,18 +1404,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 8c419f7..3f93ea7 100644
--- a/patches/02_all_disable_modules_and_ssl.patch
+++ b/patches/02_all_disable_modules_and_ssl.patch
@@ -27,7 +27,7 @@
# Ensure that /usr/local is always used, but the local build
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
-@@ -817,7 +828,7 @@
+@@ -818,7 +829,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:
-@@ -828,7 +839,8 @@
+@@ -829,7 +840,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,
-@@ -861,7 +873,7 @@
+@@ -862,7 +874,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 ecd1404..1a99cc4 100644
--- a/patches/03_all_libdir.patch
+++ b/patches/03_all_libdir.patch
@@ -13,7 +13,7 @@
'data' : '$base',
--- Lib/distutils/sysconfig.py
+++ Lib/distutils/sysconfig.py
-@@ -133,7 +133,7 @@
+@@ -130,7 +130,7 @@
if os.name == "posix":
libpython = os.path.join(prefix,
@@ -67,7 +67,7 @@
'data': '{userbase}',
--- Lib/test/test_site.py
+++ Lib/test/test_site.py
-@@ -248,7 +248,7 @@
+@@ -261,7 +261,7 @@
elif os.sep == '/':
# OS X non-framwework builds, Linux, FreeBSD, etc
self.assertEqual(len(dirs), 1)
@@ -78,7 +78,7 @@
self.assertEqual(dirs[0], wanted)
--- Makefile.pre.in
+++ Makefile.pre.in
-@@ -131,7 +131,7 @@
+@@ -133,7 +133,7 @@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -129,7 +129,7 @@
--- configure.ac
+++ configure.ac
-@@ -4601,9 +4601,9 @@
+@@ -4657,9 +4657,9 @@
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
if test x$PLATFORM_TRIPLET = x; then
@@ -152,7 +152,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:
-@@ -559,8 +559,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 + [
@@ -162,7 +162,7 @@
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
else:
-@@ -793,11 +792,11 @@
+@@ -794,11 +793,11 @@
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
@@ -176,7 +176,7 @@
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
-@@ -1077,8 +1076,7 @@
+@@ -1081,8 +1080,7 @@
# check lib directories parallel to the location of the header
db_dirs_to_check = [
@@ -186,7 +186,7 @@
]
if host_platform != 'darwin':
-@@ -1189,10 +1187,8 @@
+@@ -1193,10 +1191,8 @@
if sqlite_incdir:
sqlite_dirs_to_check = [
@@ -199,7 +199,7 @@
]
sqlite_libfile = self.compiler.find_library_file(
sqlite_dirs_to_check + lib_dirs, 'sqlite3')
-@@ -1840,15 +1836,14 @@
+@@ -1845,15 +1841,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 f4e5875..ef8a43e 100644
--- a/patches/04_all_non-zero_exit_status_on_failure.patch
+++ b/patches/04_all_non-zero_exit_status_on_failure.patch
@@ -31,7 +31,7 @@ https://bugs.python.org/issue6731
failed = self.failed_on_import[:]
print()
print("Following modules built successfully"
-@@ -2308,6 +2314,7 @@
+@@ -2313,6 +2319,7 @@
scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
"Tools/scripts/2to3", "Tools/scripts/pyvenv"]
)
diff --git a/patches/21_all_distutils_c++.patch b/patches/21_all_distutils_c++.patch
index cf1b173..5c6470a 100644
--- a/patches/21_all_distutils_c++.patch
+++ b/patches/21_all_distutils_c++.patch
@@ -81,7 +81,7 @@ https://bugs.python.org/issue1222585
# dlls need another dll (mingwm10.dll see Mingw32 docs)
--- Lib/distutils/sysconfig.py
+++ Lib/distutils/sysconfig.py
-@@ -173,9 +173,12 @@
+@@ -170,9 +170,12 @@
_osx_support.customize_compiler(_config_vars)
_config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
@@ -97,7 +97,7 @@ https://bugs.python.org/issue1222585
if 'CC' in os.environ:
newcc = os.environ['CC']
-@@ -190,19 +193,27 @@
+@@ -187,19 +190,27 @@
cxx = os.environ['CXX']
if 'LDSHARED' in os.environ:
ldshared = os.environ['LDSHARED']
@@ -126,7 +126,7 @@ https://bugs.python.org/issue1222585
if 'AR' in os.environ:
ar = os.environ['AR']
if 'ARFLAGS' in os.environ:
-@@ -211,13 +222,17 @@
+@@ -208,13 +219,17 @@
archiver = ar + ' ' + ar_flags
cc_cmd = cc + ' ' + cflags
@@ -229,7 +229,7 @@ https://bugs.python.org/issue1222585
linker = _osx_support.compiler_fixup(linker, ld_args)
--- Makefile.pre.in
+++ Makefile.pre.in
-@@ -604,7 +604,7 @@
+@@ -573,7 +573,7 @@
*\ -s*|s*) quiet="-q";; \
*) quiet="";; \
esac; \
diff --git a/patches/22_all_tests_environment.patch b/patches/22_all_tests_environment.patch
index 4c01b1b..8de7346 100644
--- a/patches/22_all_tests_environment.patch
+++ b/patches/22_all_tests_environment.patch
@@ -19,7 +19,7 @@ https://bugs.python.org/issue1674555
sethelper()
--- Lib/test/libregrtest/main.py
+++ Lib/test/libregrtest/main.py
-@@ -103,7 +103,7 @@
+@@ -110,7 +110,7 @@
def accumulate_result(self, test, result):
ok, test_time = result
@@ -28,6 +28,15 @@ https://bugs.python.org/issue1674555
self.test_times.append((test_time, test))
if ok == PASSED:
self.good.append(test)
+@@ -123,7 +123,7 @@
+ elif ok == RESOURCE_DENIED:
+ self.skipped.append(test)
+ self.resource_denieds.append(test)
+- elif ok != INTERRUPTED:
++ elif ok not in (None, INTERRUPTED):
+ raise ValueError("invalid test result: %r" % ok)
+
+ def display_progress(self, test_index, test):
--- Lib/test/libregrtest/runtest.py
+++ Lib/test/libregrtest/runtest.py
@@ -1,6 +1,7 @@
@@ -38,8 +47,8 @@ https://bugs.python.org/issue1674555
import os
import sys
import time
-@@ -71,7 +72,7 @@
- return stdtests + sorted(tests)
+@@ -79,7 +80,7 @@
+ return 'test.' + test
-def runtest(ns, test):
@@ -47,16 +56,16 @@ https://bugs.python.org/issue1674555
"""Run a single test.
ns -- regrtest namespace of options
-@@ -90,6 +91,25 @@
+@@ -98,6 +99,25 @@
output_on_failure = ns.verbose3
+ if not slave and test == "test_site":
+ retcode, stdout, stderr = run_test_in_subprocess(test, ns)
-+ stdout, _, result = stdout.strip().rpartition("\n")
+ if retcode != 0:
+ result = (CHILD_ERROR, None)
+ else:
++ stdout, _, result = stdout.strip().rpartition("\n")
+ if not result:
+ return (None, None)
+ result = json.loads(result)
@@ -73,7 +82,7 @@ https://bugs.python.org/issue1674555
use_timeout = (ns.timeout is not None)
if use_timeout:
faulthandler.dump_traceback_later(ns.timeout, exit=True)
-@@ -135,6 +155,41 @@
+@@ -143,6 +163,41 @@
runtest.stringio = None
@@ -92,7 +101,7 @@ https://bugs.python.org/issue1674555
+ slaveargs = json.dumps(slaveargs)
+
+ cmd = [sys.executable, *support.args_from_interpreter_flags(),
-+ '-X', 'faulthandler',
++ '-u', # Unbuffered stdout and stderr
+ '-m', 'test.regrtest',
+ '--slaveargs', slaveargs]
+ if ns.pgo:
@@ -158,7 +167,7 @@ https://bugs.python.org/issue1674555
- slaveargs = json.dumps(slaveargs)
-
- cmd = [sys.executable, *support.args_from_interpreter_flags(),
-- '-X', 'faulthandler',
+- '-u', # Unbuffered stdout and stderr
- '-m', 'test.regrtest',
- '--slaveargs', slaveargs]
- if ns.pgo:
@@ -190,20 +199,6 @@ https://bugs.python.org/issue1674555
except KeyboardInterrupt:
result = INTERRUPTED, ''
except BaseException as e:
---- Lib/test/libregrtest/save_env.py
-+++ Lib/test/libregrtest/save_env.py
-@@ -272,8 +272,9 @@
- for name, get, restore in self.resource_info():
- current = get()
- original = saved_values.pop(name)
-- # Check for changes to the resource's value
-- if current != original:
-+ # Check for changes to the resource's value. test_site is always run
-+ # in a subprocess and is allowed to change os.environ and sys.path.
-+ if current != original and self.testname != "test_site":
- self.changed = True
- restore(original)
- if not self.quiet and not self.pgo:
--- Lib/test/test_site.py
+++ Lib/test/test_site.py
@@ -8,6 +8,7 @@
@@ -214,18 +209,36 @@ https://bugs.python.org/issue1674555
import os
import sys
import re
-@@ -27,6 +28,10 @@
+@@ -29,12 +30,19 @@
+
+
+ OLD_SYS_PATH = None
++OLD__PYTHONNOSITEPACKAGES = None
+
- import site
+ def setUpModule():
+ global OLD_SYS_PATH
+ OLD_SYS_PATH = sys.path[:]
-+if "_PYTHONNOSITEPACKAGES" in os.environ:
-+ del os.environ["_PYTHONNOSITEPACKAGES"]
-+ importlib.reload(site)
++ if "_PYTHONNOSITEPACKAGES" in os.environ:
++ global OLD__PYTHONNOSITEPACKAGES
++ OLD__PYTHONNOSITEPACKAGES = os.environ.get("_PYTHONNOSITEPACKAGES")
++ del os.environ["_PYTHONNOSITEPACKAGES"]
++ importlib.reload(site)
+
- if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
- # need to add user site directory for tests
- try:
-@@ -443,8 +448,11 @@
+ if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
+ # need to add user site directory for tests
+ try:
+@@ -48,6 +56,8 @@
+
+ def tearDownModule():
+ sys.path[:] = OLD_SYS_PATH
++ if OLD__PYTHONNOSITEPACKAGES is not None:
++ os.environ["_PYTHONNOSITEPACKAGES"] = OLD__PYTHONNOSITEPACKAGES
+
+
+ class HelperFunctionsTests(unittest.TestCase):
+@@ -456,8 +466,11 @@
def test_startup_imports(self):
# This tests checks which modules are loaded by Python when it
# initially starts upon startup.
@@ -239,7 +252,7 @@ https://bugs.python.org/issue1674555
encoding='utf-8')
--- Makefile.pre.in
+++ Makefile.pre.in
-@@ -994,7 +994,7 @@
+@@ -997,7 +997,7 @@
######################################################################
TESTOPTS= $(EXTRATESTOPTS)