You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently encountered a runtime issue with a successfully built PEX file:
(nwpy-ml-clustering_linux-x86-64_cp3.7) app@8bceeea547ee:/srv/nerdwallet/nwpy-ml-clustering$ ./build/nwpy-ml-clustering.pex
Traceback (most recent call last):
File "/srv/nerdwallet/nwpy-ml-clustering/build/nwpy-ml-clustering.pex/.bootstrap/pex/pex.py", line 391, in execute
File "/srv/nerdwallet/nwpy-ml-clustering/build/nwpy-ml-clustering.pex/.bootstrap/pex/pex.py", line 89, in _activate
File "/srv/nerdwallet/nwpy-ml-clustering/build/nwpy-ml-clustering.pex/.bootstrap/pex/environment.py", line 232, in activate
File "/srv/nerdwallet/nwpy-ml-clustering/build/nwpy-ml-clustering.pex/.bootstrap/pex/environment.py", line 375, in _activate
File "/srv/nerdwallet/nwpy-ml-clustering/build/nwpy-ml-clustering.pex/.bootstrap/pex/environment.py", line 209, in _update_candidate_distributions
File "/srv/nerdwallet/nwpy-ml-clustering/build/nwpy-ml-clustering.pex/.bootstrap/pex/environment.py", line 227, in can_add
File "/srv/nerdwallet/nwpy-ml-clustering/build/nwpy-ml-clustering.pex/.bootstrap/pex/vendor/_vendored/packaging/packaging/tags.py", line 75, in parse_tag
ValueError: too many values to unpack (expected 3)
We recently encountered a runtime issue with a successfully built PEX file:
We tracked this down to the following installed wheel:
'llvmlite-0.29.0-1-cp37-cp37m-manylinux1_x86_64.whl'
. The current wheel filename parsing code inenvironment.py
assumes that there is no build tag: https://github.com/pantsbuild/pex/blob/916e61e04634c60d09ee25859c76ba4f27282e51/pex/environment.py#L223As a result, it includes the build tag with
wheel_tags
(e.g.1-cp37-cp37m-manylinux1_x86_64
) andparse_tag
fails.Per PEP 427, wheel filenames may include an optional build tag: https://www.python.org/dev/peps/pep-0427/#file-name-convention
Proposed fix:
pex
already vendorswheel
, which includes a regex matcher for wheel filenames. Just use theWHEEL_INFO_RE
to parse the wheel filename.Even simpler - split the whole filename, and gather up the trailing 3 tags:
The text was updated successfully, but these errors were encountered: