I don't seem to be able to get an escaped URL to w...
# general
b
I don't seem to be able to get an escaped URL to work in my lockfile. (Torch of course). For example:
Copy code
"url": "<http://download.pytorch.org/whl/cpu/torch-2.2.1%2Bcpu-cp39-cp39-linux_x86_64.whl>"
It is expanded to '+' which is rejected., I'm on Pants 2.19 and https://github.com/pantsbuild/pants/issues/20474 suggests I could upgrade (Pants) to handle this? In fact it seems I may need to upgrade Pex. If I've understood it correctly I need to declare this version in the pants.toml, along with a sha and length field? If so, where would I locate these from?
Copy code
[pex-cli]
known_versions = [
    '"v2.1.163|macos_arm64|??',
    '<str>',
    ...,
]
c
From the pex releases page <https://github.com/pex-tool/pex/releases> And then calculating the values for the given version
b
Thanks, but the 'penny still has not dropped' for me:... within the versions on that link I see no clear 'thing' on which to perform the calculations. I see pex tar files and source zips, but don't see 'macos_arm64' type selectors suggested by the 'known_versions' syntax. Presumably the thing I am looking for is a wheel file, and maybe I just do
pip download
? I'll give that a go.
c
An example:
Copy code
[pex-cli]
version = "v2.1.161"
known_versions = [
  "v2.1.161|macos_arm64 |5bb08a677d309889b3357cd23a3a95945a4c3438cfb00ece5291dcfe89221fcc|3675619",
  "v2.1.161|macos_x86_64|5bb08a677d309889b3357cd23a3a95945a4c3438cfb00ece5291dcfe89221fcc|3675619",
  "v2.1.161|linux_x86_64|5bb08a677d309889b3357cd23a3a95945a4c3438cfb00ece5291dcfe89221fcc|3675619",
  "v2.1.161|linux_arm64 |5bb08a677d309889b3357cd23a3a95945a4c3438cfb00ece5291dcfe89221fcc|3675619",
]
b
Thanks, sorted! Just to spell it out for anyone else: "calculate the sha256 of the pex binary asset".
arguably 'pex-cli' in the toml made this clear anyway 😞