summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2015-09-19 13:06:12 -0400
committerMike Gilbert <floppym@gentoo.org>2015-09-19 13:06:12 -0400
commit961a7d241ce88fa6d7ca0dc58e672bfb00a1d49b (patch)
tree459a6ffd90a4e7c66bd62c90672b40df28f7a73d
parentUpdates from Arfrever for 3.4.3 (diff)
downloadpython-gentoo-patches-3.5.0.tar.gz
python-gentoo-patches-3.5.0.tar.bz2
python-gentoo-patches-3.5.0.zip
Updates for 3.5.0 from Arfrever3.5.0-03.5.0
-rw-r--r--patches/01_all_static_library_location.patch6
-rw-r--r--patches/02_all_disable_modules_and_ssl.patch10
-rw-r--r--patches/03_all_libdir.patch55
-rw-r--r--patches/04_all_non-zero_exit_status_on_failure.patch14
-rw-r--r--patches/05_all_regenerate_platform-specific_modules.patch14
-rw-r--r--patches/21_all_distutils_c++.patch8
-rw-r--r--patches/22_all_tests_environment.patch10
-rw-r--r--patches/23_all_h2py_encoding.patch4
8 files changed, 66 insertions, 55 deletions
diff --git a/patches/01_all_static_library_location.patch b/patches/01_all_static_library_location.patch
index 67d1873..580c03f 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
-@@ -1005,6 +1005,19 @@
+@@ -1024,6 +1024,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 \
-@@ -1325,18 +1338,6 @@
+@@ -1357,18 +1370,6 @@
else true; \
fi; \
done
@@ -41,7 +41,7 @@ https://bugs.python.org/issue6103
- fi; \
- fi
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
- $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
+ $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
--- Misc/python-config.in
+++ Misc/python-config.in
diff --git a/patches/02_all_disable_modules_and_ssl.patch b/patches/02_all_disable_modules_and_ssl.patch
index f5f050b..747a5c1 100644
--- a/patches/02_all_disable_modules_and_ssl.patch
+++ b/patches/02_all_disable_modules_and_ssl.patch
@@ -1,6 +1,6 @@
--- setup.py
+++ setup.py
-@@ -39,7 +39,17 @@
+@@ -44,7 +44,17 @@
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
@@ -19,7 +19,7 @@
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (after any relative
-@@ -447,6 +457,7 @@
+@@ -465,6 +475,7 @@
os.unlink(tmpfile)
def detect_modules(self):
@@ -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.
-@@ -765,7 +776,7 @@
+@@ -785,7 +796,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:
-@@ -776,7 +787,8 @@
+@@ -796,7 +807,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,
-@@ -809,7 +821,7 @@
+@@ -829,7 +841,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 e85d646..3ab5501 100644
--- a/patches/03_all_libdir.patch
+++ b/patches/03_all_libdir.patch
@@ -1,3 +1,14 @@
+--- configure.ac
++++ configure.ac
+@@ -4331,7 +4331,7 @@
+
+ dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
+ AC_SUBST(PY_ENABLE_SHARED)
+-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
++LIBPL='$(prefix)'"/@@GENTOO_LIBDIR@@/python${VERSION}/config-${LDVERSION}"
+ AC_SUBST(LIBPL)
+
+ # Check whether right shifting a negative integer extends the sign bit
--- Lib/distutils/command/install.py
+++ Lib/distutils/command/install.py
@@ -29,8 +29,8 @@
@@ -13,7 +24,7 @@
'data' : '$base',
--- Lib/distutils/sysconfig.py
+++ Lib/distutils/sysconfig.py
-@@ -142,7 +142,7 @@
+@@ -133,7 +133,7 @@
if os.name == "posix":
libpython = os.path.join(prefix,
@@ -24,7 +35,7 @@
else:
--- Lib/site.py
+++ Lib/site.py
-@@ -304,10 +304,10 @@
+@@ -303,7 +303,7 @@
seen.add(prefix)
if os.sep == '/':
@@ -32,11 +43,7 @@
+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@",
"python" + sys.version[:3],
"site-packages"))
-- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+ sitepackages.append(os.path.join(prefix, "@@GENTOO_LIBDIR@@", "site-python"))
else:
- sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
--- Lib/sysconfig.py
+++ Lib/sysconfig.py
@@ -20,10 +20,10 @@
@@ -71,19 +78,15 @@
'data': '{userbase}',
--- Lib/test/test_site.py
+++ Lib/test/test_site.py
-@@ -244,10 +244,10 @@
+@@ -244,7 +244,7 @@
elif os.sep == '/':
# OS X non-framwework builds, Linux, FreeBSD, etc
- self.assertEqual(len(dirs), 2)
+ self.assertEqual(len(dirs), 1)
- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'python' + sys.version[:3],
'site-packages')
self.assertEqual(dirs[0], wanted)
-- wanted = os.path.join('xoxo', 'lib', 'site-python')
-+ wanted = os.path.join('xoxo', '@@GENTOO_LIBDIR@@', 'site-python')
- self.assertEqual(dirs[1], wanted)
else:
- # other platforms
--- Makefile.pre.in
+++ Makefile.pre.in
@@ -120,7 +120,7 @@
@@ -108,16 +111,16 @@
#endif
#ifndef LANDMARK
-@@ -494,7 +494,7 @@
- _pythonpath = _Py_char2wchar(PYTHONPATH, NULL);
- _prefix = _Py_char2wchar(PREFIX, NULL);
- _exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL);
-- lib_python = _Py_char2wchar("lib/python" VERSION, NULL);
-+ lib_python = _Py_char2wchar("@@GENTOO_LIBDIR@@/python" VERSION, NULL);
+@@ -511,7 +511,7 @@
+ _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL);
+ _prefix = Py_DecodeLocale(PREFIX, NULL);
+ _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL);
+- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL);
++ lib_python = Py_DecodeLocale("@@GENTOO_LIBDIR@@/python" VERSION, NULL);
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
Py_FatalError(
-@@ -683,7 +683,7 @@
+@@ -700,7 +700,7 @@
}
else
wcsncpy(zip_path, _prefix, MAXPATHLEN);
@@ -126,7 +129,7 @@
bufsz = wcslen(zip_path); /* Replace "00" with version */
zip_path[bufsz - 6] = VERSION[0];
zip_path[bufsz - 5] = VERSION[2];
-@@ -695,7 +695,7 @@
+@@ -712,7 +712,7 @@
fprintf(stderr,
"Could not find platform dependent libraries <exec_prefix>\n");
wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
@@ -148,7 +151,7 @@
#
--- setup.py
+++ setup.py
-@@ -462,7 +462,7 @@
+@@ -480,7 +480,7 @@
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
if not cross_compiling:
@@ -157,7 +160,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:
-@@ -519,8 +519,7 @@
+@@ -537,8 +537,7 @@
# be assumed that no additional -I,-L directives are needed.
if not cross_compiling:
lib_dirs = self.compiler.library_dirs + [
@@ -167,7 +170,7 @@
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
else:
-@@ -741,11 +740,11 @@
+@@ -761,11 +760,11 @@
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
@@ -181,7 +184,7 @@
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
-@@ -1002,8 +1001,7 @@
+@@ -1022,8 +1021,7 @@
# check lib directories parallel to the location of the header
db_dirs_to_check = [
@@ -191,7 +194,7 @@
]
if host_platform != 'darwin':
-@@ -1114,10 +1112,8 @@
+@@ -1134,10 +1132,8 @@
if sqlite_incdir:
sqlite_dirs_to_check = [
@@ -204,7 +207,7 @@
]
sqlite_libfile = self.compiler.find_library_file(
sqlite_dirs_to_check + lib_dirs, 'sqlite3')
-@@ -1765,15 +1761,14 @@
+@@ -1785,15 +1781,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 b51eb4f..fd8ae40 100644
--- a/patches/04_all_non-zero_exit_status_on_failure.patch
+++ b/patches/04_all_non-zero_exit_status_on_failure.patch
@@ -3,7 +3,7 @@ https://bugs.python.org/issue6731
--- setup.py
+++ setup.py
-@@ -51,6 +51,8 @@
+@@ -56,6 +56,8 @@
else:
disable_ssl = 0
@@ -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:
-@@ -285,7 +287,10 @@
+@@ -297,7 +299,10 @@
" detect_modules() for the module's name.")
print()
@@ -23,7 +23,15 @@ https://bugs.python.org/issue6731
failed = self.failed[:]
print()
print("Failed to build these modules:")
-@@ -2233,6 +2238,7 @@
+@@ -305,6 +310,7 @@
+ print()
+
+ if self.failed_on_import:
++ exit_status = 1
+ failed = self.failed_on_import[:]
+ print()
+ print("Following modules built successfully"
+@@ -2253,6 +2259,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 6e985f3..fc7b95d 100644
--- a/patches/05_all_regenerate_platform-specific_modules.patch
+++ b/patches/05_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
-@@ -465,7 +465,7 @@
+@@ -475,7 +475,7 @@
# Default target
all: build_all
--build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed python-config
-+build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods gdbhooks Modules/_testembed python-config
+-build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed python-config
++build_all: $(BUILDPYTHON) oldsharedmods sharedmods platformspecificmods gdbhooks Programs/_testembed python-config
# Compile a binary with gcc profile guided optimization.
profile-opt:
-@@ -573,6 +573,32 @@
+@@ -584,6 +584,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)
-@@ -1190,7 +1216,7 @@
+@@ -1213,7 +1239,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 \
-@@ -1273,23 +1299,6 @@
+@@ -1305,23 +1331,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
-@@ -1615,7 +1624,7 @@
+@@ -1647,7 +1656,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 cf81742..cda8987 100644
--- a/patches/21_all_distutils_c++.patch
+++ b/patches/21_all_distutils_c++.patch
@@ -60,7 +60,7 @@ https://bugs.python.org/issue1222585
# dlls need another dll (mingwm10.dll see Mingw32 docs)
--- Lib/distutils/sysconfig.py
+++ Lib/distutils/sysconfig.py
-@@ -182,9 +182,12 @@
+@@ -173,9 +173,12 @@
_osx_support.customize_compiler(_config_vars)
_config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
@@ -76,7 +76,7 @@ https://bugs.python.org/issue1222585
if 'CC' in os.environ:
newcc = os.environ['CC']
-@@ -199,19 +202,27 @@
+@@ -190,19 +193,27 @@
cxx = os.environ['CXX']
if 'LDSHARED' in os.environ:
ldshared = os.environ['LDSHARED']
@@ -105,7 +105,7 @@ https://bugs.python.org/issue1222585
if 'AR' in os.environ:
ar = os.environ['AR']
if 'ARFLAGS' in os.environ:
-@@ -220,13 +231,17 @@
+@@ -211,13 +222,17 @@
archiver = ar + ' ' + ar_flags
cc_cmd = cc + ' ' + cflags
@@ -229,7 +229,7 @@ https://bugs.python.org/issue1222585
_INITPRE = '_OSX_SUPPORT_INITIAL_'
--- Makefile.pre.in
+++ Makefile.pre.in
-@@ -569,7 +569,7 @@
+@@ -580,7 +580,7 @@
*\ -s*|s*) quiet="-q";; \
*) quiet="";; \
esac; \
diff --git a/patches/22_all_tests_environment.patch b/patches/22_all_tests_environment.patch
index 6eb75f8..11a5f22 100644
--- a/patches/22_all_tests_environment.patch
+++ b/patches/22_all_tests_environment.patch
@@ -2,7 +2,7 @@ https://bugs.python.org/issue1674555
--- Lib/site.py
+++ Lib/site.py
-@@ -545,8 +545,12 @@
+@@ -544,8 +544,12 @@
known_paths = venv(known_paths)
if ENABLE_USER_SITE is None:
ENABLE_USER_SITE = check_enableusersite()
@@ -122,7 +122,7 @@ https://bugs.python.org/issue1674555
accumulate_result(test, result)
except KeyboardInterrupt:
interrupted = True
-@@ -817,8 +866,8 @@
+@@ -813,8 +862,8 @@
sys.stdout.flush()
try:
ns.verbose = True
@@ -133,7 +133,7 @@ https://bugs.python.org/issue1674555
except KeyboardInterrupt:
# print a newline separate from the ^C
print()
-@@ -1239,8 +1288,9 @@
+@@ -1236,8 +1285,9 @@
for name, get, restore in self.resource_info():
current = get()
original = saved_values.pop(name)
@@ -166,7 +166,7 @@ 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)
-@@ -436,8 +441,11 @@
+@@ -438,8 +443,11 @@
def test_startup_imports(self):
# This tests checks which modules are loaded by Python when it
# initially starts upon startup.
@@ -180,7 +180,7 @@ https://bugs.python.org/issue1674555
stdout, stderr = popen.communicate()
--- Makefile.pre.in
+++ Makefile.pre.in
-@@ -960,7 +960,7 @@
+@@ -979,7 +979,7 @@
######################################################################
TESTOPTS= $(EXTRATESTOPTS)
diff --git a/patches/23_all_h2py_encoding.patch b/patches/23_all_h2py_encoding.patch
index 8a0fbb4..f472b7c 100644
--- a/patches/23_all_h2py_encoding.patch
+++ b/patches/23_all_h2py_encoding.patch
@@ -15,8 +15,8 @@ https://bugs.python.org/issue13032
+ b'^[\t ]*#[\t ]*define[\t ]+'
+ b'([a-zA-Z0-9_]+)\(([_a-zA-Z][_a-zA-Z0-9]*)\)[\t ]+')
--p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
-+p_include = re.compile(b'^[\t ]*#[\t ]*include[\t ]+<([a-zA-Z0-9_/\.]+)')
+-p_include = re.compile('^[\t ]*#[\t ]*include[\t ]+<([^>\n]+)>')
++p_include = re.compile(b'^[\t ]*#[\t ]*include[\t ]+<([^>\n]+)>')
-p_comment = re.compile(r'/\*([^*]+|\*+[^/])*(\*+/)?')
-p_cpp_comment = re.compile('//.*')