-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
no-cache-dir is not respected for deps that require building #12031
Comments
Try adding Maybe |
@pfmoore No change. |
I simplified the example. Install psutil alone reproduces the issue. |
Did you delete the files in If you add Otherwise, I'm out of ideas. |
I'm running in docker, and did not run pip before. I also verified that there is no |
apk is alpine's package manager. It installs the build dependencies for psutil. |
I tried reproducing this.
OK, that's nothing like what you show. Please provide a reproducible test case starting from a vanilla docker image that I can use, and I'll try to reproduce. Just in case, I tried running |
The base image is |
Quick correction - On doing some more digging, I did find a And if you set the pip options via environment variables:
you will indeed not get a Just as a gentle reminder, please don't assume any particular knowledge on the part of people trying to help with your issue. For example, I know almost nothing about Linux, I'm a Windows developer, and it took me a while to realise I needed to use the Anyway, it looks like your solution is to set the options via the environment and that will do what you need. Hope that helps. |
@pfmoore Thank you, I'll try to provide complete reproduction steps next time. Regarding you solution, looks like
|
No problem - your instructions were sufficient in practice, so it’s fine. The reason is that when building, pip creates a separate “build environment”, and does the build in that. To do the build it needs to install the tools needed for your build, such as setuptools and wheel. Pip runs itself in a subprocess to do that, and it’s that second copy of pip that doesn’t get the |
How hard will it be to pass it on to the subprocess? Regarding the workaround, I applied it, and also suggested it upstream: docker-library/python#831. |
There's code that passes other flags on, so it's probably not too hard to add this flag (but the details may be fiddly - presumably we would also need to handle As with most things, PRs are welcome (and we can deal with the tricky edge cases, if any, in the PR) 🙂 |
Description
I'm running on alpine:
Expected behavior
There should be no cache at all
pip version
23.1.2
Python version
3.11.3
OS
alpine
How to Reproduce
See description.
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: