little-pilot-11155
02/27/2024, 11:36 PMpython-constraint==1.4.0
) and it fails.
23:00:27.47 [ERROR] 1 Exception encountered:
Engine traceback:
in select
..
in pants.core.goals.generate_lockfiles.generate_lockfiles_goal
`generate-lockfiles` goal
Traceback (most recent call last):
File "/user/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
res = rule.send(arg) if err is None else rule.throw(throw or err)
File "/user/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/core/goals/generate_lockfiles.py", line 558, in generate_lockfiles_goal
results = await MultiGet(
File "/user/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 358, in MultiGet
return await _MultiGet(tuple(__arg0))
File "/user/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 165, in __await__
result = yield self.gets
File "/user/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
res = rule.send(arg) if err is None else rule.throw(throw or err)
File "/user/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/backend/python/goals/lockfile.py", line 143, in generate_lockfile
result = await Get(
File "/user/.cache/nce/29319df9a6ca02e838617675b5b8dd7e5b18a393c27e74979823158b85c015d9/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 118, in __await__
result = yield self
pants.engine.process.ProcessExecutionFailure: Process 'Generate lockfile for python-default' failed with exit code 1.
stdout:
stderr:
Unexpected archive type for sdist /tmp/pants-sandbox-Cv5l3D/.tmp/tmpixn1tha1/user..python_global.bin.python3/python-constraint-1.4.0.tar.bz2
It works in 2.15.2
but stops working in 2.16+
(I tried 2.16.1
, 2.17.1
, 2.19.1rc0
). I can install it with pip just fine.
pip install python-constraint==1.4.0
Collecting python-constraint==1.4.0
Using cached python-constraint-1.4.0.tar.bz2 (18 kB)
Preparing metadata (setup.py) ... done
Installing collected packages: python-constraint
DEPRECATION: python-constraint is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at <https://github.com/pypa/pip/issues/8559>
Running setup.py install for python-constraint ... done
Successfully installed python-constraint-1.4.0
Very minimalistic Pants config:
[GLOBAL]
pants_version = "2.16.0"
backend_packages = [
"pants.backend.python",
]
[python]
interpreter_constraints = ["==3.9.*"]
enable_resolves = true
resolves_generate_lockfiles = true
[python.resolves]
python-default = "python-default.lock"
[source]
root_patterns = [
"/"
]
[anonymous-telemetry]
enabled = false
broad-processor-92400
02/28/2024, 12:13 AMpip install pex==2.1.134
pex3 lock create python-constraint==1.4.0
(I'm just guessing at the command Pants is running, you can confirm with https://www.pantsbuild.org/2.19/docs/using-pants/troubleshooting-common-issues#debug-tip-inspect-the-sandbox-with---keep-sandboxes )
If you can reproduce it outside of Pants, then I'd suggest filing a bug against PEX. If you can bisect which pex version introduced the regression that'd be even better šbroad-processor-92400
02/28/2024, 4:36 AMknown_versions
and version
properties so that they point to the latest release (in the [pex-cli]
subsystem docs linked above)little-pilot-11155
02/28/2024, 9:47 AMlittle-pilot-11155
02/28/2024, 10:58 PM2.1.122
which changed it. More details at https://github.com/pex-tool/pex/issues/2379. The TL;DR: Pex only supports .zip
and .tar.gz
.broad-processor-92400
02/29/2024, 10:42 AMlittle-pilot-11155
02/29/2024, 10:49 AM[pex-cli]
version = "v2.2.2"
known_versions = [
"v2.2.2|macos_arm64|a27f9881610c5682b71104e17fea21a7bdb79b57c0c8129a6119390f216e0a02|4113902",
"v2.2.2|macos_x86_64|a27f9881610c5682b71104e17fea21a7bdb79b57c0c8129a6119390f216e0a02|4113902",
"v2.2.2|linux_x86_64|a27f9881610c5682b71104e17fea21a7bdb79b57c0c8129a6119390f216e0a02|4113902",
"v2.2.2|linux_arm64|a27f9881610c5682b71104e17fea21a7bdb79b57c0c8129a6119390f216e0a02|4113902",
]