Seems the PEP does only mandate for build environments that the PATH must contain an entry to the build dependencies scripts location.
This specification is sub-optimal for two reasons:
- at no point mandates that this entry must be the first entry on the PATH (so potentially a
shutil.whichcan pick up a different version than what the build frontend mandates, if an earlier entry on PATH contains that executable)
sysconfig.get_path('scripts')contract is now broken. This path should link to where the scripts for the python environment are installed, but this still returns the original caller python, not the isolated build environments scripts folder.
I think we should amend the PEP to fix both these issues.
[build-system] requires = ["setuptools >= 41"] build-backend = 'setuptools.build_meta'
import sysconfig raise RuntimeError(sysconfig.get_path('scripts')) # or import os raise RuntimeError(os.environ['PATH'])
virtualenv --clear --pip 21.1.3 venv ./venv/bin/pip install . ... raise RuntimeError(sysconfig.get_path('scripts')) RuntimeError: /Users/bgabor8/tmp/demo/venv/bin raise RuntimeError(os.environ['PATH']) RuntimeError: /private/var/folders/jh/kx1127wj32l8c3s97131rhmr0000gp/T/pip-build-env-3e4b4lsh/overlay/bin:/private/var/folders/jh/kx1127wj32l8c3s97131rhmr0000gp/T/pip-build-env-3e4b4lsh/normal/bin:/Users/bgabor8/.pyenv/bin:
IMHO we should fix the PEP and also amend pip to respect it.