hundreds-noon-81667
10/03/2024, 5:53 AMInvalidTargetException: BUILD:7: Values for the 'platform' field in target //:linux_arm64 must be one of ['linux_arm64', 'linux_x86_64', 'macos_arm64', 'macos_x86_64'], but 'linux_armv7l' was provided.
broad-processor-92400
10/03/2024, 5:17 PMpex_binary
target for armv7l, if one has an appropriate complete_platforms JSON file and all dependencies have pre-built wheelshappy-kitchen-89482
10/03/2024, 7:20 PMhappy-kitchen-89482
10/03/2024, 7:21 PMhundreds-noon-81667
10/03/2024, 7:27 PMdocker_environment(
name="linux",
image="pychris/python:3.11",
fallback_environment="local"
)
docker_environment(
name="linux_arm64",
image="pychris/python:3.11",
platform="linux_armv7l",
fallback_environment="local"
)
local_environment(name="local")
__defaults__(all=dict(environment="default"))
And something like so for my pi
pex_binary(
name="api",
entry_point="gunicorn",
dependencies=[":src"],
args=[
"dh.cannery.proxy.api:create_app",
"--access-logfile=-",
"--bind",
"0.0.0.0:8094",
"--worker-class",
"aiohttp.GunicornWebWorker",
],
restartable=True,
environment="linux_arm64",
)
hundreds-noon-81667
10/03/2024, 7:28 PMhundreds-noon-81667
10/03/2024, 7:36 PMPants can definitely cross-build, say, a pex_binary target for armv7l, if one has an appropriate complete_platforms JSON file and all dependencies have pre-built wheels
I saw that mentioned when searching around but I can't make sense of the documentation nor how to implement it at all. is there a guide somewhere which explains what's needed? this sort of functionality will be hugely helpful for our team and is sort of why (along with mono repo stuff) i chose pants for our projectsbroad-processor-92400
10/03/2024, 7:37 PMhundreds-noon-81667
10/03/2024, 8:00 PMbroad-processor-92400
10/03/2024, 8:01 PMhundreds-noon-81667
10/03/2024, 8:02 PMhundreds-noon-81667
10/03/2024, 9:19 PMstderr:
No pre-built wheel was available for aiohttp 3.10.8.
Successfully built the wheel aiohttp-3.10.8-cp39-cp39-macosx_10_9_x86_64.whl from the sdist aiohttp-3.10.8.tar.gz but it is not compatible wi
th the requested foreign target complete platform cp311-cp311-manylinux_2_36_armv7l.
You'll need to build a wheel from aiohttp-3.10.8.tar.gz on the foreign target platform and make it available to Pex via a `--find-links` repo
or a custom `--index`.
hundreds-noon-81667
10/03/2024, 9:22 PMhundreds-noon-81667
10/03/2024, 11:13 PMhundreds-noon-81667
10/03/2024, 11:21 PMhundreds-noon-81667
10/03/2024, 11:47 PMbroad-processor-92400
10/04/2024, 1:16 AM