hitting an odd pypi/pex building error today a lot...
# general
f
hitting an odd pypi/pex building error today a lot:
Copy code
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants.testutil<2.15,>=2.14.0a0
ERROR: No matching distribution found for pantsbuild.pants.testutil<2.15,>=2.14.0a0
seems like there are definitely distributions that match that
1
Copy code
pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir /var/tmp/jreed-cache/pants/named_caches/pex_root/pip_cache --log /tmp/pants-sandbox-Fwz8wv/.tmp/pex-pip-log.htwg117p/pip.log download --dest /var/tmp/jreed-cache/pants/named_caches/pex_root/downloads/resolver_download.1jau8_hg/usr.bin.python3.10 pantsbuild.pants.testutil<2.15,>=2.14.0a0 pantsbuild.pants<2.15,>=2.14.0a0 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15
e
I may be blind but I see 0 constraint of which Python (via --python or ICs or anything). Is
pex
installed in a venv that uses the interpreter you want? (I.E.: CPython 3.{7,8,9} - since its Pants and Pants requires those?
Oh, this is Pants log output I think. Yeah - so do you have Pants configured for this target / resolve / what have you to restrict to 3.{7,8,9} or narrower?
Is this a lock process or something else?
Basically full data always is very good for remote debug. Full command line, full output, Pants version.
IOW: Totally not odd if your Python is 3.10.
f
ah that's it... it's probably trying python 3.10
that is it... but is there an easy way to set the interpreter_constraints for a whole tree?
doing this for in-repo plugins that need to be py 3.9, whereas most of my code is py 3.10
c
something like:
Copy code
# some/tree/BUILD
__defaults__({python_sources: {"interpreter_constraints": ...}})
f
is that in 2.14?
c
oh… don’t recall, but might be.
f
Awesome! that seems to do the trick
👍 1