You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Controlling location of isolated build environments? #655
@uranusjr I don't recall the original impetus for my request. I think I was having trouble with filesystem permissions in a restricted environment. It would also be useful in a variety of scenarios like inspecting the results of a failed build.
I think I had tried changing TMPDIR and found that it had no effect, but this was months ago and I don't actually remember. If TMPDIR is meant to work for this purpose, that would probably be fine for anything I'd need.
FWIW we're running into another use case for this, which is when the build process involves complex compilation steps and we would like them cached. We use sccache for this purpose, but if the paths to files changes sccache will view that as a new file and every compilation will be a cache miss. That means that we cannot rely on caching the build results of any artifacts that includes objects from the build environment in the compile line because the path to that environment is not stable.
Reacted by James Lamb, Bradley Dice and Agriya Khetarpal
@layday I think some envs may have restricted/read-only file system with only a small portion being read-write. This is often the case with containers.
Activity
[-]Controlling location of isolated build environments[/-][+]Controlling location of isolated build environments?[/+]uranusjr commentedon Aug 16, 2023
What is the reason behind this request? Is it so you can use the environment for other purposes? What are they?
webknjaz commentedon Jan 9, 2024
Related discussion: pypa/pip#12461. A workaround could be to use the standard env vars
TEMP,TMP,TMPDIR.gwerbin commentedon Jan 10, 2024
@uranusjr I don't recall the original impetus for my request. I think I was having trouble with filesystem permissions in a restricted environment. It would also be useful in a variety of scenarios like inspecting the results of a failed build.
I think I had tried changing
TMPDIRand found that it had no effect, but this was months ago and I don't actually remember. IfTMPDIRis meant to work for this purpose, that would probably be fine for anything I'd need.vyasr commentedon Oct 14, 2024
FWIW we're running into another use case for this, which is when the build process involves complex compilation steps and we would like them cached. We use sccache for this purpose, but if the paths to files changes sccache will view that as a new file and every compilation will be a cache miss. That means that we cannot rely on caching the build results of any artifacts that includes objects from the build environment in the compile line because the path to that environment is not stable.
layday commentedon Oct 14, 2024
Is that because of where the sdist is expanded (#614) or do you actually need to control the location of a build's venv?
henryiii commentedon Oct 14, 2024
For compiled use case (like scikit-build-core and meson-python), it's the build venv.
webknjaz commentedon Oct 14, 2024
@layday I think some envs may have restricted/read-only file system with only a small portion being read-write. This is often the case with containers.
vyasr commentedon Oct 14, 2024
Yes, as Henry says it is the build environment for compiled use cases.
✨ feat(env): let users pin the build environment location
✨ feat(env): let users pin the build environment location
✨ feat(env): let users pin the build environment location
✨ feat(env): let users pin the build environment location
✨ feat(env): let users pin the build environment location
✨ feat(env): let users pin the build environment location
✨ feat(env): let users pin the build environment location
✨ feat(env): let users pin the build environment location
✨ feat(env): let users pin the build environment location