gorgeous-eve-12553
12/16/2022, 3:58 PMenough-analyst-54434
12/16/2022, 4:00 PMenough-analyst-54434
12/16/2022, 4:01 PMgorgeous-eve-12553
12/16/2022, 4:01 PMenough-analyst-54434
12/16/2022, 4:01 PMenough-analyst-54434
12/16/2022, 4:03 PMplatforms=["current", "...other..."]
- that may work for doing this with one target instead of 2.enough-analyst-54434
12/16/2022, 4:04 PMgorgeous-eve-12553
12/16/2022, 4:04 PMenough-analyst-54434
12/16/2022, 4:05 PMenough-analyst-54434
12/16/2022, 4:05 PMenough-analyst-54434
12/16/2022, 4:05 PMhappy-kitchen-89482
12/16/2022, 4:06 PMenough-analyst-54434
12/16/2022, 4:06 PMenough-analyst-54434
12/16/2022, 4:06 PMenough-analyst-54434
12/16/2022, 4:07 PMgorgeous-eve-12553
12/16/2022, 4:17 PMgorgeous-eve-12553
12/16/2022, 4:18 PMgorgeous-eve-12553
12/16/2022, 4:18 PMenough-analyst-54434
12/16/2022, 4:21 PMenough-analyst-54434
12/16/2022, 4:22 PMgorgeous-eve-12553
12/16/2022, 4:24 PMenough-analyst-54434
12/16/2022, 4:24 PMgorgeous-eve-12553
12/16/2022, 4:24 PMenough-analyst-54434
12/16/2022, 4:26 PM$ docker run --rm -it python:3.11 sh -c 'python -mvenv venv && venv/bin/pip -q install pex && venv/bin/pex3 interpreter inspect -v -i2'
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
{
"path": "/venv/bin/python",
"version": "3.11.1",
"requirement": "CPython==3.11.1",
"platform": "manylinux_2_31_x86_64-cp-3.11.1-cp311",
"venv": true,
"base_interpreter": "/usr/local/bin/python3.11"
}
You want that "platform"
for that image, etc.enough-analyst-54434
12/16/2022, 4:28 PMcomplete_platforms
. You get that via:
$ docker run --rm -it python:3.11 sh -c 'python -mvenv venv && venv/bin/pip -q install pex && venv/bin/pex3 interpreter inspect --markers --tags -i2'
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
{
"path": "/venv/bin/python",
"compatible_tags": [
"cp311-cp311-manylinux_2_31_x86_64",
...
"py30-none-any"
],
"marker_environment": {
"implementation_name": "cpython",
"implementation_version": "3.11.1",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_python_implementation": "CPython",
"platform_release": "5.15.79.1-microsoft-standard-WSL2",
"platform_system": "Linux",
"platform_version": "#1 SMP Wed Nov 23 01:01:46 UTC 2022",
"python_full_version": "3.11.1",
"python_version": "3.11",
"sys_platform": "linux"
}
}
Put that JSON in a file, write a BUILD file
target for it, and reference that target address in your `complete_platforms`list.enough-analyst-54434
12/16/2022, 4:28 PMenough-analyst-54434
12/16/2022, 4:29 PM"path"
in the complete platform JSON - just the `"compatile_tags"`and `"marker_environment"`are needed to form a complete platform specification.enough-analyst-54434
12/16/2022, 4:31 PM"platform_version": "#1 SMP Wed Nov 23 01:01:46 UTC 2022"
- well, there you go. They can! Crazy. I've not seen one that does yet, but it's in the spec in PEP-508gorgeous-eve-12553
12/16/2022, 4:33 PMenough-analyst-54434
12/16/2022, 4:34 PMenough-analyst-54434
12/16/2022, 4:34 PMgorgeous-eve-12553
12/16/2022, 4:38 PMgorgeous-eve-12553
12/16/2022, 4:38 PMenough-analyst-54434
12/16/2022, 4:40 PMcomplete_platforms
when you need it. It is correct. The platforms
(abbreviated platforms) are a lie that often can work. Try the lie and see how it goes, If you get weird errors, the 1st thing to do is switch to telling the whole truth.enough-analyst-54434
12/16/2022, 4:43 PMgorgeous-eve-12553
12/16/2022, 5:13 PMgorgeous-eve-12553
12/16/2022, 5:14 PMancient-vegetable-10556
12/16/2022, 5:14 PMdocker_environment
, but this feature isn’t on a stable version yet.ancient-vegetable-10556
12/16/2022, 5:14 PMhappy-kitchen-89482
12/16/2022, 7:48 PMAfter 30 minutes of building, the PEX never finished.Eeep... Which version of Pants is this? Using a newer underlying version of Pip may help with resolve-related perf issues. This is in the
pip_version
option in [python]
.happy-kitchen-89482
12/16/2022, 7:48 PMgorgeous-eve-12553
12/19/2022, 5:28 PMenough-analyst-54434
12/19/2022, 5:31 PMenough-analyst-54434
12/19/2022, 5:31 PMenough-analyst-54434
12/19/2022, 5:33 PM>=3.7,<4
don't help at all. Thats a massive range to find compatible artifacts for. If you don't need such a range, its a good idea to set an IC range that makes sense for your project(s).enough-analyst-54434
12/19/2022, 5:34 PMpex_binary
lists platforms, these are resolved from the lock (assuming you have enabled resolves / use a lock). The lock will still be universal and attempt to solve for the whole IC range.gorgeous-eve-12553
12/19/2022, 5:45 PMenough-analyst-54434
12/19/2022, 5:52 PM2.16.0.dev3
as your pants_version
and add a:
[python]
pip_version = "22.3"
enough-analyst-54434
12/19/2022, 5:52 PMenough-analyst-54434
12/19/2022, 5:54 PMenough-analyst-54434
12/19/2022, 5:55 PM<4
clause is very bad, that includes the current Python 3.12 alphas which you almost certainly do not mean to support, etc.happy-kitchen-89482
12/19/2022, 7:50 PM