Skip to content

Commit

Permalink
Discover ASDF interpreters by default (#20105)
Browse files Browse the repository at this point in the history
I struggled for a while to debug the error messages I was getting from
pants (via pex), but it was ultimately because I had not added `<ASDF>`
to the search-path.

`["<PYENV>", "<PATH>"]` only puts the asdf shims on the path, and they
are powerless without the `.tool-versions`. It took me a long while to
understand what was happening because even in the sandbox it _looked_
like the asdf pythons should be findable.

In the spirit of making pants "just work" more often, and given the fair
popularity of asdf, should we support asdf by default?

---------

Co-authored-by: Benjy Weinberger <[email protected]>
Co-authored-by: Andreas Stenius <[email protected]>
  • Loading branch information
3 people authored Oct 31, 2023
1 parent 7b8ad14 commit e43dcfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/pants/core/subsystems/python_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class PythonBootstrapSubsystem(Subsystem):

class EnvironmentAware(Subsystem.EnvironmentAware):
search_path = StrListOption(
default=["<PYENV>", "<PATH>"],
default=["<PYENV>", AsdfPathString.STANDARD.value, "<PATH>"],
help=softwrap(
f"""
A list of paths to search for Python interpreters.
Expand Down

0 comments on commit e43dcfe

Please sign in to comment.