-
Notifications
You must be signed in to change notification settings - Fork 444
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
pipx install fails when providing constraint file with hashes #712
Comments
Just a guess, but have you tried passing ‘—spec auditwheel==4.0.0 auditwheel’ to pipx? I am wondering if this is the issue (it’s not pinned with ==): pip install --constraint=constraints.txt auditwheel |
Looks like pypa/pip#9020 (comment) I think you’ll need to tell pipx to pass both pinned versions of auditwheel and pyelftools. Not sure how that can be done though. Is using |
the
|
“—spec” is the way to do that |
Adding constraints using Let's say I have N tools, a requirement.in with those N tools defined, use pip-tools to generate a single constraint file (I'd like to keep it that way - single file - unless there's some dependency issue to keep things simple) I could in theory just do (pseudo code):
spec doesn't allow to specify the version for dependencies does it ? |
Agreed that the pipx command is getting a little unwieldy at this point. You could script your tool to generate the pinned version and spec argument to the pipx command. What would your ideal api to pipx look like in this case? Automatically omit the package name if the requirements argument is passed? Or an additional pipx arg that says not to install the package/spec?
it doesn’t, but if the requirements file is passed I don’t think it needs to be. I think pip’s issue is that it’s getting an additional unpinned argument from pipx. |
IMHO, there's nothing to be done in pipx itself (or it would be an ugly workaround). Just reporting the issue here if someone hits it through pipx rather than pip. All will go well once pip is fixed so I would consider this issue to be a placeholder to track progress on pip issue resolution but |
Makes sense. So did the —spec argument work in the mean time? |
@uranusjr, I saw this one but it's closed and pypa/pip#9243 seems to be exactly what I'm hitting.
The current workaround is to not install through pipx for now. It's Ieft over code in manylinux with a single |
Sorry I was probably too brief. I was trying to suggest using |
here are the tests I did that do not work:
This last one is the same issue as pypa/pip#9243 This is what's working:
Those install much more packages than required in each venv. Each venv has the same packages but allows for indivudal upgrade/management. The size is not an issue for my use case where I hardlink everything I can afterwards. The time it takes is also contained for now because the tool list is small. It does not allow to pin the shared venv. |
Describe the bug
pipx install --pip-args=--constraint=constraints.txt auditwheel
fails whenconstraints.txt
uses hashes.This is most likely linked to pypa/pip#9243 but, as I saw the issue with pipx, I though I'd also report this here.
The use-case for this is to have some tools installed in a reproducible manner.
How to reproduce
Expected behavior
package installed properly, respecting constraints
The text was updated successfully, but these errors were encountered: