sysconfig.get_path
points to venv path when in build-isolation
#12976
Labels
sysconfig.get_path
points to venv path when in build-isolation
#12976
Description
This is an issue we've found in
scikit-build-core
1 with @henryiii , where we were printingsysconfig.get_path("purelib")
from withinscikit-build-core
scripts, which should be running within the build issolated environment. When running within build-isolation withpip
installed in avenv
then it points to the venv'ssite-packages
folder. But when I run it indirectly withpython3 -m build
or usingup pip install
then it points to the correct build-isolation path only.Expected behavior
sysconfig.get_path("purelib")
should be printing the build-isolated site-packages: e.g./tmp/build-env-z0u0zzpr/lib/python3.13/site-packages
pip version
24.2
Python version
3.x
OS
Fedora 41
How to Reproduce
Get any project that uses
scikit-build-core
and then try to build with verbose options to show the debug message:Output
Incorrect output:
Correct output (slightly altered to print more debug information):
The relevant debug statements there are found at:
https://github.com/scikit-build/scikit-build-core/blob/f0ae31922ff802b179fce3327a9c93ff65934a23/src/scikit_build_core/builder/builder.py#L150-L157
Code of Conduct
Footnotes
https://github.com/scikit-build/scikit-build-core/pull/880#discussion_r1747646118 ↩
The text was updated successfully, but these errors were encountered: