best-motherboard-49373
07/28/2022, 1:13 PM./pants generate-lockfiles ...
However when I try to use a tool that relies on a default lockfile, I get this error:
(in this particular case I was running ./pants package
against a python_distribution
target)
13:07:24.22 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Building build_backend.pex from setuptools_default.lock' failed with exit code 1.
stdout:
...
pex.result.ResultError: There were 2 errors downloading required artifacts:
1. setuptools 57.5 from <https://files.pythonhosted.org/packages/4b/b9/71687c5d2034c863db1db2e0704f5e27581ff3cb44d7f293968c5e08ceb3/setuptools-57.5.0-py3-none-any>.
whl
<urlopen error [Errno 101] Network is unreachable>
2. wheel 0.37.1 from <https://files.pythonhosted.org/packages/27/d6/003e593296a85fd6ed616ed962795b2f87709c3eee2bca4f6d0fe55c6d00/wheel-0.37.1-py2.py3-none-any.whl>
<urlopen error [Errno 101] Network is unreachable>
As it tries to download from https://files.pythonhosted.org it's clear that the resolve doesn't honor the internal package index.
I've tried adding the following to my pants.toml
config with no luck:
[python-repos]
indexes = [
"<http://devpi.company.internal/root/+simple/>",
]
[subprocess-environment]
env_vars.add = [
"PIP_INDEX_URL=devpi.company.internal/root/+simple/,
"PIP_TRUSTED_HOST=devpi.company.internal",
]
Could you maybe point me in some direction where the problem may happen? Thanks very much in advance!enough-analyst-54434
07/28/2022, 2:34 PMlockfile
path configuration added. You'll need to do that for all tools you use and then ./pants generate-lockfiles
and then commit all the new lockfiles to your repo.best-motherboard-49373
07/28/2022, 3:57 PMenough-analyst-54434
07/28/2022, 4:19 PMenough-analyst-54434
07/28/2022, 4:20 PMenough-analyst-54434
07/28/2022, 4:35 PM[subprocess-environment]
configuration you added if that was just to try to work around default lock file issues. Pants / Pex won't use Pip environment variables.best-motherboard-49373
07/29/2022, 10:55 AM