python35: update to 3.5.9

This commit is contained in:
Joshua Root
2019-11-02 14:00:55 +11:00
parent 4327edd748
commit 4ba9dc9482
4 changed files with 108 additions and 14 deletions
+6 -6
View File
@@ -7,8 +7,7 @@ name python35
epoch 20170810
# Remember to keep py35-tkinter and py35-gdbm's versions sync'd with this
version 3.5.7
revision 1
version 3.5.9
set major [lindex [split $version .] 0]
set branch [join [lrange [split ${version} .] 0 1] .]
@@ -26,9 +25,9 @@ master_sites ${homepage}ftp/python/${version}/
distname Python-${version}
use_xz yes
checksums md5 b1b4949786732494f4d6675c184aa765 \
rmd160 782c63473dc5a4fb181409dcc2af9595d1aab92c \
sha256 285892899bf4d5737fd08482aa6171c6b2564a45b9102dfacfb72826aebdc7dc
checksums md5 ef7f82485e83c7f8f8bcb920a9c2457b \
rmd160 7ca1bacda445d33c6533c6fce7eb625757a3f8ad \
sha256 c24a37c63a67f53bdd09c5f287b5cff8e8b98f857bf348c577d454d3f74db049
patchfiles patch-setup.py.diff \
patch-Lib-cgi.py.diff \
@@ -38,7 +37,8 @@ patchfiles patch-setup.py.diff \
omit-local-site-packages.patch \
patch-xcode4bug.diff \
Modules_posixmodule.c.diff \
uuid-64bit.patch
uuid-64bit.patch \
patch-_osx_support.py.diff
depends_build port:pkgconfig
depends_lib port:bzip2 \
@@ -0,0 +1,94 @@
--- Lib/_osx_support.py.orig 2019-11-02 10:02:34.000000000 +1100
+++ Lib/_osx_support.py 2019-11-02 13:33:32.000000000 +1100
@@ -211,7 +211,7 @@
if cv in _config_vars and cv not in os.environ:
flags = _config_vars[cv]
flags = re.sub(r'-arch\s+\w+\s', ' ', flags, flags=re.ASCII)
- flags = re.sub('-isysroot [^ \t]*', ' ', flags)
+ flags = re.sub(r'-isysroot\s*\S+', ' ', flags)
_save_modified_value(_config_vars, cv, flags)
return _config_vars
@@ -287,7 +287,7 @@
# to /usr and /System/Library by either a standalone CLT
# package or the CLT component within Xcode.
cflags = _config_vars.get('CFLAGS', '')
- m = re.search(r'-isysroot\s+(\S+)', cflags)
+ m = re.search(r'-isysroot\s*(\S+)', cflags)
if m is not None:
sdk = m.group(1)
if not os.path.exists(sdk):
@@ -295,7 +295,7 @@
# Do not alter a config var explicitly overridden by env var
if cv in _config_vars and cv not in os.environ:
flags = _config_vars[cv]
- flags = re.sub(r'-isysroot\s+\S+(?:\s|$)', ' ', flags)
+ flags = re.sub(r'-isysroot\s*\S+(?:\s|$)', ' ', flags)
_save_modified_value(_config_vars, cv, flags)
return _config_vars
@@ -320,7 +320,7 @@
stripArch = stripSysroot = True
else:
stripArch = '-arch' in cc_args
- stripSysroot = '-isysroot' in cc_args
+ stripSysroot = any(arg for arg in cc_args if arg.find('-isysroot') == 0)
if stripArch or 'ARCHFLAGS' in os.environ:
while True:
@@ -338,23 +338,34 @@
if stripSysroot:
while True:
- try:
- index = compiler_so.index('-isysroot')
+ indices = [i for i,x in enumerate(compiler_so) if x.find('-isysroot') == 0]
+ if not indices:
+ break
+ index = indices[0]
+ if compiler_so[index] == '-isysroot':
# Strip this argument and the next one:
del compiler_so[index:index+2]
- except ValueError:
- break
+ else:
+ # It's '-isysroot/some/path' in one arg
+ del compiler_so[index:index+1]
# Check if the SDK that is used during compilation actually exists,
# the universal build requires the usage of a universal SDK and not all
# users have that installed by default.
sysroot = None
- if '-isysroot' in cc_args:
- idx = cc_args.index('-isysroot')
- sysroot = cc_args[idx+1]
- elif '-isysroot' in compiler_so:
- idx = compiler_so.index('-isysroot')
- sysroot = compiler_so[idx+1]
+ argvar = cc_args
+ indices = [i for i,x in enumerate(cc_args) if x.find('-isysroot') == 0]
+ if not indices:
+ argvar = compiler_so
+ indices = [i for i,x in enumerate(compiler_so) if x.find('-isysroot') == 0]
+
+ for idx in indices:
+ if argvar[idx] == '-isysroot':
+ sysroot = argvar[idx+1]
+ break
+ else:
+ sysroot = argvar[idx][len('-isysroot'):]
+ break
if sysroot and not os.path.isdir(sysroot):
from distutils import log
--- Lib/distutils/unixccompiler.py.orig 2019-11-02 10:02:34.000000000 +1100
+++ Lib/distutils/unixccompiler.py 2019-11-02 13:33:32.000000000 +1100
@@ -282,7 +282,7 @@
# vs
# /usr/lib/libedit.dylib
cflags = sysconfig.get_config_var('CFLAGS')
- m = re.search(r'-isysroot\s+(\S+)', cflags)
+ m = re.search(r'-isysroot\s*(\S+)', cflags)
if m is None:
sysroot = '/'
else: