◐ Shell
clean mode source ↗

gh-92897: Ensure `venv --copies` respects source build property of the creating interpreter (GH-92899) by jkloth · Pull Request #92899 · python/cpython

There is a discrepancy between a symlink venv and a copied venv when determining whether the interpreter is considered to be from a source build. A symlink venv indicates True for sysconfig.is_python_build() whereas a copied venv returns False.

Since symlink venvs are the default for POSIX (where the majority of source builds would be used/tested), I have opted to use that behavior as correct. Windows users are far more likely to use the binary installer so odds of venvs being created from source builds are quite low. Likewise with venv --copies on POSIX.

These changes will allow for building extensions out of venvs created from source builds without any pre-configuration steps (see this section from pyperformance documentation).

Adding @zooba for Windows and @vsajip for venv