pex-tool / pex

A tool for generating .pex (Python EXecutable) files, lock files and venvs.
https://docs.pex-tool.org
Apache License 2.0
2.49k stars 254 forks source link

Add more distribution metadata parsing context to failures. #2441

Closed jsirois closed 2 weeks ago

jsirois commented 2 weeks ago

As noted in https://github.com/pex-tool/pex/pull/2440#issue-23714843850 you can run Pex with older versions of --pip-version and see something like the following when attempting a pex3 lock create:

InvalidRequirement: .* suffix can only be used with `==` or `!=` operators
    scikit-learn (>=1.0.*) ; extra == 'pipelines'

This is a bad Requires-Dist metadata requirement string but the dist it comes from is un-knowable from the current error presented.