-
-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building Python AUR packages inside a virtualenv will install files inside the virtualenv #76
Comments
I know this is a little old now but if you're still interested, does it happen with makepkg? and does it still happen with yay? I've never used virtualenv so I have no idea how it works or affects things. |
Thanks for replying. Basically most of what virtualenv does is set some environment variables when it is activated. The most notable thing that it does is appending the Python's virtualenv into PATH. Once pip (Python's package manager) is called, it installs packages into the virtualenv's directory. virtualenv is activated by This seems to happen with makepkg as well, so this probably isn't yay's fault. However, pacaur seems to do something to overcome it, I'm just not sure what. Perhaps it's building as a different user, or perhaps it makes sure that its sub processes do not inherit their parent's environment variables. Reproduction: python3 -m venv /tmp/env
source /tmp/env/bin/activate
which python # Should be /tmp/env/bin/python
yay -S python-infinity # Or makepkg -si
pacman -Ql python-infinity # Files will be installed in /tmp/env |
That's strange, if it's a makepkg problem then I guess it's not a Yay bug but if Pacaur can handle it then we could too. |
I tested it just now and it installs on /tmp in Yay, Pacaur and makekg. Did you forget to run pacaur in env? |
Well, that's embarrassing. It turns our that the packages that I tested were already in pacaur's Now I'm not really sure what to ask, as it seems that no other package manager overcomes this |
I think its either an error with the pkgbuild or upstream and not really anything makepkg should support. My guess is the package finds the python path and installs there. Normally it would detect the dir to be Hopefully that can be fixed easily by adding some sort of flag This works, builds inside env, packages outside env. #Enter virtualenv
makepkg --noarchive
#Exit virtualenv
makepkg --repackage |
I ran
yay -S python-pgspecial
when inside a virtual environment in/tmp/virtualenv
. After the installation was complete I ranyay -Ql python-pgspecial
to see that the files were installed inside the virtualenv:The text was updated successfully, but these errors were encountered: