Closed sjincho closed 2 weeks ago
I did some more testing, and figured out that this seems to be caused by not --no-pre-install-wheels
, but https://github.com/pantsbuild/pants/pull/20598.
As noted in https://github.com/pex-tool/pex/issues/2432, it seems like pex throws the error above when both --lock
and --only-binary
flags are set.
FYI, pex release https://github.com/pex-tool/pex/releases/tag/v2.4.1 fixes the underlying issue.
The default version of pex
in more recent Pants releases is now well past 2.4.1, so I think this can safely be closed now. In Pants 2.21, you can fix the issue by overriding the version of the pex-cli
tool in your pants.toml file.
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 runningpants test ::
.Pants version 2.21.0
OS Linux
Additional info Steps to reproduce:
ansicolors
package toresolves_to_binary
and re-rungenerate-lockfiles
.pants test ::
Engine traceback: in
test
goalProcessExecutionFailure: 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.