but also wondering whether other folks have strate...
# development
w
but also wondering whether other folks have strategies for passing through their settings for configuring python interpreters. i have:
Copy code
$ cat ~/.pants.rc
[python-setup]
# Avoid system python.
interpreter_search_paths = ["<PYENV>"]
…which works for the outer run, but which is currently (intentionally) disabled in inner/test runs
new thread for that
h
on my M1, I update the specific test itself to set interpreter constraints such that Py39 is chosen 😕
./pants test ::
does not work on my mac
w
mm. ok. yea, we should maybe agree on a convention for choosing our interpreters in the pantsbuild/pants repo, and then ensure that it is passed through to tests.
@enough-analyst-54434: do you have a strategy for setting interpreter constraints / search path locally?
e
I dont use macOS
I don't have to do any shenanigans
Someday when I actually have to write macOS software, I'll use macOS.
w
yea. so you just don’t have any python installs on your box that you wouldn’t want Pants to discover and use.
e
I have maybe 25 installs?
I don't pay any mind to Pants
I have lots of CPython 2.7, 3.5, ... 3.9, 3.10a PyPy ...
To be fair, if I were on a Debian distro, I could have similar problems. Since they do the weird packaging where installing python with their package manager doesn't install the whole thing and you need to also install the venv module and ... etc.
w
would you be opposed to agreeing on a convention for how we bust a hole through to the integration tests?
e
I'm unaffected so have at it
w
the thing that off the cuff seems like it would have the minimum impact would be to add
PANTS_PYTHON_SETUP_INTERPRETER_SEARCH_PATHS
here: https://github.com/pantsbuild/pants/blob/bbeffb47cc697e6e15f4cc615f24be4efc9795b8/pants.toml#L156-L166 … and then ensure that that is actually consumed in the relevant spots in tests.
👍 1
e
I think you all are crazy for using macOS, but that sounds reasonable.
w
would mean moving away from using
~/.pants.rc
for me… would maybe set it in
~/.profile
instead.
e
Couldn't you also set this in ~/.pants.rc mod bugs in how we handle lists and multiple config files?
w
we could. but there is potential collateral damage to applying the entire
.pants.rc
file to tests if someone puts any other setting in there
👍 1
e
Aha - ok this is down to
pant_run
usage and we
--no-pantsrc
there. That makes sense. Env var sounds right.
w
yea. that and any
OptionsBootstrappers
that are created in the
RuleRunner
and elsewhere
sooo, that interpreter is not broken. @hundreds-father-404: i can spend a bit more time on this to help with filtering for you if need be? but i can also post a draft if you want to run with it
h
Sure on posting a draft, it's okay to not spend more time on this. I've made do and I use devbox for most testing now