Open sumpfralle opened 2 days ago
That doesn't exist on Windows
Indeed. This is also mentioned in PEP-394:
This PEP deliberately excludes any proposals relating to Microsoft Windows [..]
In light of this detail, I would suggest the following:
python3
over python
) in system_python
is still validpython
with python3
should be replaced with a global default value, I guess (based on the operating system: either python
or python3
) Does that sound reasonable to you? If yes, then I could implement (B) within this PR.
Previously hatch used
python
as the default name of the interpreter. This was not in line with PEP-394 [1], sincepython
is still allowed to point to a Python 2.x interpreter. PEP-394 recommends to usepython3
in a system context andpython
in the context of a virtual environment.This change should not affect existing setups, since
python3
is expected to exist under all circumstances (according to PEP-394).The change will relieve users from the burden of adding
python = /usr/bin/python3
to their environment configuration for hatch in order to support setups, where a Python 2.x interpreter is reachable viapython
(as specified in PEP-394).The other occurrences of
python
within hatch's code seem to be used within virtual environments (i.e.python
is suitable here).See #583
See #1820
[1] https://peps.python.org/pep-0394/