<#17884 python_google_cloud_function is not enviro...
# github-notifications
q
#17884 python_google_cloud_function is not environment-aware Issue created by le0pard Environments: Cross-Platform or Remote Builds is very cool feature, which allow to define different way to build code in different environments. For our case it is important to build gcp function zip files even on Mac OS, which need to be run in Docker or cloud in linux environment. Fallback really help in this:
Copy code
__defaults__(
    all=dict(environment="local_linux"),
)

local_environment(
    name="local_linux",
    compatible_platforms=["linux_x86_64"],
    fallback_environment="local_docker",
)

docker_environment(
    name="local_docker",
    image="python:3.9",
)
Command like
./pants tests ::
on Mac OS systems run in docker, instead local system. But build artifacts (zip file) from
python_google_cloud_function
still build on local environment and cannot be used in docker container from same system, where it was build. Output from docker image (
python:3.9-slim
) with unpacked zip:
Copy code
Found 1 distribution for psutil that do not apply:
1.) The wheel tags for psutil 5.8.0 are cp39-cp39-manylinux2010_x86_64 which do not match the supported tags of /usr/local/bin/python3.9:
cp39-cp39-manylinux_2_31_aarch64
Will be really good, if pants system support environment for build artifacts for AWS and GCP. Pants version:
2.15.0rc0
pantsbuild/pants