Tue Sep 28 12:31:25 2021 UTC ()
python27: Fix build with OpenSSL 3.


(jperkin)
diff -r1.82 -r1.83 pkgsrc/lang/python27/distinfo
diff -r1.2 -r1.3 pkgsrc/lang/python27/patches/patch-setup.py

cvs diff -r1.82 -r1.83 pkgsrc/lang/python27/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/python27/distinfo 2021/06/23 18:30:24 1.82
+++ pkgsrc/lang/python27/distinfo 2021/09/28 12:31:25 1.83
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: distinfo,v 1.82 2021/06/23 18:30:24 schmonz Exp $ 1$NetBSD: distinfo,v 1.83 2021/09/28 12:31:25 jperkin Exp $
2 2
3SHA1 (Python-2.7.18.tar.xz) = 678d4cf483a1c92efd347ee8e1e79326dc82810b 3SHA1 (Python-2.7.18.tar.xz) = 678d4cf483a1c92efd347ee8e1e79326dc82810b
4RMD160 (Python-2.7.18.tar.xz) = 40a514bb05c9e631454ea8466e28f5bb229428ad 4RMD160 (Python-2.7.18.tar.xz) = 40a514bb05c9e631454ea8466e28f5bb229428ad
5SHA512 (Python-2.7.18.tar.xz) = a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c 5SHA512 (Python-2.7.18.tar.xz) = a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c
6Size (Python-2.7.18.tar.xz) = 12854736 bytes 6Size (Python-2.7.18.tar.xz) = 12854736 bytes
7SHA1 (patch-Include_pyerrors.h) = 0d2cd52d18cc719b895fa32ed7e11c6cb15bae54 7SHA1 (patch-Include_pyerrors.h) = 0d2cd52d18cc719b895fa32ed7e11c6cb15bae54
8SHA1 (patch-Include_pyport.h) = f3e4ddbc954425a65301465410911222ca471320 8SHA1 (patch-Include_pyport.h) = f3e4ddbc954425a65301465410911222ca471320
9SHA1 (patch-Lib___osx__support.py) = 4389472565616b3875c699f6e3e74850d5fde712 9SHA1 (patch-Lib___osx__support.py) = 4389472565616b3875c699f6e3e74850d5fde712
10SHA1 (patch-Lib_ctypes_____init____.py) = 31dd0546bbe29ad1b1d481edc525ba43479c06da 10SHA1 (patch-Lib_ctypes_____init____.py) = 31dd0546bbe29ad1b1d481edc525ba43479c06da
11SHA1 (patch-Lib_ctypes_macholib_dyld.py) = 9b7e972d4c71311742ca8b3501382182a4c9e2fe 11SHA1 (patch-Lib_ctypes_macholib_dyld.py) = 9b7e972d4c71311742ca8b3501382182a4c9e2fe
12SHA1 (patch-Lib_ctypes_test_test__macholib.py) = 4479d315cd037f4c9138e8f5baa8eb1685932baa 12SHA1 (patch-Lib_ctypes_test_test__macholib.py) = 4479d315cd037f4c9138e8f5baa8eb1685932baa
13SHA1 (patch-Lib_ctypes_util.py) = 6fa516c7b43f08992427a0afcbe80c17bcc070f1 13SHA1 (patch-Lib_ctypes_util.py) = 6fa516c7b43f08992427a0afcbe80c17bcc070f1
14SHA1 (patch-Lib_distutils_command_build__ext.py) = ea4feba4e93dbcff07050c82a00d591bb650e934 14SHA1 (patch-Lib_distutils_command_build__ext.py) = ea4feba4e93dbcff07050c82a00d591bb650e934
@@ -38,14 +38,14 @@ SHA1 (patch-Modules___multiprocessing_mu @@ -38,14 +38,14 @@ SHA1 (patch-Modules___multiprocessing_mu
38SHA1 (patch-Modules___multiprocessing_semaphore.c) = 03b9c33ef38da383d5f7c2c84c17fe38cdd2911e 38SHA1 (patch-Modules___multiprocessing_semaphore.c) = 03b9c33ef38da383d5f7c2c84c17fe38cdd2911e
39SHA1 (patch-Modules__ssl.c) = 6e68f88ad205106691900f091a897ffe0a4c363c 39SHA1 (patch-Modules__ssl.c) = 6e68f88ad205106691900f091a897ffe0a4c363c
40SHA1 (patch-Modules_getaddrinfo.c) = aa699d257f1bc98b9a3183a21324053e134409d1 40SHA1 (patch-Modules_getaddrinfo.c) = aa699d257f1bc98b9a3183a21324053e134409d1
41SHA1 (patch-Modules_getpath.c) = 4e6445be9da49626800c03eaaab28fb3826be9f9 41SHA1 (patch-Modules_getpath.c) = 4e6445be9da49626800c03eaaab28fb3826be9f9
42SHA1 (patch-Modules_makesetup) = 9aad78714c4fe1a21cf66a6627d97d164ecea196 42SHA1 (patch-Modules_makesetup) = 9aad78714c4fe1a21cf66a6627d97d164ecea196
43SHA1 (patch-Modules_nismodule.c) = 129ef7b32779944c2f1827c6b078a3aafab60729 43SHA1 (patch-Modules_nismodule.c) = 129ef7b32779944c2f1827c6b078a3aafab60729
44SHA1 (patch-Modules_posixmodule.c) = 5105d380cd49bf49b8adbd9aa5ffb245195728ed 44SHA1 (patch-Modules_posixmodule.c) = 5105d380cd49bf49b8adbd9aa5ffb245195728ed
45SHA1 (patch-Modules_selectmodule.c) = 01e113b0bd251978b555caaaa60b79c372edebce 45SHA1 (patch-Modules_selectmodule.c) = 01e113b0bd251978b555caaaa60b79c372edebce
46SHA1 (patch-Modules_socketmodule.c) = 16848d90947b3de1f921a0813fa5c317f76961d4 46SHA1 (patch-Modules_socketmodule.c) = 16848d90947b3de1f921a0813fa5c317f76961d4
47SHA1 (patch-Modules_sunaudiodev.c) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6 47SHA1 (patch-Modules_sunaudiodev.c) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6
48SHA1 (patch-Python_thread__pthread.h) = 517cfefc2f2e13631d22bad28c327513cdf17c10 48SHA1 (patch-Python_thread__pthread.h) = 517cfefc2f2e13631d22bad28c327513cdf17c10
49SHA1 (patch-configure) = a8bcacd360ca3a451c43a05a4be3bcea56f70617 49SHA1 (patch-configure) = a8bcacd360ca3a451c43a05a4be3bcea56f70617
50SHA1 (patch-pyconfig.h.in) = 66d1a685e17ef7977bf09cdc64bdf80087216bc7 50SHA1 (patch-pyconfig.h.in) = 66d1a685e17ef7977bf09cdc64bdf80087216bc7
51SHA1 (patch-setup.py) = 19aa0992ea75cd151be7e35f05d9af0a84d07e85 51SHA1 (patch-setup.py) = 4ab14fc01a1622b7a35bfb45b93a12d16dfc8b82

cvs diff -r1.2 -r1.3 pkgsrc/lang/python27/patches/patch-setup.py (expand / switch to unified diff)

--- pkgsrc/lang/python27/patches/patch-setup.py 2021/06/23 18:30:24 1.2
+++ pkgsrc/lang/python27/patches/patch-setup.py 2021/09/28 12:31:25 1.3
@@ -1,32 +1,32 @@ @@ -1,32 +1,32 @@
1$NetBSD: patch-setup.py,v 1.2 2021/06/23 18:30:24 schmonz Exp $ 1$NetBSD: patch-setup.py,v 1.3 2021/09/28 12:31:25 jperkin Exp $
2 2
3Disable certain modules, so they can be built as separate packages. 3Disable certain modules, so they can be built as separate packages.
4Only check the BUILDLINK_DIR for libraries etc, do not pick up random 4Only check the BUILDLINK_DIR for libraries etc, do not pick up random
5headers and libraries from the system. 5headers and libraries from the system.
6 6
7Do not look for ncursesw. 7Do not look for ncursesw.
8Assume panel_library is correct; this is a fix for ncurses' gnupanel 8Assume panel_library is correct; this is a fix for ncurses' gnupanel
9 which will get transformed to panel in buildlink. 9 which will get transformed to panel in buildlink.
10 10
11Build the _ssl module with pkgsrc choiced OpenSSL. 11Build the _ssl module with pkgsrc choiced OpenSSL. Support OpenSSL 3.x
12 12
13macOS arm64 support, via MacPorts. 13macOS arm64 support, via MacPorts.
14 14
15cygwin 2.7.3-no-libm.patch 15cygwin 2.7.3-no-libm.patch
16 16
17--- setup.py.orig 2021-06-22 19:20:43.000000000 +0000 17--- setup.py.orig 2020-04-19 21:13:39.000000000 +0000
18+++ setup.py 18+++ setup.py
19@@ -16,6 +16,7 @@ from distutils.command.build_ext import  19@@ -16,6 +16,7 @@ from distutils.command.build_ext import
20 from distutils.command.install import install 20 from distutils.command.install import install
21 from distutils.command.install_lib import install_lib 21 from distutils.command.install_lib import install_lib
22 from distutils.spawn import find_executable 22 from distutils.spawn import find_executable
23+import distutils.command.config 23+import distutils.command.config
24  24
25 cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ 25 cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
26  26
27@@ -33,7 +34,7 @@ host_platform = get_platform() 27@@ -33,7 +34,7 @@ host_platform = get_platform()
28 COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) 28 COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
29  29
30 # This global variable is used to hold the list of modules to be disabled. 30 # This global variable is used to hold the list of modules to be disabled.
31-disabled_module_list = [] 31-disabled_module_list = []
32+disabled_module_list = ["_bsddb", "bsddb185", "_curses", "_curses_panel", "_elementtree", "gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "linuxaudiodev", "ossaudiodev", "sunaudiodev"] 32+disabled_module_list = ["_bsddb", "bsddb185", "_curses", "_curses_panel", "_elementtree", "gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "linuxaudiodev", "ossaudiodev", "sunaudiodev"]
@@ -87,36 +87,52 @@ cygwin 2.7.3-no-libm.patch @@ -87,36 +87,52 @@ cygwin 2.7.3-no-libm.patch
87 if ssl_incs is not None: 87 if ssl_incs is not None:
88 krb5_h = find_file('krb5.h', inc_dirs, 88 krb5_h = find_file('krb5.h', inc_dirs,
89@@ -867,9 +870,7 @@ class PyBuildExt(build_ext): 89@@ -867,9 +870,7 @@ class PyBuildExt(build_ext):
90 if krb5_h: 90 if krb5_h:
91 ssl_incs += krb5_h 91 ssl_incs += krb5_h
92 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, 92 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
93- ['/usr/local/ssl/lib', 93- ['/usr/local/ssl/lib',
94- '/usr/contrib/ssl/lib/' 94- '/usr/contrib/ssl/lib/'
95- ] ) 95- ] )
96+ [] ) 96+ [] )
97  97
98 if (ssl_incs is not None and 98 if (ssl_incs is not None and
99 ssl_libs is not None): 99 ssl_libs is not None):
100@@ -888,7 +889,7 @@ class PyBuildExt(build_ext): 100@@ -885,10 +886,12 @@ class PyBuildExt(build_ext):
 101 openssl_ver = 0
 102 openssl_ver_re = re.compile(
 103 '^\s*#\s*define\s+OPENSSL_VERSION_NUMBER\s+(0x[0-9a-fA-F]+)' )
 104+ openssl_ver_major = re.compile(
 105+ '^\s*#\s*define\s+OPENSSL_VERSION_MAJOR\s+([0-9]+)' )
101  106
102 # look for the openssl version header on the compiler search path. 107 # look for the openssl version header on the compiler search path.
103 opensslv_h = find_file('openssl/opensslv.h', [], 108 opensslv_h = find_file('openssl/opensslv.h', [],
104- inc_dirs + search_for_ssl_incs_in) 109- inc_dirs + search_for_ssl_incs_in)
105+ search_for_ssl_incs_in + inc_dirs) 110+ search_for_ssl_incs_in + inc_dirs)
106 if opensslv_h: 111 if opensslv_h:
107 name = os.path.join(opensslv_h[0], 'openssl/opensslv.h') 112 name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
108 if host_platform == 'darwin' and is_macosx_sdk_path(name): 113 if host_platform == 'darwin' and is_macosx_sdk_path(name):
109@@ -988,175 +989,6 @@ class PyBuildExt(build_ext): 114@@ -899,6 +902,10 @@ class PyBuildExt(build_ext):
 115 m = openssl_ver_re.match(line)
 116 if m:
 117 openssl_ver = eval(m.group(1))
 118+ break
 119+ m = openssl_ver_major.match(line)
 120+ if m and eval(m.group(1)) >= 3:
 121+ openssl_ver = 0x03000000
 122 except IOError, msg:
 123 print "IOError while reading opensshv.h:", msg
 124 pass
 125@@ -988,175 +995,6 @@ class PyBuildExt(build_ext):
110 else: 126 else:
111 raise ValueError("unknown major BerkeleyDB version", major) 127 raise ValueError("unknown major BerkeleyDB version", major)
112  128
113- # construct a list of paths to look for the header file in on 129- # construct a list of paths to look for the header file in on
114- # top of the normal inc_dirs. 130- # top of the normal inc_dirs.
115- db_inc_paths = [ 131- db_inc_paths = [
116- '/usr/include/db4', 132- '/usr/include/db4',
117- '/usr/local/include/db4', 133- '/usr/local/include/db4',
118- '/opt/sfw/include/db4', 134- '/opt/sfw/include/db4',
119- '/usr/include/db3', 135- '/usr/include/db3',
120- '/usr/local/include/db3', 136- '/usr/local/include/db3',
121- '/opt/sfw/include/db3', 137- '/opt/sfw/include/db3',
122- # Fink defaults (http://fink.sourceforge.net/) 138- # Fink defaults (http://fink.sourceforge.net/)
@@ -272,27 +288,27 @@ cygwin 2.7.3-no-libm.patch @@ -272,27 +288,27 @@ cygwin 2.7.3-no-libm.patch
272- runtime_library_dirs=dblib_dir, 288- runtime_library_dirs=dblib_dir,
273- include_dirs=db_incs, 289- include_dirs=db_incs,
274- libraries=dblibs)) 290- libraries=dblibs))
275- else: 291- else:
276- if db_setup_debug: print "db: no appropriate library found" 292- if db_setup_debug: print "db: no appropriate library found"
277- db_incs = None 293- db_incs = None
278- dblibs = [] 294- dblibs = []
279- dblib_dir = None 295- dblib_dir = None
280- missing.append('_bsddb') 296- missing.append('_bsddb')
281- 297-
282 # The sqlite interface 298 # The sqlite interface
283 sqlite_setup_debug = False # verbose debug prints from this script? 299 sqlite_setup_debug = False # verbose debug prints from this script?
284  300
285@@ -1262,46 +1094,32 @@ class PyBuildExt(build_ext): 301@@ -1262,46 +1100,32 @@ class PyBuildExt(build_ext):
286 else: 302 else:
287 missing.append('_sqlite3') 303 missing.append('_sqlite3')
288  304
289- # Look for Berkeley db 1.85. Note that it is built as a different 305- # Look for Berkeley db 1.85. Note that it is built as a different
290- # module name so it can be included even when later versions are 306- # module name so it can be included even when later versions are
291- # available. A very restrictive search is performed to avoid 307- # available. A very restrictive search is performed to avoid
292- # accidentally building this module with a later version of the 308- # accidentally building this module with a later version of the
293- # underlying db library. May BSD-ish Unixes incorporate db 1.85 309- # underlying db library. May BSD-ish Unixes incorporate db 1.85
294- # symbols into libc and place the include file in /usr/include. 310- # symbols into libc and place the include file in /usr/include.
295- # 311- #
296- # If the better bsddb library can be built (db_incs is defined) 312- # If the better bsddb library can be built (db_incs is defined)
297- # we do not build this one. Otherwise this build will pick up 313- # we do not build this one. Otherwise this build will pick up
298- # the more recent berkeleydb's db.h file first in the include path 314- # the more recent berkeleydb's db.h file first in the include path
@@ -342,97 +358,97 @@ cygwin 2.7.3-no-libm.patch @@ -342,97 +358,97 @@ cygwin 2.7.3-no-libm.patch
342+ while 1: 358+ while 1:
343+ line = input.readline() 359+ line = input.readline()
344+ if not line: break 360+ if not line: break
345+ if re.search('This file is part of GDBM', line): 361+ if re.search('This file is part of GDBM', line):
346+ ret = None 362+ ret = None
347+ break 363+ break
348+ input.close() 364+ input.close()
349+ break 365+ break
350+ return ret 366+ return ret
351+ 367+
352 config_args = [arg.strip("'") 368 config_args = [arg.strip("'")
353 for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] 369 for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
354 dbm_args = [arg for arg in config_args 370 dbm_args = [arg for arg in config_args
355@@ -1313,7 +1131,7 @@ class PyBuildExt(build_ext): 371@@ -1313,7 +1137,7 @@ class PyBuildExt(build_ext):
356 dbmext = None 372 dbmext = None
357 for cand in dbm_order: 373 for cand in dbm_order:
358 if cand == "ndbm": 374 if cand == "ndbm":
359- if find_file("ndbm.h", inc_dirs, []) is not None: 375- if find_file("ndbm.h", inc_dirs, []) is not None:
360+ if find_ndbm_h(inc_dirs) is not None: 376+ if find_ndbm_h(inc_dirs) is not None:
361 # Some systems have -lndbm, others have -lgdbm_compat, 377 # Some systems have -lndbm, others have -lgdbm_compat,
362 # others don't have either 378 # others don't have either
363 if self.compiler.find_library_file(lib_dirs, 379 if self.compiler.find_library_file(lib_dirs,
364@@ -1357,18 +1175,14 @@ class PyBuildExt(build_ext): 380@@ -1357,18 +1181,14 @@ class PyBuildExt(build_ext):
365 libraries = gdbm_libs) 381 libraries = gdbm_libs)
366 break 382 break
367 elif cand == "bdb": 383 elif cand == "bdb":
368- if db_incs is not None: 384- if db_incs is not None:
369- print "building dbm using bdb" 385- print "building dbm using bdb"
370- dbmext = Extension('dbm', ['dbmmodule.c'], 386- dbmext = Extension('dbm', ['dbmmodule.c'],
371- library_dirs=dblib_dir, 387- library_dirs=dblib_dir,
372- runtime_library_dirs=dblib_dir, 388- runtime_library_dirs=dblib_dir,
373- include_dirs=db_incs, 389- include_dirs=db_incs,
374- define_macros=[ 390- define_macros=[
375- ('HAVE_BERKDB_H', None), 391- ('HAVE_BERKDB_H', None),
376- ('DB_DBM_HSEARCH', None), 392- ('DB_DBM_HSEARCH', None),
377- ], 393- ],
378- libraries=dblibs) 394- libraries=dblibs)
379- break 395- break
380+ print "building dbm using bdb" 396+ print "building dbm using bdb"
381+ dbmext = Extension('dbm', ['dbmmodule.c'], 397+ dbmext = Extension('dbm', ['dbmmodule.c'],
382+ define_macros=[ 398+ define_macros=[
383+ ('HAVE_BERKDB_H', None), 399+ ('HAVE_BERKDB_H', None),
384+ ('DB_DBM_HSEARCH', None), 400+ ('DB_DBM_HSEARCH', None),
385+ ], 401+ ],
386+ libraries=["db"]) 402+ libraries=["db"])
387+ break 403+ break
388 if dbmext is not None: 404 if dbmext is not None:
389 exts.append(dbmext) 405 exts.append(dbmext)
390 else: 406 else:
391@@ -1429,8 +1243,7 @@ class PyBuildExt(build_ext): 407@@ -1429,8 +1249,7 @@ class PyBuildExt(build_ext):
392 missing.append('_curses') 408 missing.append('_curses')
393  409
394 # If the curses module is enabled, check for the panel module 410 # If the curses module is enabled, check for the panel module
395- if (module_enabled(exts, '_curses') and 411- if (module_enabled(exts, '_curses') and
396- self.compiler.find_library_file(lib_dirs, panel_library)): 412- self.compiler.find_library_file(lib_dirs, panel_library)):
397+ if (module_enabled(exts, '_curses')): 413+ if (module_enabled(exts, '_curses')):
398 exts.append( Extension('_curses_panel', ['_curses_panel.c'], 414 exts.append( Extension('_curses_panel', ['_curses_panel.c'],
399 include_dirs = curses_incs, 415 include_dirs = curses_incs,
400 libraries = [panel_library] + curses_libs) ) 416 libraries = [panel_library] + curses_libs) )
401@@ -2129,6 +1942,7 @@ class PyBuildExt(build_ext): 417@@ -2129,6 +1948,7 @@ class PyBuildExt(build_ext):
402  418
403 if host_platform == 'darwin': 419 if host_platform == 'darwin':
404 sources.append('_ctypes/malloc_closure.c') 420 sources.append('_ctypes/malloc_closure.c')
405+ extra_compile_args.append('-DUSING_MALLOC_CLOSURE_DOT_C=1') 421+ extra_compile_args.append('-DUSING_MALLOC_CLOSURE_DOT_C=1')
406 sources.append('_ctypes/darwin/dlfcn_simple.c') 422 sources.append('_ctypes/darwin/dlfcn_simple.c')
407 extra_compile_args.append('-DMACOSX') 423 extra_compile_args.append('-DMACOSX')
408 include_dirs.append('_ctypes/darwin') 424 include_dirs.append('_ctypes/darwin')
409@@ -2191,6 +2005,16 @@ class PyBuildExt(build_ext): 425@@ -2191,6 +2011,16 @@ class PyBuildExt(build_ext):
410 break 426 break
411  427
412 if ffi_inc and ffi_lib: 428 if ffi_inc and ffi_lib:
413+ config = distutils.command.config.config(self.distribution) 429+ config = distutils.command.config.config(self.distribution)
414+ config._check_compiler() 430+ config._check_compiler()
415+ if any(cc in config.compiler.compiler_so for cc in ('gcc', 'clang')): 431+ if any(cc in config.compiler.compiler_so for cc in ('gcc', 'clang')):
416+ config.compiler.compiler_so += ["-Wno-unguarded-availability-new", "-Wno-unused-value"] 432+ config.compiler.compiler_so += ["-Wno-unguarded-availability-new", "-Wno-unused-value"]
417+ if config.check_func("ffi_prep_closure_loc", headers=['ffi.h'], include_dirs=[ffi_inc]): 433+ if config.check_func("ffi_prep_closure_loc", headers=['ffi.h'], include_dirs=[ffi_inc]):
418+ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CLOSURE_LOC=1") 434+ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CLOSURE_LOC=1")
419+ if config.check_func("ffi_prep_cif_var", headers=['ffi.h'], include_dirs=[ffi_inc]): 435+ if config.check_func("ffi_prep_cif_var", headers=['ffi.h'], include_dirs=[ffi_inc]):
420+ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CIF_VAR=1") 436+ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CIF_VAR=1")
421+ if host_platform == 'darwin' and config.check_func("ffi_closure_alloc", headers=['ffi.h'], include_dirs=[ffi_inc]): 437+ if host_platform == 'darwin' and config.check_func("ffi_closure_alloc", headers=['ffi.h'], include_dirs=[ffi_inc]):
422+ ext.extra_compile_args.append("-DHAVE_FFI_CLOSURE_ALLOC=1") 438+ ext.extra_compile_args.append("-DHAVE_FFI_CLOSURE_ALLOC=1")
423 ext.include_dirs.extend(ffi_inc) 439 ext.include_dirs.extend(ffi_inc)
424 ext.libraries.append(ffi_lib) 440 ext.libraries.append(ffi_lib)
425 self.use_system_libffi = True 441 self.use_system_libffi = True
426@@ -2342,9 +2166,9 @@ def main(): 442@@ -2342,9 +2172,9 @@ def main():
427 ext_modules=[Extension('_struct', ['_struct.c'])], 443 ext_modules=[Extension('_struct', ['_struct.c'])],
428  444
429 # Scripts to install 445 # Scripts to install
430- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', 446- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
431- 'Tools/scripts/2to3', 447- 'Tools/scripts/2to3',
432- 'Lib/smtpd.py'] 448- 'Lib/smtpd.py']
433+ scripts = ['Tools/scripts/pydoc2.7', 449+ scripts = ['Tools/scripts/pydoc2.7',
434+ 'Tools/scripts/2to3-2.7', 450+ 'Tools/scripts/2to3-2.7',
435+ 'Tools/scripts/smtpd2.7.py'] 451+ 'Tools/scripts/smtpd2.7.py']
436 ) 452 )
437  453
438 # --install-platlib 454 # --install-platlib