https://pantsbuild.org/ logo
#development
Title
# development
w

witty-crayon-22786

06/15/2021, 5:11 PM
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

hundreds-father-404

06/15/2021, 5:12 PM
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

witty-crayon-22786

06/15/2021, 5:13 PM
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

enough-analyst-54434

06/15/2021, 5:14 PM
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

witty-crayon-22786

06/15/2021, 5:15 PM
yea. so you just don’t have any python installs on your box that you wouldn’t want Pants to discover and use.
e

enough-analyst-54434

06/15/2021, 5:15 PM
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

witty-crayon-22786

06/15/2021, 5:19 PM
would you be opposed to agreeing on a convention for how we bust a hole through to the integration tests?
e

enough-analyst-54434

06/15/2021, 5:19 PM
I'm unaffected so have at it
w

witty-crayon-22786

06/15/2021, 5:23 PM
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

enough-analyst-54434

06/15/2021, 5:24 PM
I think you all are crazy for using macOS, but that sounds reasonable.
w

witty-crayon-22786

06/15/2021, 5:24 PM
would mean moving away from using
~/.pants.rc
for me… would maybe set it in
~/.profile
instead.
e

enough-analyst-54434

06/15/2021, 5:25 PM
Couldn't you also set this in ~/.pants.rc mod bugs in how we handle lists and multiple config files?
w

witty-crayon-22786

06/15/2021, 5:26 PM
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

enough-analyst-54434

06/15/2021, 5:28 PM
Aha - ok this is down to
pant_run
usage and we
--no-pantsrc
there. That makes sense. Env var sounds right.
w

witty-crayon-22786

06/15/2021, 5:31 PM
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

hundreds-father-404

06/15/2021, 6:15 PM
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