Hello, Wojtek Kosior <[email protected]> writes:
>> > I just saw this message and hurried myself up to test the patch to >> > python-build-system that I made. Unfortunately, it turns out the >> > "PYTHONNOUSERSITE=1" env var breaks pip which tries to install wheels to >> > the system site directory and fails due to a read-only filesystem. >> >> I'm not sure I follow; why would PYTHONNOUSERSITE affect pip? I thought >> it should only appear in wrappers of Python executables, not be set in a >> profile's environment (thus not affecting pip) ? > > Indeed. And once I make my change, PYTHONNOUSERSITE gets also placed in > the wrapper of the `pip` executable. > >> Could you share the diff of the patch you tried so far? > > I am attaching the patch file. > > I was trying to test with > > ./pre-inst-env guix shell -C --network --no-cwd python-xmldiff coreutils > python-pip > pip install xmldiff==2.4 > echo > ~/.local/lib/python3.10/site-packages/xmldiff/main.py > xmldiff --help > > Without my patch, we get an error on 4th line. With my patch, we get > the "Read-only file system" error on the 2nd line Neat! I think maybe we could add a build argument called e.g. '#:honor-user-site?' to disable the having PYTHONNOUSERSITE=1 in the wrapper for a few select packages (e.g. pip, virtualenv, probably a few others that are expected to work with or honor pip user-installed Python packages). -- Thanks, Maxim
