Trying to run mypy check using pants and keep gett...
# general
r
Trying to run mypy check using pants and keep getting error.
Copy code
./pants check ::
17:54:35.26 [INFO] Canceled: Building mypy.pex from build-support/mypy.lock
17:54:35.32 [INFO] Canceled: Building mypy.pex from build-support/mypy.lock
17:54:37.08 [INFO] Completed: Building 1 requirement for requirements.pex from the 3rdparty/pyfleet.lock resolve: pantsbuild.pants<2.12,>=2.11.0rc0
17:54:37.09 [ERROR] 1 Exception encountered:

  ProcessExecutionFailure: Process 'Building 1 requirement for requirements.pex from the 3rdparty/pyfleet.lock resolve: pantsbuild.pants<2.12,>=2.11.0rc0' failed with exit code 1.
stdout:

stderr:
There was 1 error downloading required artifacts:
1. setproctitle 1.2.2 from <https://files.pythonhosted.org/packages/a1/7f/a1d4f4c7b66f0fc02f35dc5c85f45a8b4e4a7988357a29e61c14e725ef86/setproctitle-1.2.2.tar.gz>
    ERROR: Command errored out with exit status 1: /Users/developer/.cache/pants/named_caches/pex_root/venvs/008c64f21ce36f2b42b7928cb66e6a3b026f0faa/816ff328f262312cad53dad9c61f0689cbdfaad3/bin/python3.9 /Users/developer/.cache/pants/named_caches/pex_root/venvs/008c64f21ce36f2b42b7928cb66e6a3b026f0faa/816ff328f262312cad53dad9c61f0689cbdfaad3/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /Users/developer/.cache/pants/named_caches/pex_root/pip_cache/.tmp/pip-build-env-78x97vx9/overlay --no-warn-script-location --no-binary :none: --only-binary :none: --no-index -- 'setuptools>=40.8.0' wheel Check the logs for full command output.



Use `--no-process-cleanup` to preserve process chroots for inspection.

17:54:37.09 [INFO] Canceled: Building 5 requirements for requirements.pex from the 3rdparty/pyfleet_etl.lock resolve: awswrangler<3.0.0,>=2.12.1, environs<10.0.0,>=9.3.2, mygeotab<0.9.0,>=0.8.6, pandas<2.0.0,>=1.3.0, pymsteams<0.... (12 characters truncated)
17:54:37.09 [INFO] Canceled: Building mypy.pex from build-support/mypy.lock
h
What is
pyfleet.lock
, and why does it have
pantsbuild.pants<2.12,>=2.11.0rc0
as a requiremen? That's unusual.
r
It’s my default resolve/lockfile. I’m using pants 2.11.1rc2 and a pex == v2.1.93
I think the issue is there is no mac wheel for setproctitle 1.2.2 https://pypi.org/project/setproctitle/1.2.2/#files
Sorry I should have added i am on macos
h
Why is Pants in the lockfile at all?
Oh, plugins?
Weird that there is no macos wheel, but pants evidently works with the dep, in general, so I'm not sure what is going on
are you resolving binary-only?
doesn't look like it
r
Yeah I've some plugin
h
This is probably unrelated, but you almost certainly want to pin pantsbuild.pants to the exact version you're using in pants.toml (i.e.,
pantsbuild.pants==2.11.0rc2
instead of
pantsbuild.pants<2.12,>=2.11.0rc0
)
Also, any reason not to use
2.11.0
?
FWIW I have no problem doing
pip install "pantsbuild.pants<2.12,>=2.11.0rc0"
on my macbook - pip will build the setproctitle wheel
Are you able to run that in a standalone venv?
r
I feel like this is because of using a lockfile. If I would directly install using pip, it will build the wheel. But somehow once pex has generated the lockfile, it won’t generate the missing wheel.
As far as using
2.11.0
goes, I think there was some feature which made me switch to 2.11.1rc2. I would soon update to 2.12.0 but I am not sure that would fix this issue.
I just ignored all the plugin stuff and it works