pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: python39 fails to build (setuptools)
Hi,
none of my linux build hosts (Ubuntu 14.04/16.04/18.04, plus some even
older installations) succeeds in building python39-3.9.10 (last working
version was 3.9.9nb2).
They all fail for missing "subprocess" module:
--- sharedmods ---
LD_LIBRARY_PATH=/opt/pkgsrc/work/pkgsrc/lang/python39/default/Python-3.9.10 CC='cc -pthread' LDSHARED='cc -pthread -shared -L. -L/opt/pkgsrc/lib -Wl,--enable-new-dtags,-R/opt/pkgsrc/lib -L/opt/pkgsrc/lib -Wl,--enable-new-dtags,-R/opt/pkgsrc/lib ' OPT='-DNDEBUG -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -I/opt/pkgsrc/include -I/opt/pkgsrc/include/ncurses -I/opt/pkgsrc/include/db4' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python -E ./setup.py build
Traceback (most recent call last):
File "/opt/pkgsrc/work/pkgsrc/lang/python39/default/Python-3.9.10/./setup.py", line 17, in <module>
import subprocess
ModuleNotFoundError: No module named 'subprocess'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/pkgsrc/work/pkgsrc/lang/python39/default/Python-3.9.10/./setup.py", line 28, in <module>
import _bootsubprocess
ModuleNotFoundError: No module named '_bootsubprocess'
*** [sharedmods] Error code 1
But there are
/opt/pkgsrc/work/pkgsrc/lang/python39/default/Python-3.9.10/Lib/subprocess.py
/opt/pkgsrc/work/pkgsrc/lang/python39/default/Python-3.9.10/Lib/asyncio/subprocess.py
Any ideas?
Regards
Matthias Ferdinand
On Mon, Jan 10, 2022 at 10:24:28PM +0100, Tobias Nygren wrote:
> On Mon, 10 Jan 2022 15:07:12 -0500
> Greg Troxel <gdt%lexort.com@localhost> wrote:
>
> > >> File "/tmp/work/lang/python39/work/Python-3.9.9/Lib/zipfile.py", line 6, in <module>
> > >> import binascii
> > >> ModuleNotFoundError: No module named 'binascii'
> > >
> > > Do you have the environment variable PYTHONHOME or PYTHONPATH set?
> >
> > Great question; I didn't think of that. But no, I do not.
>
> Not really sure what recent change caused this behaviour to emerge.
> But I created this workaround.
> Is this change OK? I don't really have much python clue.
>
> RCS file: /cvsroot/pkgsrc/lang/python39/patches/patch-setup.py,v
> retrieving revision 1.5
> diff -p -u -r1.5 patch-setup.py
> --- patches/patch-setup.py 6 Nov 2021 12:24:35 -0000 1.5
> +++ patches/patch-setup.py 10 Jan 2022 21:20:27 -0000
> @@ -5,9 +5,17 @@ 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.
>
> ---- 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
>
> (rest of patch context omitted, apply it manually ...)
Home |
Main Index |
Thread Index |
Old Index