TritonDataCenter / pkgsrc

NetBSD/pkgsrc fork for our binary package repositories
https://pkgsrc.smartos.org/
131 stars 51 forks source link

pip 23.0.1 install works, but can't install anything with build requirements #357

Closed gaige closed 1 year ago

gaige commented 1 year ago

Due to changes in the src/pip/_internal/build_env.py handling, the installed patches from patches/patch-src_pip___internal_build__env.py now cause a runtime error due to get_paths() no longer being imported in the installed version of that file.

Either the patch needs to be removed (unclear if this will do what we want based on cursory testing and looking at the rationale behind the removement in the source), or the patch needs to be modified to add

from sysconfig import get_paths

back in. This is related to changes in https://github.com/pypa/pip/commit/da478818c1c1d45770487f4346351413d92f61c9 which moved to using src/pip/_internal/locations/_sysconfig.py to find paths. Removing the _distutils_system_mod.py from my local system, uninstalling the pkgsrc pip and installing pip directly using ensurepip seems to work correctly even with multiple versions of python on my system (3.9 and 3.10 tests).

If this others can confirm this new code works for smartos as well, it looks like we could just remove the patch entirely.

jperkin commented 1 year ago

@0-wiz-0 any input?

0-wiz-0 commented 1 year ago

I've fixed this in upstream pkgsrc by adding theimport. Thanks, @gaige !

jperkin commented 1 year ago

Fixed versions from @0-wiz-0 are now available in trunk, thanks!