diff options
author | tnn <tnn@pkgsrc.org> | 2022-01-11 15:13:20 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2022-01-11 15:13:20 +0000 |
commit | 0957c5878e94bd9fda835c823ba25ad81df388db (patch) | |
tree | 83fbbd4cba8697c775b5898555b0a99ac138f158 /lang/python39 | |
parent | 40572c6793007185a1f8556d4446da02a5cec39d (diff) | |
download | pkgsrc-0957c5878e94bd9fda835c823ba25ad81df388db.tar.gz |
python{39,310}: fix build failure when py-setuptools are installed already
Diffstat (limited to 'lang/python39')
-rw-r--r-- | lang/python39/distinfo | 4 | ||||
-rw-r--r-- | lang/python39/patches/patch-setup.py | 36 |
2 files changed, 25 insertions, 15 deletions
diff --git a/lang/python39/distinfo b/lang/python39/distinfo index f62f75744ae..df432c8a361 100644 --- a/lang/python39/distinfo +++ b/lang/python39/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.19 2021/12/06 16:36:15 wiz Exp $ +$NetBSD: distinfo,v 1.20 2022/01/11 15:13:20 tnn Exp $ BLAKE2s (Python-3.9.9.tar.xz) = bb0cf5c1cb3212d82b69ab4e965f03b77736610c84bd032f31a5debdd25e6a30 SHA512 (Python-3.9.9.tar.xz) = 0ab29fb9a7ecb808bd08d84d28908d5a934e0f021853da0f7a9c94670eb30c8dbbc233d461afdb3995b0de59275ef7e1de43e82d7f848802cbd6e6e50b7b25a6 @@ -19,4 +19,4 @@ SHA1 (patch-Modules_socketmodule.h) = 8761c7238bc74e45adefb6e647dc3b39b7bdd81c SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be SHA1 (patch-configure) = d44439b22e8444141e2632b9fd9b1f343b38b712 SHA1 (patch-pyconfig.h.in) = 2f06af7358690b46eaff404226b898962b049a0e -SHA1 (patch-setup.py) = 939e4e4f2641ca983b1f3c0328bd549ebf2b338a +SHA1 (patch-setup.py) = 7bb1307806954f65c9e21d376f28554501f658ac diff --git a/lang/python39/patches/patch-setup.py b/lang/python39/patches/patch-setup.py index 5f08d3b6aab..de99bb617d5 100644 --- a/lang/python39/patches/patch-setup.py +++ b/lang/python39/patches/patch-setup.py @@ -1,13 +1,23 @@ -$NetBSD: patch-setup.py,v 1.5 2021/11/06 12:24:35 adam Exp $ +$NetBSD: patch-setup.py,v 1.6 2022/01/11 15:13:20 tnn Exp $ Disable certain modules, so they can be built as separate packages. Do not look for ncursesw. Assume panel_library is correct; this is a fix for ncurses' gnupanel which will get transformed to panel in buildlink. +Don't search for modules in PREFIX. Fixes build failure when py-setuptools + are installed. ---- setup.py.orig 2021-11-05 19:21:41.000000000 +0000 +--- setup.py.orig 2021-11-15 17:43:00.000000000 +0000 +++ setup.py -@@ -30,7 +30,7 @@ except ImportError: +@@ -11,6 +11,7 @@ import sysconfig + from glob import glob, escape + import _osx_support + ++sys.path = [p for p in sys.path if not re.compile('^' + sys.base_prefix).match(p)] + + try: + import subprocess +@@ -30,7 +31,7 @@ except ImportError: SUBPROCESS_BOOTSTRAP = True @@ -16,7 +26,7 @@ which will get transformed to panel in buildlink. from distutils.command.build_ext import build_ext from distutils.command.build_scripts import build_scripts from distutils.command.install import install -@@ -44,7 +44,7 @@ from distutils.spawn import find_executa +@@ -44,7 +45,7 @@ from distutils.spawn import find_executa TEST_EXTENSIONS = True # This global variable is used to hold the list of modules to be disabled. @@ -25,7 +35,7 @@ which will get transformed to panel in buildlink. def get_platform(): -@@ -224,6 +224,16 @@ def grep_headers_for(function, headers): +@@ -224,6 +225,16 @@ def grep_headers_for(function, headers): return True return False @@ -42,7 +52,7 @@ which will get transformed to panel in buildlink. def find_file(filename, std_dirs, paths): """Searches for the directory where a given file is located, and returns a possibly-empty list of additional directories, or None -@@ -728,15 +738,15 @@ class PyBuildExt(build_ext): +@@ -728,15 +739,15 @@ class PyBuildExt(build_ext): add_dir_to_list(dir_list, directory) def configure_compiler(self): @@ -67,7 +77,7 @@ which will get transformed to panel in buildlink. self.add_multiarch_paths() self.add_ldflags_cppflags() -@@ -784,6 +794,9 @@ class PyBuildExt(build_ext): +@@ -784,6 +795,9 @@ class PyBuildExt(build_ext): self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32'] if MACOS: @@ -77,7 +87,7 @@ which will get transformed to panel in buildlink. # This should work on any unixy platform ;-) # If the user has bothered specifying additional -I and -L flags # in OPT and LDFLAGS we might as well use them here. -@@ -1001,8 +1014,6 @@ class PyBuildExt(build_ext): +@@ -1001,8 +1015,6 @@ class PyBuildExt(build_ext): # use the same library for the readline and curses modules. if 'curses' in readline_termcap_library: curses_library = readline_termcap_library @@ -86,7 +96,7 @@ which will get transformed to panel in buildlink. # Issue 36210: OSS provided ncurses does not link on AIX # Use IBM supplied 'curses' for successful build of _curses elif AIX and self.compiler.find_library_file(self.lib_dirs, 'curses'): -@@ -1104,8 +1115,7 @@ class PyBuildExt(build_ext): +@@ -1104,8 +1116,7 @@ class PyBuildExt(build_ext): # If the curses module is enabled, check for the panel module # _curses_panel needs some form of ncurses skip_curses_panel = True if AIX else False @@ -96,7 +106,7 @@ which will get transformed to panel in buildlink. self.add(Extension('_curses_panel', ['_curses_panel.c'], include_dirs=curses_includes, define_macros=curses_defines, -@@ -1356,6 +1366,31 @@ class PyBuildExt(build_ext): +@@ -1356,6 +1367,31 @@ class PyBuildExt(build_ext): dbm_order = ['gdbm'] # The standard Unix dbm module: if not CYGWIN: @@ -128,7 +138,7 @@ which will get transformed to panel in buildlink. config_args = [arg.strip("'") for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] dbm_args = [arg for arg in config_args -@@ -1367,7 +1402,7 @@ class PyBuildExt(build_ext): +@@ -1367,7 +1403,7 @@ class PyBuildExt(build_ext): dbmext = None for cand in dbm_order: if cand == "ndbm": @@ -137,7 +147,7 @@ which will get transformed to panel in buildlink. # Some systems have -lndbm, others have -lgdbm_compat, # others don't have either if self.compiler.find_library_file(self.lib_dirs, -@@ -2207,10 +2242,7 @@ class PyBuildExt(build_ext): +@@ -2207,10 +2243,7 @@ class PyBuildExt(build_ext): sources = ['_decimal/_decimal.c'] depends = ['_decimal/docstrings.h'] else: @@ -149,7 +159,7 @@ which will get transformed to panel in buildlink. libraries = ['m'] sources = [ '_decimal/_decimal.c', -@@ -2595,7 +2627,7 @@ def main(): +@@ -2595,7 +2628,7 @@ def main(): # If you change the scripts installed here, you also need to # check the PyBuildScripts command above, and change the links # created by the bininstall target in Makefile.pre.in |