-
Notifications
You must be signed in to change notification settings - Fork 3k
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
On install, add a pep517 backend agnostic and documented option to set a build directory #12461
Comments
This might not be the right place for the issue since pip vendors |
To be clear, pip expects to write temporary files into the In spite of appearances, there has never been an option in pip to set the build directory in a build backend independent way. Instead, prior to If you are looking for a backend-agnostic way of doing this, you'll need to get agreement that all build backends will support a common option. This would probably be a specific setting in the So to summarise:
Hope this helps, and sorry if it's not as simple as you were hoping for. |
Thanks @webknjaz and @pfmoore for your detailed answer. The TMPDIR environment variable seems to work for us (we don't have "no space left on device" errors anymore). I'll have a look at the PEP process, but I'm not quite sure I've the ressources (time and motivation) to lead it. In the meantime, would it be possible to add a section in the pip documentation about this caveat and the associated workaround ? |
Honestly, if setting
It's mentioned in the changelog entry deprecating |
Hi @pfmoore , I'll think about what could be written in the documentation to improve this point. |
Related discussion: pypa/build#655. |
Pip does not seem respect It's not immediately clear to my why this is. Pip appears to be using EDIT: Now it's obvious why it didn't work. It falls back to /tmp if the specified directory does not exist instead of erroring or creating it. It looks like everything works fine if the directory exists. |
Should this issue be turned into "warn if the tmp dir does not exist and a fallback is used"? |
A warning and/or documentation about this would be helpful |
Description
In the past, there was an option to set the build directory to any directory. This option allowed us to avoid a "no space left on device" error when the /tmp directory was too small for large builds.
Now that this option has disappeared with the PEP517 build backends, there seems to be no consistent way to set this option.
Since the goal of PEP517 was to abstract the build backend, when we install a new package, we don't know which build backend that package will use. So setting an equivalent option for every build backend we could find is not a scalable answer.
How can I set this option for each backend once and for all?
Expected behavior
A documented option that tells pip where any build operation can take place, no matter what the build backend is. An implementation of this option where the provided place is used for builds operations.
pip version
23.3.2
Python version
3.8
OS
Linux
How to Reproduce
pip install --build-directory /tmp requests
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: