breezy-apple-27122
02/27/2023, 4:04 PMFailed to resolve requirements from PEX environment @ /root/.pex/unzipped_pexes/ce56906b160237e1254e7999de724a1bdd708b54.
Needed cp311-cp311-manylinux_2_31_aarch64 compatible dependencies for:
1: MarkupSafe>=2.0
Required by:
Jinja2 3.1.2
But this pex had no ProjectName(raw='MarkupSafe', normalized='markupsafe') distributions.
2: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
Required by:
jsonschema 4.17.3
But this pex had no ProjectName(raw='pyrsistent', normalized='pyrsistent') distributions.
3: numpy
Required by:
altair 4.2.2
streamlit 1.19.0
But this pex had no ProjectName(raw='numpy', normalized='numpy') distributions.
4: pandas>=0.18
Required by:
altair 4.2.2
But this pex had no ProjectName(raw='pandas', normalized='pandas') distributions.
5: pandas>=0.25
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='pandas', normalized='pandas') distributions.
6: pillow>=6.2.0
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='pillow', normalized='pillow') distributions.
7: pyarrow>=4.0
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='pyarrow', normalized='pyarrow') distributions.
8: charset-normalizer<4,>=2
Required by:
requests 2.28.2
But this pex had no ProjectName(raw='charset-normalizer', normalized='charset-normalizer') distributions.
9: numpy>=1.16.4
Required by:
pydeck 0.8.0
But this pex had no ProjectName(raw='numpy', normalized='numpy') distributions.
10: tornado>=6.0.3
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='tornado', normalized='tornado') distributions.
11: watchdog; platform_system != "Darwin"
Required by:
streamlit 1.19.0
But this pex had no ProjectName(raw='watchdog', normalized='watchdog') distributions.
12: watchdog==2.3.0
But this pex had no ProjectName(raw='watchdog', normalized='watchdog') distributions.
breezy-apple-27122
02/27/2023, 4:05 PMpython_sources()
pex_binary(
name="bin",
script="streamlit",
dependencies=["./main.py", "//:poetry#watchdog"],
restartable=True,
)
docker_image(
name="docker"
)
curved-television-6568
02/27/2023, 4:11 PMcurved-television-6568
02/27/2023, 4:14 PMbreezy-apple-27122
02/27/2023, 4:14 PMbreezy-apple-27122
02/27/2023, 4:15 PMcurved-television-6568
02/27/2023, 4:15 PMbreezy-apple-27122
02/27/2023, 4:17 PMbreezy-apple-27122
02/27/2023, 4:17 PMpex_binary(
name="bin",
script="streamlit",
dependencies=["./main.py", "//:poetry#watchdog"],
restartable=True,
platforms=["current"]
)
curved-television-6568
02/27/2023, 4:17 PMcurved-television-6568
02/27/2023, 4:18 PMplatforms=["current"]
yea, that won’t work if you run on a Mac.. as current will be you mac platform for the pex then and unusable in the docker image.curved-television-6568
02/27/2023, 4:19 PMrefined-addition-53644
02/27/2023, 4:19 PMcomplete_platforms
using appropriate docker image
We should add it as somewhere inside pants docbreezy-apple-27122
02/27/2023, 4:20 PMcurved-television-6568
02/27/2023, 4:20 PMrefined-addition-53644
02/27/2023, 4:21 PMcurved-television-6568
02/27/2023, 4:21 PMbreezy-apple-27122
02/27/2023, 4:27 PMbreezy-apple-27122
02/27/2023, 4:59 PM17:57:42.43 [INFO] Completed: Building 2 requirements for src.streamlit.template/bin.pex from the 3rdparty/python/default.lock resolve: streamlit==1.19.0, watchdog==2.3.0
17:57:42.43 [ERROR] 1 Exception encountered:
Engine traceback:
in `package` goal
ProcessExecutionFailure: Process 'Building 2 requirements for src.streamlit.template/bin.pex from the 3rdparty/python/default.lock resolve: streamlit==1.19.0, watchdog==2.3.0' failed with exit code 1.
stdout:
stderr:
Failed to resolve compatible artifacts from lock 3rdparty/python/default.lock for 1 target:
1. cp311-cp311-manylinux_2_31_x86_64:
Failed to resolve all requirements for complete platform cp311-cp311-manylinux_2_31_x86_64 from 3rdparty/python/default.lock:
Configured with:
build: False
use_wheel: True
Dependency on validators not satisfied, 1 incompatible candidate found:
1.) validators 0.20 (via: streamlit==1.19.0 -> validators>=0.2) does not have any compatible artifacts:
<https://files.pythonhosted.org/packages/95/14/ed0af6865d378cfc3c504aed0d278a890cbefb2f1934bf2dbe92ecf9d6b1/validators-0.20.0.tar.gz>
Use `--keep-sandboxes=on_failure` to preserve the process chroot for inspection.
Looks like the package has no platform info, therefore not installing. What could be wrong?enough-analyst-54434
02/27/2023, 5:18 PMvalidators-0.20.0.tar.gz
is an sdist - it must be built into a wheel. You cannot build a wheel for a foreign platform. The hint is above in the message:
Configured with:
build: False
use_wheel: True
enough-analyst-54434
02/27/2023, 5:19 PMenough-analyst-54434
02/27/2023, 5:19 PMenough-analyst-54434
02/27/2023, 5:22 PMRUN pip install poetry
RUN poetry ...
If that's true for you, then you do exactly the same thing with Pants:
RUN ... pants install steps ...
RUN pants package ...
I'm not sure how many people use this latter technique - but it should be the obvious one I'd think.
That said - environments is the way to go here. That will be more efficient.curved-television-6568
02/27/2023, 5:26 PMenough-analyst-54434
02/27/2023, 5:27 PMenough-analyst-54434
02/27/2023, 5:30 PM$ pex pip wheel -c pip -- wheel validators
Collecting validators
Using cached validators-0.20.0.tar.gz (30 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting decorator>=3.4.0
File was already downloaded /home/jsirois/dev/pantsbuild/jsirois-pants/decorator-5.1.1-py3-none-any.whl
Building wheels for collected packages: validators
Building wheel for validators (pyproject.toml) ... done
Created wheel for validators: filename=validators-0.20.0-py3-none-any.whl size=19581 sha256=25e221f311e6e6b60b175b89900f4ec0f5b48e0a0aff0b1db9ae325a457d38d8
Stored in directory: /home/jsirois/.cache/pip/wheels/f2/ed/dd/d3a556ad245ef9dc570c6bcd2f22886d17b0b408dd3bbb9ac3
Successfully built validators
I'll file a Pex issue about supporting that idea.curved-television-6568
02/27/2023, 5:32 PM*py3-none-any.whl
wheels, that it should be okbreezy-apple-27122
02/27/2023, 5:33 PMbreezy-apple-27122
02/27/2023, 5:34 PMbreezy-apple-27122
02/27/2023, 5:34 PMbreezy-apple-27122
02/27/2023, 5:37 PMenough-analyst-54434
02/27/2023, 5:38 PMbusy-vase-39202
02/27/2023, 6:18 PMfamous-xylophone-36532
02/28/2023, 8:21 AMfamous-xylophone-36532
02/28/2023, 8:21 AMbreezy-apple-27122
02/28/2023, 8:21 AMbreezy-apple-27122
02/28/2023, 8:23 AMenough-analyst-54434
02/28/2023, 7:01 PM$ git sdiff
pex/pip/foreign_platform.py | 3 ---
pex/pip/tool.py | 3 +--
2 files changed, 1 insertion(+), 5 deletions(-)
Just 2 old tests asserting sdists don't work for --platform
and --complete-platform
that fail. I'll get out a Pex release with the "yolo" support ~today so Pants 2.16.x has it at least.enough-analyst-54434
03/02/2023, 9:03 PMpants.toml
snippet:
[pex-cli]
version = "v2.1.125"
known_versions = [
"v2.1.125|macos_arm64|1da1ef933429f15b218c98c6b960f30adfd0221fc5284c1d8facac09923692f8|4080732",
"v2.1.125|macos_x86_64|1da1ef933429f15b218c98c6b960f30adfd0221fc5284c1d8facac09923692f8|4080732",
"v2.1.125|linux_x86_64|1da1ef933429f15b218c98c6b960f30adfd0221fc5284c1d8facac09923692f8|4080732",
"v2.1.125|linux_arm64|1da1ef933429f15b218c98c6b960f30adfd0221fc5284c1d8facac09923692f8|4080732"
]