steep-waitress-5364108/17/2021, 4:04 PM
witty-crayon-2278608/17/2021, 4:25 PM
fresh-cat-9082708/17/2021, 4:33 PM
for Linux CI
[python-setup] # Python that is guaranteed to be present on a MacOS device having XCode installed interpreter_search_paths = ["/usr/bin"]
but we are somewhat lucky because developers need to have XCode installed so we know they will have Python 3.8 shim.
[python-setup] # the Python versions of interest are assumed to be on the $PATH in Linux CI interpreter_search_paths.add = ["<PATH>"]
provides a connection to the actual Python interpreter accessible at
. This means we can avoid situations when developers have other Python environments (of arbitrary Python versions) that may take priority. Relying on homebrew’s Python is a path I would not suggest taking given how easy things break upon
is nice, but we can’t enforce it for every developer. So the XCode’s Python seemed like a good compromise.
witty-crayon-2278608/17/2021, 4:35 PM
Theit’s possible to enforce it by setting your search path such that only pyenv interpreters are used. but yea, it can be extra steps.is nice, but we can’t enforce it for every developer.
fresh-cat-9082708/17/2021, 4:37 PM
— an external thing is less appealing when you have a built-in XCode’s one 🙂
such that only pyenv interpreters are usedthis could also be a source of confusion when people have all kinds of Python versions when running Pants, it’s nice when there is just one Python to rule them all 😉
witty-crayon-2278608/17/2021, 4:39 PM
to match the particular python, and a search path.
fresh-cat-9082708/17/2021, 4:44 PM
with the “use system Python”: someone on an older/newer machine will not get your one Python to rule them allOh sorry, I wasn’t clear perhaps — it’s not the Python that comes with the Mac, but rather the one that gets installed when one installs XCode. If my research was comprehensive, one is safe on Python 3.8.x with XCode 12. So if you are on XCode 12, which you need to have installed, then you are fine. Once we update the XCode across the whole fleet of machines, then it will be 3.9.x, for instance (but this is something we can control and can happen once a year for instance)
steep-waitress-5364108/17/2021, 4:45 PM
fresh-cat-9082708/17/2021, 4:49 PM
steep-waitress-5364108/17/2021, 4:57 PM
witty-crayon-2278608/17/2021, 5:10 PM
file: i use:
$ cat ~/.pants.rc [python-setup] # Avoid system python. interpreter_search_paths = ["<PYENV>"]
steep-waitress-5364108/17/2021, 5:22 PM
powerful-boots-123408/18/2021, 3:24 PM