python: fix build failure in default pkgsrc configuration My previous patch intended to remove prefix /usr/pkg from sys.path during build, but the regex ^/usr/pkg matches /usr/pkgsrc/lang/python39/work so it ended unintentionally removing also the work directory in some cases. Match instead on ^/usr/pkg/diff -r1.9 -r1.10 pkgsrc/lang/python310/distinfo
(tnn)
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | $NetBSD: distinfo,v 1.9 2022/01/12 08:49:01 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.10 2022/01/14 10:32:28 tnn Exp $ | |
2 | 2 | |||
3 | BLAKE2s (Python-3.10.1.tar.xz) = a7004c16f0c40d927424d512cd5130cd2955315f50d804c289fc10d48f5a1d5c | 3 | BLAKE2s (Python-3.10.1.tar.xz) = a7004c16f0c40d927424d512cd5130cd2955315f50d804c289fc10d48f5a1d5c | |
4 | SHA512 (Python-3.10.1.tar.xz) = 1c559e33f1252e51bafb941c380de16f142c0735858363c84cb8dbed6767843de3af126889c2826ffb94bd4777d7cdfc31040301c8c74de56af52b80b1aa9e76 | 4 | SHA512 (Python-3.10.1.tar.xz) = 1c559e33f1252e51bafb941c380de16f142c0735858363c84cb8dbed6767843de3af126889c2826ffb94bd4777d7cdfc31040301c8c74de56af52b80b1aa9e76 | |
5 | Size (Python-3.10.1.tar.xz) = 18775460 bytes | 5 | Size (Python-3.10.1.tar.xz) = 18775460 bytes | |
6 | SHA1 (patch-Lib_ctypes_util.py) = 3dec1b6b7a36e46cbfa0dfcd71c5e7fac9f60764 | 6 | SHA1 (patch-Lib_ctypes_util.py) = 3dec1b6b7a36e46cbfa0dfcd71c5e7fac9f60764 | |
7 | SHA1 (patch-Lib_distutils_unixccompiler.py) = 8a91e8f4f86517a62408c3a10ed5eb50c4091fbf | 7 | SHA1 (patch-Lib_distutils_unixccompiler.py) = 8a91e8f4f86517a62408c3a10ed5eb50c4091fbf | |
8 | SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 593c4e93c5653ab400f0a98b91db92630c0a7390 | 8 | SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 593c4e93c5653ab400f0a98b91db92630c0a7390 | |
9 | SHA1 (patch-Lib_sysconfig.py) = bc6d91bf8f7121456b26ea7f080f588c96f2596f | 9 | SHA1 (patch-Lib_sysconfig.py) = bc6d91bf8f7121456b26ea7f080f588c96f2596f | |
10 | SHA1 (patch-Makefile.pre.in) = 932a89313e8f26c435675f2487eb2141876a5f5a | 10 | SHA1 (patch-Makefile.pre.in) = 932a89313e8f26c435675f2487eb2141876a5f5a | |
11 | SHA1 (patch-Modules_socketmodule.c) = 4529c487b33d19b87106a0c006520cc5c45b9dfd | 11 | SHA1 (patch-Modules_socketmodule.c) = 4529c487b33d19b87106a0c006520cc5c45b9dfd | |
12 | SHA1 (patch-Modules_socketmodule.h) = 8761c7238bc74e45adefb6e647dc3b39b7bdd81c | 12 | SHA1 (patch-Modules_socketmodule.h) = 8761c7238bc74e45adefb6e647dc3b39b7bdd81c | |
13 | SHA1 (patch-Python_thread__pthread.h) = bf1aeab011b3afedc02e68fcf5cef091b3e0aefa | 13 | SHA1 (patch-Python_thread__pthread.h) = bf1aeab011b3afedc02e68fcf5cef091b3e0aefa | |
14 | SHA1 (patch-configure) = db79c9e00f2f804ff8497dbad0874658cc363db6 | 14 | SHA1 (patch-configure) = db79c9e00f2f804ff8497dbad0874658cc363db6 | |
15 | SHA1 (patch-pyconfig.h.in) = 1ab77914315acbf0352d242ed66200bea54548f6 | 15 | SHA1 (patch-pyconfig.h.in) = 1ab77914315acbf0352d242ed66200bea54548f6 | |
16 | SHA1 (patch-setup.py) = 0fe71d24fb58da914dd04a169ff2e3b75168726a | 16 | SHA1 (patch-setup.py) = 491b5ff230dd6393fabe787b429a131c88a14f45 |
@@ -1,29 +1,29 @@ | @@ -1,29 +1,29 @@ | |||
1 | $NetBSD: patch-setup.py,v 1.3 2022/01/11 15:13:20 tnn Exp $ | 1 | $NetBSD: patch-setup.py,v 1.4 2022/01/14 10:32:28 tnn Exp $ | |
2 | 2 | |||
3 | Disable certain modules, so they can be built as separate packages. | 3 | Disable certain modules, so they can be built as separate packages. | |
4 | Do not look for ncursesw. | 4 | Do not look for ncursesw. | |
5 | Assume panel_library is correct; this is a fix for ncurses' gnupanel | 5 | Assume panel_library is correct; this is a fix for ncurses' gnupanel | |
6 | which will get transformed to panel in buildlink. | 6 | which will get transformed to panel in buildlink. | |
7 | Don't search for modules in PREFIX. Fixes build failure when py-setuptools | 7 | Don't search for modules in PREFIX. Fixes build failure when py-setuptools | |
8 | are installed. | 8 | are installed. | |
9 | 9 | |||
10 | --- setup.py.orig 2021-12-06 18:23:39.000000000 +0000 | 10 | --- setup.py.orig 2021-12-06 18:23:39.000000000 +0000 | |
11 | +++ setup.py | 11 | +++ setup.py | |
12 | @@ -13,6 +13,7 @@ import warnings | 12 | @@ -13,6 +13,7 @@ import warnings | |
13 | from glob import glob, escape | 13 | from glob import glob, escape | |
14 | import _osx_support | 14 | import _osx_support | |
15 | 15 | |||
16 | +sys.path = [p for p in sys.path if not re.compile('^' + sys.base_prefix).match(p)] | 16 | +sys.path = [p for p in sys.path if not re.compile('^' + sys.base_prefix + '/').match(p)] | |
17 | 17 | |||
18 | try: | 18 | try: | |
19 | import subprocess | 19 | import subprocess | |
20 | @@ -45,6 +46,7 @@ with warnings.catch_warnings(): | 20 | @@ -45,6 +46,7 @@ with warnings.catch_warnings(): | |
21 | DeprecationWarning | 21 | DeprecationWarning | |
22 | ) | 22 | ) | |
23 | 23 | |||
24 | + from distutils import text_file | 24 | + from distutils import text_file | |
25 | from distutils.command.build_ext import build_ext | 25 | from distutils.command.build_ext import build_ext | |
26 | from distutils.command.build_scripts import build_scripts | 26 | from distutils.command.build_scripts import build_scripts | |
27 | from distutils.command.install import install | 27 | from distutils.command.install import install | |
28 | @@ -58,7 +60,7 @@ with warnings.catch_warnings(): | 28 | @@ -58,7 +60,7 @@ with warnings.catch_warnings(): | |
29 | TEST_EXTENSIONS = (sysconfig.get_config_var('TEST_MODULES') == 'yes') | 29 | TEST_EXTENSIONS = (sysconfig.get_config_var('TEST_MODULES') == 'yes') |
@@ -1,21 +1,21 @@ | @@ -1,21 +1,21 @@ | |||
1 | $NetBSD: distinfo,v 1.21 2022/01/12 08:49:01 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.22 2022/01/14 10:32:28 tnn Exp $ | |
2 | 2 | |||
3 | BLAKE2s (Python-3.9.9.tar.xz) = bb0cf5c1cb3212d82b69ab4e965f03b77736610c84bd032f31a5debdd25e6a30 | 3 | BLAKE2s (Python-3.9.9.tar.xz) = bb0cf5c1cb3212d82b69ab4e965f03b77736610c84bd032f31a5debdd25e6a30 | |
4 | SHA512 (Python-3.9.9.tar.xz) = 0ab29fb9a7ecb808bd08d84d28908d5a934e0f021853da0f7a9c94670eb30c8dbbc233d461afdb3995b0de59275ef7e1de43e82d7f848802cbd6e6e50b7b25a6 | 4 | SHA512 (Python-3.9.9.tar.xz) = 0ab29fb9a7ecb808bd08d84d28908d5a934e0f021853da0f7a9c94670eb30c8dbbc233d461afdb3995b0de59275ef7e1de43e82d7f848802cbd6e6e50b7b25a6 | |
5 | Size (Python-3.9.9.tar.xz) = 19144372 bytes | 5 | Size (Python-3.9.9.tar.xz) = 19144372 bytes | |
6 | SHA1 (patch-Lib_ctypes_util.py) = 032cc99ebad93ddddfd89073c60424a952e3faa3 | 6 | SHA1 (patch-Lib_ctypes_util.py) = 032cc99ebad93ddddfd89073c60424a952e3faa3 | |
7 | SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf | 7 | SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf | |
8 | SHA1 (patch-Lib_distutils_unixccompiler.py) = 2e65a8dd5dd3fe25957206c062106fa7a6fc4e69 | 8 | SHA1 (patch-Lib_distutils_unixccompiler.py) = 2e65a8dd5dd3fe25957206c062106fa7a6fc4e69 | |
9 | SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 5d6dab14197f27363394ff1aeee22a8ced8026d2 | 9 | SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 5d6dab14197f27363394ff1aeee22a8ced8026d2 | |
10 | SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c | 10 | SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c | |
11 | SHA1 (patch-Makefile.pre.in) = dd5ff571ac9fe2dc2e41fa678261d8e3648ac908 | 11 | SHA1 (patch-Makefile.pre.in) = dd5ff571ac9fe2dc2e41fa678261d8e3648ac908 | |
12 | SHA1 (patch-Modules___cursesmodule.c) = 424488c19dc78142825c38db47475aa906c4078b | 12 | SHA1 (patch-Modules___cursesmodule.c) = 424488c19dc78142825c38db47475aa906c4078b | |
13 | SHA1 (patch-Modules___ssl.c) = f241ba148e4c244a641386be5ac07817b03f04f7 | 13 | SHA1 (patch-Modules___ssl.c) = f241ba148e4c244a641386be5ac07817b03f04f7 | |
14 | SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567 | 14 | SHA1 (patch-Modules_makesetup) = a06786eebffadecedba5e3a50a9785fb47613567 | |
15 | SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d | 15 | SHA1 (patch-Modules_nismodule.c) = 1bafe9b06359586d027a77011b103877590d947d | |
16 | SHA1 (patch-Modules_socketmodule.c) = 98882462db1b1fe3141219206980aa9ae56ffce2 | 16 | SHA1 (patch-Modules_socketmodule.c) = 98882462db1b1fe3141219206980aa9ae56ffce2 | |
17 | SHA1 (patch-Modules_socketmodule.h) = 8761c7238bc74e45adefb6e647dc3b39b7bdd81c | 17 | SHA1 (patch-Modules_socketmodule.h) = 8761c7238bc74e45adefb6e647dc3b39b7bdd81c | |
18 | SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be | 18 | SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be | |
19 | SHA1 (patch-configure) = d44439b22e8444141e2632b9fd9b1f343b38b712 | 19 | SHA1 (patch-configure) = d44439b22e8444141e2632b9fd9b1f343b38b712 | |
20 | SHA1 (patch-pyconfig.h.in) = 2f06af7358690b46eaff404226b898962b049a0e | 20 | SHA1 (patch-pyconfig.h.in) = 2f06af7358690b46eaff404226b898962b049a0e | |
21 | SHA1 (patch-setup.py) = 7bb1307806954f65c9e21d376f28554501f658ac | 21 | SHA1 (patch-setup.py) = 58cb7c277962a89586631f8f2c953e451537690a |
@@ -1,29 +1,29 @@ | @@ -1,29 +1,29 @@ | |||
1 | $NetBSD: patch-setup.py,v 1.6 2022/01/11 15:13:20 tnn Exp $ | 1 | $NetBSD: patch-setup.py,v 1.7 2022/01/14 10:32:28 tnn Exp $ | |
2 | 2 | |||
3 | Disable certain modules, so they can be built as separate packages. | 3 | Disable certain modules, so they can be built as separate packages. | |
4 | Do not look for ncursesw. | 4 | Do not look for ncursesw. | |
5 | Assume panel_library is correct; this is a fix for ncurses' gnupanel | 5 | Assume panel_library is correct; this is a fix for ncurses' gnupanel | |
6 | which will get transformed to panel in buildlink. | 6 | which will get transformed to panel in buildlink. | |
7 | Don't search for modules in PREFIX. Fixes build failure when py-setuptools | 7 | Don't search for modules in PREFIX. Fixes build failure when py-setuptools | |
8 | are installed. | 8 | are installed. | |
9 | 9 | |||
10 | --- setup.py.orig 2021-11-15 17:43:00.000000000 +0000 | 10 | --- setup.py.orig 2021-11-15 17:43:00.000000000 +0000 | |
11 | +++ setup.py | 11 | +++ setup.py | |
12 | @@ -11,6 +11,7 @@ import sysconfig | 12 | @@ -11,6 +11,7 @@ import sysconfig | |
13 | from glob import glob, escape | 13 | from glob import glob, escape | |
14 | import _osx_support | 14 | import _osx_support | |
15 | 15 | |||
16 | +sys.path = [p for p in sys.path if not re.compile('^' + sys.base_prefix).match(p)] | 16 | +sys.path = [p for p in sys.path if not re.compile('^' + sys.base_prefix + '/').match(p)] | |
17 | 17 | |||
18 | try: | 18 | try: | |
19 | import subprocess | 19 | import subprocess | |
20 | @@ -30,7 +31,7 @@ except ImportError: | 20 | @@ -30,7 +31,7 @@ except ImportError: | |
21 | SUBPROCESS_BOOTSTRAP = True | 21 | SUBPROCESS_BOOTSTRAP = True | |
22 | 22 | |||
23 | 23 | |||
24 | -from distutils import log | 24 | -from distutils import log | |
25 | +from distutils import log, text_file | 25 | +from distutils import log, text_file | |
26 | from distutils.command.build_ext import build_ext | 26 | from distutils.command.build_ext import build_ext | |
27 | from distutils.command.build_scripts import build_scripts | 27 | from distutils.command.build_scripts import build_scripts | |
28 | from distutils.command.install import install | 28 | from distutils.command.install import install | |
29 | @@ -44,7 +45,7 @@ from distutils.spawn import find_executa | 29 | @@ -44,7 +45,7 @@ from distutils.spawn import find_executa |