wonderful-iron-54019
09/02/2020, 2:54 PMhundreds-father-404
09/02/2020, 4:45 PMWould love a way to call a utility in my environment that would return hte appropriate pex stringnWhat do you mean? Like a utility to run in the desired platform and get back the proper platform string to use?
wonderful-iron-54019
09/02/2020, 4:46 PMa utility to run in the desired platform and get back the proper platform string to use?yes!
hundreds-father-404
09/02/2020, 4:50 PMpipx install pex
then pex --platform=manylinux2014_x86_64-cp-38-cp38 cryptography -o foo.pex
, for example
Let me check on that utility. I think setuptools
has a function to get all supported platform strings, iirc$ pex packaging
>>> [str(x) for x in tags.compatible_tags()]
It says that x.abi
is 'none'
for everything, even though it should include values like abi3
and cp38
enough-analyst-54434
09/11/2020, 4:22 PM$ curl -sSL <https://github.com/pantsbuild/pex/releases/download/v2.1.15/pex> -O
$ /path/to/python/of/interest pex --help
If you read the help for --platform
the current platform string is noted.
For example, on my machine, some of those are:
$ for py in python{2.7,3.{6,7,8}} pypy; do $py pex --help | grep -A2 "current interpreter at"; done
current interpreter at /usr/bin/python2.7 the full
platform string is manylinux2014_x86_64-cp-27-cp27mu.
To find out more, try `pex --platform explain`.
current interpreter at /usr/bin/python3.6 the full
platform string is manylinux2014_x86_64-cp-36-cp36m.
To find out more, try `pex --platform explain`.
current interpreter at /usr/bin/python3.7 the full
platform string is manylinux2014_x86_64-cp-37-cp37m.
To find out more, try `pex --platform explain`.
current interpreter at /usr/bin/python3.8 the full
platform string is manylinux2014_x86_64-cp-38-cp38. To
find out more, try `pex --platform explain`.
current interpreter at /opt/pypy/bin/pypy the full
platform string is
manylinux2014_x86_64-pp-273-pypy_73. To find out more,
wonderful-iron-54019
09/11/2020, 4:23 PMenough-analyst-54434
09/11/2020, 4:24 PMwonderful-iron-54019
09/11/2020, 4:25 PMenough-analyst-54434
09/11/2020, 4:25 PMpex platform
or pex platform --list
but until then this is the compromise.