Tue Dec 8 14:30:41 2020 UTC ()
python39: updated to 3.9.1

Python 3.9.1 final

Core and Builtins

bpo-42576: types.GenericAlias will now raise a TypeError when attempting to initialize with a keyword argument. Previously, this would cause the interpreter to crash if the interpreter was compiled with debug symbols. This does not affect interpreters compiled for release. Patch by Ken Jin.

Library

bpo-5054: CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed. Replace the special purpose getallmatchingheaders with generic get_all method and add relevant tests.
bpo-17735: inspect.findsource() now raises OSError instead of IndexError when co_lineno of a code object is greater than the file length. This can happen, for example, when a file is edited after it was imported.
bpo-42116: Fix handling of trailing comments by inspect.getsource().
bpo-42487: ChainMap.__iter__ no longer calls __getitem__ on underlying maps
bpo-42482: TracebackException no longer holds a reference to the exception窶冱 traceback object. Consequently, instances of TracebackException for equivalent but non-equal exceptions now compare as equal.
bpo-42406: We fixed an issue in pickle.whichmodule in which importing multiprocessing could change the how pickle identifies which module an object belongs to, potentially breaking the unpickling of those objects.
bpo-34215: Clarify the error message for asyncio.IncompleteReadError when expected is None.
bpo-12800: Extracting a symlink from a tarball should succeed and overwrite the symlink if it already exists. The fix is to remove the existing file or symlink before extraction. Based on patch by Chris AtLee, Jeffrey Kintscher, and Senthil Kumaran.

Tests

bpo-41473: Reenable test_gdb on gdb 9.2 and newer: https://bugzilla.redhat.com/show_bug.cgi?id=1866884 bug is fixed in gdb 10.1.
bpo-42553: Fix test_asyncio.test_call_later() race condition: don窶冲 measure asyncio performance in the call_later() unit test. The test failed randomly on the CI.

macOS

bpo-41116: If no explicit macOS SDK was specified, setup.py should check for Tcl and TK frameworks in /Library/Frameworks; the previous commit inadvertently broke that test.
bpo-42504: Fix build on macOS Big Sur when MACOSX_DEPLOYMENT_TARGET=11

IDLE

bpo-42508: Keep IDLE running on macOS. Remove obsolete workaround that prevented running files with shortcuts when using new universal2 installers built on macOS 11.


(adam)
diff -r1.1 -r1.2 pkgsrc/lang/py39-html-docs/Makefile
diff -r1.1 -r1.2 pkgsrc/lang/py39-html-docs/distinfo
diff -r1.5 -r1.6 pkgsrc/lang/python39/Makefile
diff -r1.1 -r1.2 pkgsrc/lang/python39/PLIST
diff -r1.1 -r1.2 pkgsrc/lang/python39/dist.mk
diff -r1.4 -r1.5 pkgsrc/lang/python39/distinfo
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Lib___osx__support.py
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Lib_ctypes_macholib_dyld.py
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Lib_ctypes_test_test__macholib.py
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Lib_distutils_tests_test__build__ext.py
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Lib_test_test__bytes.py
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Lib_test_test__platform.py
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Lib_test_test__unicode.py
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Mac_BuildScript_build-installer.py
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Mac_Tools_pythonw.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Modules___ctypes_callbacks.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Modules___ctypes_callproc.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Modules___ctypes_ctypes.h
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Modules___ctypes_malloc__closure.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Modules___decimal_libmpdec_mpdecimal.h
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Modules_getpath.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Modules_posixmodule.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Modules_timemodule.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Python_bootstrap__hash.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-Python_pytime.c
diff -r1.1 -r0 pkgsrc/lang/python39/patches/patch-configure.ac
diff -r1.2 -r1.3 pkgsrc/lang/python39/patches/patch-configure
diff -r1.2 -r1.3 pkgsrc/lang/python39/patches/patch-pyconfig.h.in
diff -r1.3 -r1.4 pkgsrc/lang/python39/patches/patch-setup.py

cvs diff -r1.1 -r1.2 pkgsrc/lang/py39-html-docs/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/py39-html-docs/Makefile 2020/10/10 20:19:47 1.1
+++ pkgsrc/lang/py39-html-docs/Makefile 2020/12/08 14:30:40 1.2
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.1 2020/10/10 20:19:47 adam Exp $ 1# $NetBSD: Makefile,v 1.2 2020/12/08 14:30:40 adam Exp $
2 2
3VERS= 3.9.0 3VERS= 3.9.1
4DISTNAME= python-${VERS}-docs-html 4DISTNAME= python-${VERS}-docs-html
5PKGNAME= py39-html-docs-${VERS} 5PKGNAME= py39-html-docs-${VERS}
6CATEGORIES= lang python 6CATEGORIES= lang python
7MASTER_SITES= https://www.python.org/ftp/python/doc/${VERS}/ 7MASTER_SITES= https://www.python.org/ftp/python/doc/${VERS}/
8EXTRACT_SUFX= .tar.bz2 8EXTRACT_SUFX= .tar.bz2
9 9
10MAINTAINER= leot@NetBSD.org 10MAINTAINER= leot@NetBSD.org
11HOMEPAGE= https://www.python.org/doc/ 11HOMEPAGE= https://www.python.org/doc/
12COMMENT= HTML Documentation for Python 3.9 12COMMENT= HTML Documentation for Python 3.9
13LICENSE= python-software-foundation 13LICENSE= python-software-foundation
14 14
15USE_TOOLS+= pax 15USE_TOOLS+= pax
16 16

cvs diff -r1.1 -r1.2 pkgsrc/lang/py39-html-docs/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/py39-html-docs/distinfo 2020/10/10 20:19:47 1.1
+++ pkgsrc/lang/py39-html-docs/distinfo 2020/12/08 14:30:40 1.2
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.1 2020/10/10 20:19:47 adam Exp $ 1$NetBSD: distinfo,v 1.2 2020/12/08 14:30:40 adam Exp $
2 2
3SHA1 (python-3.9.0-docs-html.tar.bz2) = 99704717879e3ee4040c2ac7b186b03a56577c8f 3SHA1 (python-3.9.1-docs-html.tar.bz2) = ab7f5ea13f67b0c7e639964d4be3a83a3c72b35a
4RMD160 (python-3.9.0-docs-html.tar.bz2) = 3820fc22a919acdca355e56827ca5f87d90d0a70 4RMD160 (python-3.9.1-docs-html.tar.bz2) = 172b697e3dad6da7b183124b86b4ce08f1c00db6
5SHA512 (python-3.9.0-docs-html.tar.bz2) = d04957f4895ab8f6bef8467d8b5282e0b3e5c453e2168c25123ee7aefd7a3d6d8b918e9f455bbf82913370a00181b8c00998ec2ae67c763aeda237c5b3a42097 5SHA512 (python-3.9.1-docs-html.tar.bz2) = aa87b27b895894281b923031af651d26627526f85e61fe09c88be081ff6471ae367364cea176b1e522e065c6ec98372504f769aa1d40382716004f90c3761d97
6Size (python-3.9.0-docs-html.tar.bz2) = 6771373 bytes 6Size (python-3.9.1-docs-html.tar.bz2) = 6806786 bytes

cvs diff -r1.5 -r1.6 pkgsrc/lang/python39/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/python39/Makefile 2020/12/07 13:14:39 1.5
+++ pkgsrc/lang/python39/Makefile 2020/12/08 14:30:40 1.6
@@ -1,19 +1,18 @@ @@ -1,19 +1,18 @@
1# $NetBSD: Makefile,v 1.5 2020/12/07 13:14:39 nia Exp $ 1# $NetBSD: Makefile,v 1.6 2020/12/08 14:30:40 adam Exp $
2 2
3.include "dist.mk" 3.include "dist.mk"
4 4
5PKGNAME= python39-${PY_DISTVERSION} 5PKGNAME= python39-${PY_DISTVERSION}
6PKGREVISION= 1 
7CATEGORIES= lang python 6CATEGORIES= lang python
8 7
9MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.python.org/ 9HOMEPAGE= https://www.python.org/
11COMMENT= Interpreted, interactive, object-oriented programming language 10COMMENT= Interpreted, interactive, object-oriented programming language
12LICENSE= python-software-foundation 11LICENSE= python-software-foundation
13 12
14CONFLICTS+= python-[0-9]* 13CONFLICTS+= python-[0-9]*
15 14
16PLIST_AWK= -f ${PKGSRCDIR}/lang/python/plist-python.awk 15PLIST_AWK= -f ${PKGSRCDIR}/lang/python/plist-python.awk
17PLIST_AWK_ENV+= PYVERS=39 16PLIST_AWK_ENV+= PYVERS=39
18PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.pyc$$/ { 17PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.pyc$$/ {
19PRINT_PLIST_AWK+= sub(/__pycache__\//, "") 18PRINT_PLIST_AWK+= sub(/__pycache__\//, "")
@@ -55,37 +54,30 @@ USE_TOOLS+= gmake @@ -55,37 +54,30 @@ USE_TOOLS+= gmake
55.elif ${OPSYS} == "IRIX" 54.elif ${OPSYS} == "IRIX"
56PY_PLATNAME= ${LOWER_OPSYS:C/\..*//} 55PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
57.elif ${OPSYS} == "SunOS" 56.elif ${OPSYS} == "SunOS"
58PY_PLATNAME= sunos${OS_VERSION:C/\..*//} 57PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
59.elif ${OPSYS} == "HPUX" 58.elif ${OPSYS} == "HPUX"
60PY_PLATNAME= hp-ux11 59PY_PLATNAME= hp-ux11
61.elif ${OPSYS} == "Linux" 60.elif ${OPSYS} == "Linux"
62PY_PLATNAME= linux 61PY_PLATNAME= linux
63.else 62.else
64PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} 63PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
65.endif 64.endif
66PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} 65PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q}
67 66
68# ossaudiodev is only available on x86 for the following platforms 
69PLIST_VARS+= oss 
70.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \ 
71 (${PY_PLATNAME} == "linux" || ${OPSYS} == "FreeBSD") 
72PLIST.oss= yes 
73.endif 
74 
75# For Xcode 5 and up, we need to search the SDK path for headers, otherwise 67# For Xcode 5 and up, we need to search the SDK path for headers, otherwise
76# certain modules will not be built. 68# certain modules will not be built.
77.if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include) 69.if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH:Q}/usr/include)
78CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include 70CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include
79.endif 71.endif
80 72
81PLIST_VARS+= nis 73PLIST_VARS+= nis
82.for incdir in ${_OPSYS_INCLUDE_DIRS} 74.for incdir in ${_OPSYS_INCLUDE_DIRS}
83. if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h)) 75. if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
84HAVE_RPC_H= yes 76HAVE_RPC_H= yes
85. endif 77. endif
86. if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h)) 78. if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h))
87HAVE_YP_PROT_H= yes 79HAVE_YP_PROT_H= yes
88. endif 80. endif
89.endfor 81.endfor
90.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes) 82.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes)
91PLIST.nis= yes 83PLIST.nis= yes

cvs diff -r1.1 -r1.2 pkgsrc/lang/python39/PLIST (expand / switch to unified diff)

--- pkgsrc/lang/python39/PLIST 2020/10/10 20:19:47 1.1
+++ pkgsrc/lang/python39/PLIST 2020/12/08 14:30:40 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.1 2020/10/10 20:19:47 adam Exp $ 1@comment $NetBSD: PLIST,v 1.2 2020/12/08 14:30:40 adam Exp $
2bin/2to3-${PY_VER_SUFFIX} 2bin/2to3-${PY_VER_SUFFIX}
3bin/pydoc${PY_VER_SUFFIX} 3bin/pydoc${PY_VER_SUFFIX}
4bin/python${PY_VER_SUFFIX} 4bin/python${PY_VER_SUFFIX}
5bin/python${PY_VER_SUFFIX}-config 5bin/python${PY_VER_SUFFIX}-config
6include/python${PY_VER_SUFFIX}/Python-ast.h 6include/python${PY_VER_SUFFIX}/Python-ast.h
7include/python${PY_VER_SUFFIX}/Python.h 7include/python${PY_VER_SUFFIX}/Python.h
8include/python${PY_VER_SUFFIX}/abstract.h 8include/python${PY_VER_SUFFIX}/abstract.h
9include/python${PY_VER_SUFFIX}/asdl.h 9include/python${PY_VER_SUFFIX}/asdl.h
10include/python${PY_VER_SUFFIX}/ast.h 10include/python${PY_VER_SUFFIX}/ast.h
11include/python${PY_VER_SUFFIX}/bitset.h 11include/python${PY_VER_SUFFIX}/bitset.h
12include/python${PY_VER_SUFFIX}/bltinmodule.h 12include/python${PY_VER_SUFFIX}/bltinmodule.h
13include/python${PY_VER_SUFFIX}/boolobject.h 13include/python${PY_VER_SUFFIX}/boolobject.h
14include/python${PY_VER_SUFFIX}/bytearrayobject.h 14include/python${PY_VER_SUFFIX}/bytearrayobject.h
@@ -1409,27 +1409,26 @@ lib/python${PY_VER_SUFFIX}/encodings/uu_ @@ -1409,27 +1409,26 @@ lib/python${PY_VER_SUFFIX}/encodings/uu_
1409lib/python${PY_VER_SUFFIX}/encodings/uu_codec.pyo 1409lib/python${PY_VER_SUFFIX}/encodings/uu_codec.pyo
1410lib/python${PY_VER_SUFFIX}/encodings/zlib_codec.py 1410lib/python${PY_VER_SUFFIX}/encodings/zlib_codec.py
1411lib/python${PY_VER_SUFFIX}/encodings/zlib_codec.pyc 1411lib/python${PY_VER_SUFFIX}/encodings/zlib_codec.pyc
1412lib/python${PY_VER_SUFFIX}/encodings/zlib_codec.pyo 1412lib/python${PY_VER_SUFFIX}/encodings/zlib_codec.pyo
1413lib/python${PY_VER_SUFFIX}/ensurepip/__init__.py 1413lib/python${PY_VER_SUFFIX}/ensurepip/__init__.py
1414lib/python${PY_VER_SUFFIX}/ensurepip/__init__.pyc 1414lib/python${PY_VER_SUFFIX}/ensurepip/__init__.pyc
1415lib/python${PY_VER_SUFFIX}/ensurepip/__init__.pyo 1415lib/python${PY_VER_SUFFIX}/ensurepip/__init__.pyo
1416lib/python${PY_VER_SUFFIX}/ensurepip/__main__.py 1416lib/python${PY_VER_SUFFIX}/ensurepip/__main__.py
1417lib/python${PY_VER_SUFFIX}/ensurepip/__main__.pyc 1417lib/python${PY_VER_SUFFIX}/ensurepip/__main__.pyc
1418lib/python${PY_VER_SUFFIX}/ensurepip/__main__.pyo 1418lib/python${PY_VER_SUFFIX}/ensurepip/__main__.pyo
1419lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/__init__.py 1419lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/__init__.py
1420lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/__init__.pyc 1420lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/__init__.pyc
1421lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/__init__.pyo 1421lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/__init__.pyo
1422lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/pip-20.2.1-py2.py3-none-any.whl 
1423lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/pip-20.2.3-py2.py3-none-any.whl 1422lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/pip-20.2.3-py2.py3-none-any.whl
1424lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/setuptools-49.2.1-py3-none-any.whl 1423lib/python${PY_VER_SUFFIX}/ensurepip/_bundled/setuptools-49.2.1-py3-none-any.whl
1425lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.py 1424lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.py
1426lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.pyc 1425lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.pyc
1427lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.pyo 1426lib/python${PY_VER_SUFFIX}/ensurepip/_uninstall.pyo
1428lib/python${PY_VER_SUFFIX}/enum.py 1427lib/python${PY_VER_SUFFIX}/enum.py
1429lib/python${PY_VER_SUFFIX}/enum.pyc 1428lib/python${PY_VER_SUFFIX}/enum.pyc
1430lib/python${PY_VER_SUFFIX}/enum.pyo 1429lib/python${PY_VER_SUFFIX}/enum.pyo
1431lib/python${PY_VER_SUFFIX}/filecmp.py 1430lib/python${PY_VER_SUFFIX}/filecmp.py
1432lib/python${PY_VER_SUFFIX}/filecmp.pyc 1431lib/python${PY_VER_SUFFIX}/filecmp.pyc
1433lib/python${PY_VER_SUFFIX}/filecmp.pyo 1432lib/python${PY_VER_SUFFIX}/filecmp.pyo
1434lib/python${PY_VER_SUFFIX}/fileinput.py 1433lib/python${PY_VER_SUFFIX}/fileinput.py
1435lib/python${PY_VER_SUFFIX}/fileinput.pyc 1434lib/python${PY_VER_SUFFIX}/fileinput.pyc
@@ -3271,26 +3270,29 @@ lib/python${PY_VER_SUFFIX}/test/test_asy @@ -3271,26 +3270,29 @@ lib/python${PY_VER_SUFFIX}/test/test_asy
3271lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_base_events.pyo 3270lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_base_events.pyo
3272lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_buffered_proto.py 3271lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_buffered_proto.py
3273lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_buffered_proto.pyc 3272lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_buffered_proto.pyc
3274lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_buffered_proto.pyo 3273lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_buffered_proto.pyo
3275lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_context.py 3274lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_context.py
3276lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_context.pyc 3275lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_context.pyc
3277lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_context.pyo 3276lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_context.pyo
3278lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_events.py 3277lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_events.py
3279lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_events.pyc 3278lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_events.pyc
3280lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_events.pyo 3279lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_events.pyo
3281lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures.py 3280lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures.py
3282lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures.pyc 3281lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures.pyc
3283lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures.pyo 3282lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures.pyo
 3283lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures2.py
 3284lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures2.pyc
 3285lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_futures2.pyo
3284lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_locks.py 3286lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_locks.py
3285lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_locks.pyc 3287lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_locks.pyc
3286lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_locks.pyo 3288lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_locks.pyo
3287lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_pep492.py 3289lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_pep492.py
3288lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_pep492.pyc 3290lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_pep492.pyc
3289lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_pep492.pyo 3291lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_pep492.pyo
3290lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_proactor_events.py 3292lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_proactor_events.py
3291lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_proactor_events.pyc 3293lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_proactor_events.pyc
3292lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_proactor_events.pyo 3294lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_proactor_events.pyo
3293lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_protocols.py 3295lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_protocols.py
3294lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_protocols.pyc 3296lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_protocols.pyc
3295lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_protocols.pyo 3297lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_protocols.pyo
3296lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_queues.py 3298lib/python${PY_VER_SUFFIX}/test/test_asyncio/test_queues.py

cvs diff -r1.1 -r1.2 pkgsrc/lang/python39/dist.mk (expand / switch to unified diff)

--- pkgsrc/lang/python39/dist.mk 2020/10/10 20:19:47 1.1
+++ pkgsrc/lang/python39/dist.mk 2020/12/08 14:30:40 1.2
@@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
1# $NetBSD: dist.mk,v 1.1 2020/10/10 20:19:47 adam Exp $ 1# $NetBSD: dist.mk,v 1.2 2020/12/08 14:30:40 adam Exp $
2 2
3PY_DISTVERSION= 3.9.0 3PY_DISTVERSION= 3.9.1
4DISTNAME= Python-${PY_DISTVERSION} 4DISTNAME= Python-${PY_DISTVERSION}
5EXTRACT_SUFX= .tar.xz 5EXTRACT_SUFX= .tar.xz
6DISTINFO_FILE= ${.CURDIR}/../../lang/python39/distinfo 6DISTINFO_FILE= ${.CURDIR}/../../lang/python39/distinfo
7PATCHDIR= ${.CURDIR}/../../lang/python39/patches 7PATCHDIR= ${.CURDIR}/../../lang/python39/patches
8MASTER_SITES= http://www.python.org/ftp/python/${PY_DISTVERSION}/ 8MASTER_SITES= http://www.python.org/ftp/python/${PY_DISTVERSION}/

cvs diff -r1.4 -r1.5 pkgsrc/lang/python39/distinfo (expand / switch to unified diff)

--- pkgsrc/lang/python39/distinfo 2020/11/19 16:29:42 1.4
+++ pkgsrc/lang/python39/distinfo 2020/12/08 14:30:40 1.5
@@ -1,42 +1,22 @@ @@ -1,42 +1,22 @@
1$NetBSD: distinfo,v 1.4 2020/11/19 16:29:42 bsiegert Exp $ 1$NetBSD: distinfo,v 1.5 2020/12/08 14:30:40 adam Exp $
2 2
3SHA1 (Python-3.9.0.tar.xz) = ff1fc8c37d5d4b09ec3bf0d84f3e5b97745c6704 3SHA1 (Python-3.9.1.tar.xz) = 77f4105846f6740297e50d7535a42c02d6b8e7db
4RMD160 (Python-3.9.0.tar.xz) = 822fd1ea11f3ca303a08317f6db61f2a1e03e5ef 4RMD160 (Python-3.9.1.tar.xz) = 59e056f957252a03c83ce892ac0ef85a274fce58
5SHA512 (Python-3.9.0.tar.xz) = b141039c9701a8cb0d15cd11a279153077524af4d0599e7d2c7279d4c18d05fda06b33ef82342d875de996c7117b7dc6eb154dc3669d38a1efa99801aeec6c5e 5SHA512 (Python-3.9.1.tar.xz) = b90029d6825751685983e9dcf0e0ec9e46f18e6c7d37b0dd7a245a94316f8c0090308ad7c2b2b49ed2514b0b909177231dd5bcad03031bf4624e37136fcf8019
6Size (Python-3.9.0.tar.xz) = 18866140 bytes 6Size (Python-3.9.1.tar.xz) = 18897104 bytes
7SHA1 (patch-Lib___osx__support.py) = 4ccccb81381cd7bf4a8bbc3e376d1234cf2266d5 
8SHA1 (patch-Lib_ctypes_macholib_dyld.py) = d7f3e0c63d6926db253fbe923dd97995478d528c 
9SHA1 (patch-Lib_ctypes_test_test__macholib.py) = bd887357759975b7a497c4079bc730e9c578ceed 
10SHA1 (patch-Lib_ctypes_util.py) = 032cc99ebad93ddddfd89073c60424a952e3faa3 7SHA1 (patch-Lib_ctypes_util.py) = 032cc99ebad93ddddfd89073c60424a952e3faa3
11SHA1 (patch-Lib_distutils_command_install.py) = 6fc6f5d918b7581fc62cd0fe55857ee932c3a341 8SHA1 (patch-Lib_distutils_command_install.py) = 6fc6f5d918b7581fc62cd0fe55857ee932c3a341
12SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf 9SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf
13SHA1 (patch-Lib_distutils_tests_test__build__ext.py) = 145a0f01b3602c582e033081a35d4d86245575f9 
14SHA1 (patch-Lib_distutils_unixccompiler.py) = 2e65a8dd5dd3fe25957206c062106fa7a6fc4e69 10SHA1 (patch-Lib_distutils_unixccompiler.py) = 2e65a8dd5dd3fe25957206c062106fa7a6fc4e69
15SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 5d6dab14197f27363394ff1aeee22a8ced8026d2 11SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 5d6dab14197f27363394ff1aeee22a8ced8026d2
16SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c 12SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c
17SHA1 (patch-Lib_test_test__bytes.py) = 72559fdcb09f2c0b0c7b62649c249775d359d72e 
18SHA1 (patch-Lib_test_test__platform.py) = 36311733729ac95159b3177dc0c16e6f4aa2f2b9 
19SHA1 (patch-Lib_test_test__unicode.py) = 14fe4dd1011dbe262459f735a643774e0d38c99e 
20SHA1 (patch-Mac_BuildScript_build-installer.py) = 24641c70facfded736ccc2be069d0e2ae63f63fd 
21SHA1 (patch-Mac_Tools_pythonw.c) = fe128efe942853f0825c1a1fa17842201716dfdf 
22SHA1 (patch-Makefile.pre.in) = d42f9f5bca1dd663f64122dc95b49111452fe6e8 13SHA1 (patch-Makefile.pre.in) = d42f9f5bca1dd663f64122dc95b49111452fe6e8
23SHA1 (patch-Modules___ctypes_callbacks.c) = 95750090d396a647fc12f7f7fad8c591ca4dcdec 
24SHA1 (patch-Modules___ctypes_callproc.c) = 86f27c466a67ebf72d863febece33aa8b1f9f719 
25SHA1 (patch-Modules___ctypes_ctypes.h) = 641c0af4d550c9140549ce2f2df6239c2c954a06 
26SHA1 (patch-Modules___ctypes_malloc__closure.c) = 7e8f491ce66acb6d07e8830ee881edbf0aaac538 
27SHA1 (patch-Modules___decimal_libmpdec_mpdecimal.h) = 8d302abacc5737fe7620d4738fff6c5c3ed387c7 
28SHA1 (patch-Modules___zoneinfo.c) = b1df24fe935cd357670a6d9f41245ab04f2015e8 14SHA1 (patch-Modules___zoneinfo.c) = b1df24fe935cd357670a6d9f41245ab04f2015e8
29SHA1 (patch-Modules_getpath.c) = d7114d21d7d9c7167fad259b115cb02e4153c531 
30SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567 15SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567
31SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d 16SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d
32SHA1 (patch-Modules_posixmodule.c) = c592ef4ebe650f672a15ff9887cbeed2ca73b666 
33SHA1 (patch-Modules_socketmodule.c) = 02c447f980a08e2185df78d2f13373574f414304 17SHA1 (patch-Modules_socketmodule.c) = 02c447f980a08e2185df78d2f13373574f414304
34SHA1 (patch-Modules_socketmodule.h) = 61fe96a79d4ccf3e7768eb79dd7e29a50a85328b 18SHA1 (patch-Modules_socketmodule.h) = 61fe96a79d4ccf3e7768eb79dd7e29a50a85328b
35SHA1 (patch-Modules_timemodule.c) = 8c8e9e43b6d165c1a7df6142a6bcd430003ed165 
36SHA1 (patch-Python_bootstrap__hash.c) = cbc2839675182a344591ba672187b166f166499b 
37SHA1 (patch-Python_pytime.c) = 1bb39b7060c1f337562208dc6611672eaf2f586b 
38SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be 19SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
39SHA1 (patch-configure) = 371a65a2cb10fe7709d30a16358b48bc2e0a4aa6 20SHA1 (patch-configure) = 2339ccb9041171f304286b2ee3cf711c7569a7a7
40SHA1 (patch-configure.ac) = 4ce75ef922e015adf095cb481c829b11c0454efe 21SHA1 (patch-pyconfig.h.in) = 2f06af7358690b46eaff404226b898962b049a0e
41SHA1 (patch-pyconfig.h.in) = 7c1c997c089f882fbd334b81c04a03dbaebb2c41 22SHA1 (patch-setup.py) = 0ea2e4183f7c11ff893ca302aafe8bb9bea80d6c
42SHA1 (patch-setup.py) = ab1a7cb97fb8718d21f07f8c896b7de660189c67 

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Lib___osx__support.py

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Lib_ctypes_macholib_dyld.py

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Lib_ctypes_test_test__macholib.py

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Lib_distutils_tests_test__build__ext.py

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Lib_test_test__bytes.py

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Lib_test_test__platform.py

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Lib_test_test__unicode.py

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Mac_BuildScript_build-installer.py

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Mac_Tools_pythonw.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Modules___ctypes_callbacks.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Modules___ctypes_callproc.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Modules___ctypes_ctypes.h

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Modules___ctypes_malloc__closure.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Modules___decimal_libmpdec_mpdecimal.h

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Modules_getpath.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Modules_posixmodule.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Modules_timemodule.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Python_bootstrap__hash.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-Python_pytime.c

File Deleted: pkgsrc/lang/python39/patches/Attic/patch-configure.ac

cvs diff -r1.2 -r1.3 pkgsrc/lang/python39/patches/patch-configure (expand / switch to unified diff)

--- pkgsrc/lang/python39/patches/patch-configure 2020/11/12 10:58:21 1.2
+++ pkgsrc/lang/python39/patches/patch-configure 2020/12/08 14:30:40 1.3
@@ -1,158 +1,61 @@ @@ -1,158 +1,61 @@
1$NetBSD: patch-configure,v 1.2 2020/11/12 10:58:21 sjmulder Exp $ 1$NetBSD: patch-configure,v 1.3 2020/12/08 14:30:40 adam Exp $
2 2
3 - Use gnu99 instead of c99 to avoid "alloca() undefined" problems. 3Use gnu99 instead of c99 to avoid "alloca() undefined" problems.
4 - Fix linking on Darwin; don't use -stack_size. 4Fix linking on Darwin; don't use -stack_size.
5 - Changes for consistency across pkgsrc platforms. 5Changes for consistency across pkgsrc platforms.
6 - Simplify _sysconfigdata to include only platform name. 6Simplify _sysconfigdata to include only platform name.
7 - Support for macOS 11 and Apple Silicon (ARM). Backported from: 
8 https://github.com/python/cpython/pull/22855 
9 7
10--- configure.orig 2020-10-05 15:07:58.000000000 +0000 8--- configure.orig 2020-12-07 14:02:38.000000000 +0000
11+++ configure 9+++ configure
12@@ -1510,8 +1510,8 @@ Optional Packages: 10@@ -6961,7 +6961,7 @@ UNIVERSAL_ARCH_FLAGS=
13 specify the kind of universal binary that should be 
14 created. this option is only valid when 
15 --enable-universalsdk is set; options are: 
16- ("32-bit", "64-bit", "3-way", "intel", "intel-32", 
17- "intel-64", or "all") see Mac/README.rst 
18+ ("universal2", "32-bit", "64-bit", "3-way", "intel", 
19+ "intel-32", "intel-64", or "all") see Mac/README.rst 
20 --with-framework-name=FRAMEWORK 
21 specify the name for the python framework on macOS 
22 only valid when --enable-framework is set. see 
23@@ -6954,14 +6954,14 @@ fi 
24  
25  
26  
27-# The -arch flags for universal builds on OSX 
28+# The -arch flags for universal builds on macOS 
29 UNIVERSAL_ARCH_FLAGS= 
30  
31  
32 # tweak BASECFLAGS based on compiler and platform 11 # tweak BASECFLAGS based on compiler and platform
33 case $GCC in 12 case $GCC in
34 yes) 13 yes)
35- CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" 14- CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
36+ CFLAGS_NODIST="$CFLAGS_NODIST -std=gnu99" 15+ CFLAGS_NODIST="$CFLAGS_NODIST -std=gnu99"
37  16
38 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5 17 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
39 $as_echo_n "checking for -Wextra... " >&6; } 18 $as_echo_n "checking for -Wextra... " >&6; }
40@@ -7481,6 +7481,11 @@ $as_echo "$CC" >&6; } 19@@ -9650,7 +9650,6 @@ then
41 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" 
42 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" 
43 ;; 
44+ universal2) 
45+ UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64" 
46+ LIPO_32BIT_FLAGS="" 
47+ ARCH_RUN_32BIT="true" 
48+ ;; 
49 intel) 
50 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" 
51 LIPO_32BIT_FLAGS="-extract i386" 
52@@ -7502,7 +7507,7 @@ $as_echo "$CC" >&6; } 
53 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" 
54 ;; 
55 *) 
56- as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5 
57+ as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5 
58 ;; 
59 esac 
60  
61@@ -9334,7 +9339,7 @@ fi 
62 MACOSX_DEFAULT_ARCH="ppc" 
63 ;; 
64 *) 
65- as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 
66+ as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5 
67 ;; 
68 esac 
69 else 
70@@ -9344,9 +9349,12 @@ fi 
71 ;; 
72 ppc) 
73 MACOSX_DEFAULT_ARCH="ppc64" 
74+ ;; 
75+ arm64) 
76+ MACOSX_DEFAULT_ARCH="arm64" 
77 ;; 
78 *) 
79- as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 
80+ as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5 
81 ;; 
82 esac 
83  
84@@ -9617,7 +9625,6 @@ then 
85 # to ensure that tests don't crash 20 # to ensure that tests don't crash
86 # Note: This matches the value of THREAD_STACK_SIZE in 21 # Note: This matches the value of THREAD_STACK_SIZE in
87 # thread_pthread.h 22 # thread_pthread.h
88- LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED" 23- LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
89  24
90 if test "$enable_framework" 25 if test "$enable_framework"
91 then 26 then
92@@ -11989,6 +11996,31 @@ $as_echo "no" >&6; } 27@@ -14495,10 +14494,10 @@ _ACEOF
93  
94 fi 
95 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 
96+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5 
97+$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; } 
98+cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
99+/* end confdefs.h. */ 
100+#include <mach-o/dyld.h> 
101+int 
102+main () 
103+{ 
104+void *x=_dyld_shared_cache_contains_path 
105+ ; 
106+ return 0; 
107+} 
108+_ACEOF 
109+if ac_fn_c_try_compile "$LINENO"; then : 
110+ 
111+$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h 
112+ 
113+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 
114+$as_echo "yes" >&6; } 
115+else 
116+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 
117+$as_echo "no" >&6; } 
118+ 
119+fi 
120+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 
121  
122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5 
123 $as_echo_n "checking for memfd_create... " >&6; } 
124@@ -14437,10 +14469,10 @@ _ACEOF 
125 if ac_fn_c_try_compile "$LINENO"; then : 28 if ac_fn_c_try_compile "$LINENO"; then :
126  29
127  30
128-if $GREP noonsees conftest.$ac_objext >/dev/null ; then 31-if $GREP noonsees conftest.$ac_objext >/dev/null ; then
129+if strings -a conftest.$ac_objext | grep noonsees >/dev/null ; then 32+if strings -a conftest.$ac_objext | grep noonsees >/dev/null ; then
130 ax_cv_c_float_words_bigendian=yes 33 ax_cv_c_float_words_bigendian=yes
131 fi 34 fi
132-if $GREP seesnoon conftest.$ac_objext >/dev/null ; then 35-if $GREP seesnoon conftest.$ac_objext >/dev/null ; then
133+if strings -a conftest.$ac_objext | grep seesnoon >/dev/null ; then 36+if strings -a conftest.$ac_objext | grep seesnoon >/dev/null ; then
134 if test "$ax_cv_c_float_words_bigendian" = unknown; then 37 if test "$ax_cv_c_float_words_bigendian" = unknown; then
135 ax_cv_c_float_words_bigendian=no 38 ax_cv_c_float_words_bigendian=no
136 else 39 else
137@@ -15326,8 +15358,6 @@ fi 40@@ -15384,8 +15383,6 @@ fi
138  41
139  42
140 case $ac_sys_system in 43 case $ac_sys_system in
141- Linux*|GNU*|Darwin|VxWorks) 44- Linux*|GNU*|Darwin|VxWorks)
142- EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};; 45- EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
143 *) 46 *)
144 EXT_SUFFIX=${SHLIB_SUFFIX};; 47 EXT_SUFFIX=${SHLIB_SUFFIX};;
145 esac 48 esac
146@@ -15383,11 +15413,7 @@ fi 49@@ -15441,11 +15438,7 @@ fi
147  50
148  51
149  52
150-if test x$PLATFORM_TRIPLET = x; then 53-if test x$PLATFORM_TRIPLET = x; then
151- LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}" 54- LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
152-else 55-else
153- LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" 56- LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
154-fi 57-fi
155+LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}" 58+LIBPL='$(prefix)'"/${PLATLIBDIR}/python${VERSION}/config-${LDVERSION}"
156  59
157  60
158 # Check whether right shifting a negative integer extends the sign bit 61 # Check whether right shifting a negative integer extends the sign bit

cvs diff -r1.2 -r1.3 pkgsrc/lang/python39/patches/patch-pyconfig.h.in (expand / switch to unified diff)

--- pkgsrc/lang/python39/patches/patch-pyconfig.h.in 2020/11/12 10:58:21 1.2
+++ pkgsrc/lang/python39/patches/patch-pyconfig.h.in 2020/12/08 14:30:40 1.3
@@ -1,28 +1,16 @@ @@ -1,28 +1,16 @@
1$NetBSD: patch-pyconfig.h.in,v 1.2 2020/11/12 10:58:21 sjmulder Exp $ 1$NetBSD: patch-pyconfig.h.in,v 1.3 2020/12/08 14:30:40 adam Exp $
2 2
3 - detect netcan/can.h on NetBSD 3Detect netcan/can.h on NetBSD
4 - Support for macOS 11 and Apple Silicon (ARM). Backported from: 
5 https://github.com/python/cpython/pull/22855 
6 4
7--- pyconfig.h.in.orig 2020-10-05 15:07:58.000000000 +0000 5--- pyconfig.h.in.orig 2020-10-05 15:07:58.000000000 +0000
8+++ pyconfig.h.in 6+++ pyconfig.h.in
9@@ -637,6 +637,9 @@ 7@@ -637,6 +637,9 @@
10 /* Define to 1 if you have the <linux/memfd.h> header file. */ 8 /* Define to 1 if you have the <linux/memfd.h> header file. */
11 #undef HAVE_LINUX_MEMFD_H 9 #undef HAVE_LINUX_MEMFD_H
12  10
13+/* Define to 1 if you have the <netcan/can.h> header file. */ 11+/* Define to 1 if you have the <netcan/can.h> header file. */
14+#undef HAVE_NETCAN_CAN_H 12+#undef HAVE_NETCAN_CAN_H
15+ 13+
16 /* Define to 1 if you have the <linux/netlink.h> header file. */ 14 /* Define to 1 if you have the <linux/netlink.h> header file. */
17 #undef HAVE_LINUX_NETLINK_H 15 #undef HAVE_LINUX_NETLINK_H
18  16
19@@ -778,6 +781,9 @@ 
20 /* Define if you have the 'prlimit' functions. */ 
21 #undef HAVE_PRLIMIT 
22  
23+/* Define if you have the '_dyld_shared_cache_contains_path' function. */ 
24+#undef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 
25+ 
26 /* Define to 1 if you have the <process.h> header file. */ 
27 #undef HAVE_PROCESS_H 
28  

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

--- pkgsrc/lang/python39/patches/patch-setup.py 2020/11/19 16:29:42 1.3
+++ pkgsrc/lang/python39/patches/patch-setup.py 2020/12/08 14:30:40 1.4
@@ -1,115 +1,113 @@ @@ -1,115 +1,113 @@
1$NetBSD: patch-setup.py,v 1.3 2020/11/19 16:29:42 bsiegert Exp $ 1$NetBSD: patch-setup.py,v 1.4 2020/12/08 14:30:40 adam Exp $
2 2
3 - Disable certain modules, so they can be built as separate packages. 3Disable certain modules, so they can be built as separate packages.
4 - Do not look for ncursesw. 4Do not look for ncursesw.
5 - Assume panel_library is correct; this is a fix for ncurses' gnupanel 5Assume panel_library is correct; this is a fix for ncurses' gnupanel
6 which will get transformed to panel in buildlink. 6which will get transformed to panel in buildlink.
7 - Also look for uuid/uuid.h. 7Also look for uuid/uuid.h.
8 - Support for macOS 11 and Apple Silicon (ARM). Backported from: 
9 https://github.com/python/cpython/pull/22855 
10 8
11--- setup.py.orig 2020-10-05 15:07:58.000000000 +0000 9--- setup.py.orig 2020-12-07 14:02:38.000000000 +0000
12+++ setup.py 10+++ setup.py
13@@ -29,7 +29,7 @@ except ImportError: 11@@ -30,7 +30,7 @@ except ImportError:
14 SUBPROCESS_BOOTSTRAP = True 12 SUBPROCESS_BOOTSTRAP = True
15  13
16  14
17-from distutils import log 15-from distutils import log
18+from distutils import log, text_file 16+from distutils import log, text_file
19 from distutils.command.build_ext import build_ext 17 from distutils.command.build_ext import build_ext
20 from distutils.command.build_scripts import build_scripts 18 from distutils.command.build_scripts import build_scripts
21 from distutils.command.install import install 19 from distutils.command.install import install
22@@ -43,7 +43,7 @@ from distutils.spawn import find_executa 20@@ -44,7 +44,7 @@ from distutils.spawn import find_executa
23 TEST_EXTENSIONS = True 21 TEST_EXTENSIONS = True
24  22
25 # This global variable is used to hold the list of modules to be disabled. 23 # This global variable is used to hold the list of modules to be disabled.
26-DISABLED_MODULE_LIST = [] 24-DISABLED_MODULE_LIST = []
27+DISABLED_MODULE_LIST = ["_curses", "_curses_panel", "_elementtree", "_gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "xxlimited"] 25+DISABLED_MODULE_LIST = ["_curses", "_curses_panel", "_elementtree", "_gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "xxlimited"]
28  26
29  27
30 def get_platform(): 28 def get_platform():
31@@ -239,6 +239,16 @@ def is_macosx_sdk_path(path): 29@@ -224,6 +224,16 @@ def grep_headers_for(function, headers):
32 or path.startswith('/Library/') ) 30 return True
33  31 return False
34  32
35+def grep_headers_for(function, headers): 33+def grep_headers_for(function, headers):
36+ for header in headers: 34+ for header in headers:
37+ try: 35+ try:
38+ with open(header, 'r') as f: 36+ with open(header, 'r') as f:
39+ if function in f.read(): 37+ if function in f.read():
40+ return True 38+ return True
41+ except UnicodeDecodeError: 39+ except UnicodeDecodeError:
42+ pass 40+ pass
43+ return False 41+ return False
44+ 42+
45 def find_file(filename, std_dirs, paths): 43 def find_file(filename, std_dirs, paths):
46 """Searches for the directory where a given file is located, 44 """Searches for the directory where a given file is located,
47 and returns a possibly-empty list of additional directories, or None 45 and returns a possibly-empty list of additional directories, or None
48@@ -740,15 +750,15 @@ class PyBuildExt(build_ext): 46@@ -725,15 +735,15 @@ class PyBuildExt(build_ext):
49 add_dir_to_list(dir_list, directory) 47 add_dir_to_list(dir_list, directory)
50  48
51 def configure_compiler(self): 49 def configure_compiler(self):
52- # Ensure that /usr/local is always used, but the local build 50- # Ensure that /usr/local is always used, but the local build
53- # directories (i.e. '.' and 'Include') must be first. See issue 51- # directories (i.e. '.' and 'Include') must be first. See issue
54- # 10520. 52- # 10520.
55- if not CROSS_COMPILING: 53- if not CROSS_COMPILING:
56- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') 54- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
57- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 55- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
58- # only change this for cross builds for 3.3, issues on Mageia 56- # only change this for cross builds for 3.3, issues on Mageia
59- if CROSS_COMPILING: 57- if CROSS_COMPILING:
60- self.add_cross_compiling_paths() 58- self.add_cross_compiling_paths()
61+ # Add the buildlink directories for pkgsrc 59+ # Add the buildlink directories for pkgsrc
62+ if os.environ.get('BUILDLINK_DIR'): 60+ if os.environ.get('BUILDLINK_DIR'):
63+ dir = os.environ['BUILDLINK_DIR'] 61+ dir = os.environ['BUILDLINK_DIR']
64+ libdir = dir + '/lib' 62+ libdir = dir + '/lib'
65+ incdir = dir + '/include' 63+ incdir = dir + '/include'
66+ if libdir not in self.compiler.library_dirs: 64+ if libdir not in self.compiler.library_dirs:
67+ self.compiler.library_dirs.insert(0, libdir) 65+ self.compiler.library_dirs.insert(0, libdir)
68+ if incdir not in self.compiler.include_dirs: 66+ if incdir not in self.compiler.include_dirs:
69+ self.compiler.include_dirs.insert(0, incdir) 67+ self.compiler.include_dirs.insert(0, incdir)
70 self.add_multiarch_paths() 68 self.add_multiarch_paths()
71 self.add_ldflags_cppflags() 69 self.add_ldflags_cppflags()
72  70
73@@ -796,6 +806,9 @@ class PyBuildExt(build_ext): 71@@ -781,6 +791,9 @@ class PyBuildExt(build_ext):
74 self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] 72 self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']
75  73
76 if MACOS: 74 if MACOS:
77+ self.inc_dirs.append(macosx_sdk_root() + '/usr/include') 75+ self.inc_dirs.append(macosx_sdk_root() + '/usr/include')
78+ self.lib_dirs.append(macosx_sdk_root() + '/usr/lib') 76+ self.lib_dirs.append(macosx_sdk_root() + '/usr/lib')
79+ 77+
80 # This should work on any unixy platform ;-) 78 # This should work on any unixy platform ;-)
81 # If the user has bothered specifying additional -I and -L flags 79 # If the user has bothered specifying additional -I and -L flags
82 # in OPT and LDFLAGS we might as well use them here. 80 # in OPT and LDFLAGS we might as well use them here.
83@@ -1013,8 +1026,6 @@ class PyBuildExt(build_ext): 81@@ -998,8 +1011,6 @@ class PyBuildExt(build_ext):
84 # use the same library for the readline and curses modules. 82 # use the same library for the readline and curses modules.
85 if 'curses' in readline_termcap_library: 83 if 'curses' in readline_termcap_library:
86 curses_library = readline_termcap_library 84 curses_library = readline_termcap_library
87- elif self.compiler.find_library_file(self.lib_dirs, 'ncursesw'): 85- elif self.compiler.find_library_file(self.lib_dirs, 'ncursesw'):
88- curses_library = 'ncursesw' 86- curses_library = 'ncursesw'
89 # Issue 36210: OSS provided ncurses does not link on AIX 87 # Issue 36210: OSS provided ncurses does not link on AIX
90 # Use IBM supplied 'curses' for successful build of _curses 88 # Use IBM supplied 'curses' for successful build of _curses
91 elif AIX and self.compiler.find_library_file(self.lib_dirs, 'curses'): 89 elif AIX and self.compiler.find_library_file(self.lib_dirs, 'curses'):
92@@ -1116,8 +1127,7 @@ class PyBuildExt(build_ext): 90@@ -1101,8 +1112,7 @@ class PyBuildExt(build_ext):
93 # If the curses module is enabled, check for the panel module 91 # If the curses module is enabled, check for the panel module
94 # _curses_panel needs some form of ncurses 92 # _curses_panel needs some form of ncurses
95 skip_curses_panel = True if AIX else False 93 skip_curses_panel = True if AIX else False
96- if (curses_enabled and not skip_curses_panel and 94- if (curses_enabled and not skip_curses_panel and
97- self.compiler.find_library_file(self.lib_dirs, panel_library)): 95- self.compiler.find_library_file(self.lib_dirs, panel_library)):
98+ if curses_enabled and not skip_curses_panel: 96+ if curses_enabled and not skip_curses_panel:
99 self.add(Extension('_curses_panel', ['_curses_panel.c'], 97 self.add(Extension('_curses_panel', ['_curses_panel.c'],
100 include_dirs=curses_includes, 98 include_dirs=curses_includes,
101 define_macros=curses_defines, 99 define_macros=curses_defines,
102@@ -1368,6 +1378,31 @@ class PyBuildExt(build_ext): 100@@ -1353,6 +1363,31 @@ class PyBuildExt(build_ext):
103 dbm_order = ['gdbm'] 101 dbm_order = ['gdbm']
104 # The standard Unix dbm module: 102 # The standard Unix dbm module:
105 if not CYGWIN: 103 if not CYGWIN:
106+ # Top half based on find_file 104+ # Top half based on find_file
107+ def find_ndbm_h(dirs): 105+ def find_ndbm_h(dirs):
108+ ret = None 106+ ret = None
109+ if MACOS: 107+ if MACOS:
110+ sysroot = macosx_sdk_root() 108+ sysroot = macosx_sdk_root()
111+ for dir in dirs: 109+ for dir in dirs:
112+ f = os.path.join(dir, 'ndbm.h') 110+ f = os.path.join(dir, 'ndbm.h')
113+ if MACOS and is_macosx_sdk_path(dir): 111+ if MACOS and is_macosx_sdk_path(dir):
114+ f = os.path.join(sysroot, dir[1:], 'ndbm.h') 112+ f = os.path.join(sysroot, dir[1:], 'ndbm.h')
115+ if not os.path.exists(f): 113+ if not os.path.exists(f):
@@ -121,178 +119,52 @@ $NetBSD: patch-setup.py,v 1.3 2020/11/19 @@ -121,178 +119,52 @@ $NetBSD: patch-setup.py,v 1.3 2020/11/19
121+ line = input.readline() 119+ line = input.readline()
122+ if not line: 120+ if not line:
123+ break 121+ break
124+ if re.search('This file is part of GDBM', line): 122+ if re.search('This file is part of GDBM', line):
125+ ret = None 123+ ret = None
126+ break 124+ break
127+ input.close() 125+ input.close()
128+ break 126+ break
129+ return ret 127+ return ret
130+ 128+
131 config_args = [arg.strip("'") 129 config_args = [arg.strip("'")
132 for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] 130 for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
133 dbm_args = [arg for arg in config_args 131 dbm_args = [arg for arg in config_args
134@@ -1379,7 +1414,7 @@ class PyBuildExt(build_ext): 132@@ -1364,7 +1399,7 @@ class PyBuildExt(build_ext):
135 dbmext = None 133 dbmext = None
136 for cand in dbm_order: 134 for cand in dbm_order:
137 if cand == "ndbm": 135 if cand == "ndbm":
138- if find_file("ndbm.h", self.inc_dirs, []) is not None: 136- if find_file("ndbm.h", self.inc_dirs, []) is not None:
139+ if find_ndbm_h(self.inc_dirs) is not None: 137+ if find_ndbm_h(self.inc_dirs) is not None:
140 # Some systems have -lndbm, others have -lgdbm_compat, 138 # Some systems have -lndbm, others have -lgdbm_compat,
141 # others don't have either 139 # others don't have either
142 if self.compiler.find_library_file(self.lib_dirs, 140 if self.compiler.find_library_file(self.lib_dirs,
143@@ -1779,6 +1814,8 @@ class PyBuildExt(build_ext): 141@@ -1764,6 +1799,8 @@ class PyBuildExt(build_ext):
144 def detect_uuid(self): 142 def detect_uuid(self):
145 # Build the _uuid module if possible 143 # Build the _uuid module if possible
146 uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"]) 144 uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"])
147+ if uuid_incs is None: 145+ if uuid_incs is None:
148+ uuid_incs = find_file("uuid/uuid.h", self.inc_dirs, []) 146+ uuid_incs = find_file("uuid/uuid.h", self.inc_dirs, [])
149 if uuid_incs is not None: 147 if uuid_incs is not None:
150 if self.compiler.find_library_file(self.lib_dirs, 'uuid'): 148 if self.compiler.find_library_file(self.lib_dirs, 'uuid'):
151 uuid_libs = ['uuid'] 149 uuid_libs = ['uuid']
152@@ -2101,43 +2138,17 @@ class PyBuildExt(build_ext): 150@@ -2200,10 +2237,7 @@ class PyBuildExt(build_ext):
153 library_dirs=added_lib_dirs)) 
154 return True 
155  
156- def configure_ctypes_darwin(self, ext): 
157- # Darwin (OS X) uses preconfigured files, in 
158- # the Modules/_ctypes/libffi_osx directory. 
159- ffi_srcdir = os.path.abspath(os.path.join(self.srcdir, 'Modules', 
160- '_ctypes', 'libffi_osx')) 
161- sources = [os.path.join(ffi_srcdir, p) 
162- for p in ['ffi.c', 
163- 'x86/darwin64.S', 
164- 'x86/x86-darwin.S', 
165- 'x86/x86-ffi_darwin.c', 
166- 'x86/x86-ffi64.c', 
167- 'powerpc/ppc-darwin.S', 
168- 'powerpc/ppc-darwin_closure.S', 
169- 'powerpc/ppc-ffi_darwin.c', 
170- 'powerpc/ppc64-darwin_closure.S', 
171- ]] 
172- 
173- # Add .S (preprocessed assembly) to C compiler source extensions. 
174- self.compiler.src_extensions.append('.S') 
175- 
176- include_dirs = [os.path.join(ffi_srcdir, 'include'), 
177- os.path.join(ffi_srcdir, 'powerpc')] 
178- ext.include_dirs.extend(include_dirs) 
179- ext.sources.extend(sources) 
180- return True 
181- 
182 def configure_ctypes(self, ext): 
183- if not self.use_system_libffi: 
184- if MACOS: 
185- return self.configure_ctypes_darwin(ext) 
186- print('INFO: Could not locate ffi libs and/or headers') 
187- return False 
188 return True 
189  
190 def detect_ctypes(self): 
191 # Thomas Heller's _ctypes module 
192- self.use_system_libffi = False 
193+ 
194+ if (not sysconfig.get_config_var("LIBFFI_INCLUDEDIR") and MACOS): 
195+ self.use_system_libffi = True 
196+ else: 
197+ self.use_system_libffi = '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS") 
198+ 
199 include_dirs = [] 
200 extra_compile_args = ['-DPy_BUILD_CORE_MODULE'] 
201 extra_link_args = [] 
202@@ -2150,11 +2161,9 @@ class PyBuildExt(build_ext): 
203  
204 if MACOS: 
205 sources.append('_ctypes/malloc_closure.c') 
206- sources.append('_ctypes/darwin/dlfcn_simple.c') 
207+ extra_compile_args.append('-DUSING_MALLOC_CLOSURE_DOT_C=1') 
208 extra_compile_args.append('-DMACOSX') 
209 include_dirs.append('_ctypes/darwin') 
210- # XXX Is this still needed? 
211- # extra_link_args.extend(['-read_only_relocs', 'warning']) 
212  
213 elif HOST_PLATFORM == 'sunos5': 
214 # XXX This shouldn't be necessary; it appears that some 
215@@ -2184,31 +2193,48 @@ class PyBuildExt(build_ext): 
216 sources=['_ctypes/_ctypes_test.c'], 
217 libraries=['m'])) 
218  
219+ ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR") 
220+ ffi_lib = None 
221+ 
222 ffi_inc_dirs = self.inc_dirs.copy() 
223 if MACOS: 
224- if '--with-system-ffi' not in sysconfig.get_config_var("CONFIG_ARGS"): 
225- return 
226- # OS X 10.5 comes with libffi.dylib; the include files are 
227- # in /usr/include/ffi 
228- ffi_inc_dirs.append('/usr/include/ffi') 
229- 
230- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")] 
231- if not ffi_inc or ffi_inc[0] == '': 
232- ffi_inc = find_file('ffi.h', [], ffi_inc_dirs) 
233- if ffi_inc is not None: 
234- ffi_h = ffi_inc[0] + '/ffi.h' 
235+ ffi_in_sdk = os.path.join(macosx_sdk_root(), "usr/include/ffi") 
236+ 
237+ if not ffi_inc: 
238+ if os.path.exists(ffi_in_sdk): 
239+ ext.extra_compile_args.append("-DUSING_APPLE_OS_LIBFFI=1") 
240+ ffi_inc = ffi_in_sdk 
241+ ffi_lib = 'ffi' 
242+ else: 
243+ # OS X 10.5 comes with libffi.dylib; the include files are 
244+ # in /usr/include/ffi 
245+ ffi_inc_dirs.append('/usr/include/ffi') 
246+ 
247+ if not ffi_inc: 
248+ found = find_file('ffi.h', [], ffi_inc_dirs) 
249+ if found: 
250+ ffi_inc = found[0] 
251+ if ffi_inc: 
252+ ffi_h = ffi_inc + '/ffi.h' 
253 if not os.path.exists(ffi_h): 
254 ffi_inc = None 
255 print('Header file {} does not exist'.format(ffi_h)) 
256- ffi_lib = None 
257- if ffi_inc is not None: 
258+ if ffi_lib is None and ffi_inc: 
259 for lib_name in ('ffi', 'ffi_pic'): 
260 if (self.compiler.find_library_file(self.lib_dirs, lib_name)): 
261 ffi_lib = lib_name 
262 break 
263  
264 if ffi_inc and ffi_lib: 
265- ext.include_dirs.extend(ffi_inc) 
266+ ffi_headers = glob(os.path.join(ffi_inc, '*.h')) 
267+ if grep_headers_for('ffi_prep_cif_var', ffi_headers): 
268+ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CIF_VAR=1") 
269+ if grep_headers_for('ffi_prep_closure_loc', ffi_headers): 
270+ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CLOSURE_LOC=1") 
271+ if grep_headers_for('ffi_closure_alloc', ffi_headers): 
272+ ext.extra_compile_args.append("-DHAVE_FFI_CLOSURE_ALLOC=1") 
273+ 
274+ ext.include_dirs.append(ffi_inc) 
275 ext.libraries.append(ffi_lib) 
276 self.use_system_libffi = True 
277  
278@@ -2226,10 +2252,7 @@ class PyBuildExt(build_ext): 
279 sources = ['_decimal/_decimal.c'] 151 sources = ['_decimal/_decimal.c']
280 depends = ['_decimal/docstrings.h'] 152 depends = ['_decimal/docstrings.h']
281 else: 153 else:
282- include_dirs = [os.path.abspath(os.path.join(self.srcdir, 154- include_dirs = [os.path.abspath(os.path.join(self.srcdir,
283- 'Modules', 155- 'Modules',
284- '_decimal', 156- '_decimal',
285- 'libmpdec'))] 157- 'libmpdec'))]
286+ include_dirs = ['Modules/_decimal/libmpdec'] 158+ include_dirs = ['Modules/_decimal/libmpdec']
287 libraries = ['m'] 159 libraries = ['m']
288 sources = [ 160 sources = [
289 '_decimal/_decimal.c', 161 '_decimal/_decimal.c',
290@@ -2609,7 +2632,7 @@ def main(): 162@@ -2583,7 +2617,7 @@ def main():
291 # If you change the scripts installed here, you also need to 163 # If you change the scripts installed here, you also need to
292 # check the PyBuildScripts command above, and change the links 164 # check the PyBuildScripts command above, and change the links
293 # created by the bininstall target in Makefile.pre.in 165 # created by the bininstall target in Makefile.pre.in
294- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3", 166- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
295+ scripts = ["Tools/scripts/pydoc3", 167+ scripts = ["Tools/scripts/pydoc3",
296 "Tools/scripts/2to3"] 168 "Tools/scripts/2to3"]
297 ) 169 )
298  170