pants
pants copied to clipboard
Using resolves_to_only_binary causes "Resolving wheels was disallowed..." error in 2.21
Describe the bug
Using resolves_to_only_binary
causes "Resolving wheels was disallowed, but the following project names are configured to only allow resolving pre-built wheels" error when running pants test ::
.
Pants version 2.21.0
OS Linux
Additional info Steps to reproduce:
- Clone https://github.com/sjincho/pants-2-21-only-binary
- This repo is based on example-python. The only change I made is to add
ansicolors
package toresolves_to_binary
and re-rungenerate-lockfiles
.
- Run
pants test ::
- Error:
15:48:54.42 [INFO] Canceled: Building pytest.pex from resource://pants.backend.python.subsystems/pytest.lock
15:48:55.47 [INFO] Completed: Building 2 requirements for requirements.pex from the python-default.lock resolve: setuptools<57,>=56.2.0, types-setuptools<58,>=56.2.0
15:48:55.49 [ERROR] 1 Exception encountered:
Engine traceback:
in `test` goal
ProcessExecutionFailure: Process 'Building 2 requirements for requirements.pex from the python-default.lock resolve: setuptools<57,>=56.2.0, types-setuptools<58,>=56.2.0' failed with exit code 1.
stdout:
stderr:
Resolving wheels was disallowed, but the following project names are configured to only allow resolving pre-built wheels: ansicolors
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
The error seems to be caused by the new flag --no-pre-install-wheels
when running pex
.