Does anyone know if there a way to get a pants env...
# general
v
Does anyone know if there a way to get a pants environment to cross build in CI?
pants publish
works fine on my mac but running it on GHA gives this error `NoFallbackEnvironmentError: The Docker environment
python_arm64
is specified in the
environment
field from the target server:pex@environment=python_arm64, but it cannot be used because the local host has the platform
linux_x86_64
and the Docker environment has the platform linux_arm64.` from trying to build the pex binary in a arm64 environment. I've tried following this but no luck https://github.com/pantsbuild/example-docker/blob/main/.github/workflows/pants.yaml
b
Hi, you have to comfigure the complete_platform field on our for pex_binary target. see: https://www.pantsbuild.org/dev/docs/python/overview/pex#setting-the-target-platforms-for-a-pex
v
Thanks, but I'm using a different approach with environments so that the pex is made within each platform. I did this to avoid the warning that's on the page you linked. My pex target looks like
Copy code
pex_binary(
    name="pex",
    entry_point="main.py",
    environment=parametrize("python_arm64", "python_amd64"),
)