fast-refrigerator-12613
07/24/2023, 8:29 PMProcessExecutionFailure: Process 'Building 1 requirement for service/bin.pex from the python-default.lock resolve: uvicorn[standard]==0.20.0' failed with exit code 1.
stdout:
stderr:
No pre-built wheel was available for httptools 0.6.0.
Successfully built the wheel httptools-0.6.0-cp39-cp39-macosx_11_0_arm64.whl from the sdist httptools-0.6.0.tar.gz but it is not compatible with the requested foreign target abbreviated platform cp310-cp310m-linux_x86_64.
You'll need to build a wheel from httptools-0.6.0.tar.gz on the foreign target platform and make it available to Pex via a `--find-links` repo or a custom `--index`.
fast-refrigerator-12613
07/24/2023, 8:31 PMpants.toml
[GLOBAL]
pants_version = "2.16.0"
backend_packages = [
"pants.backend.docker",
"pants.backend.python",
"pants.backend.python.lint.black",
"pants.backend.python.lint.flake8",
]
[docker]
env_vars = [
"DOCKER_BUILDKIT=0",
]
[python]
interpreter_constraints = ["==3.10.*"]
enable_resolves = true
resolves = { python-default = "python-default.lock" }
[python-bootstrap]
search_path = ["<PYENV>"]
[source]
root_patterns = [
"/",
]
[anonymous-telemetry]
enabled = false
and here is the build file in question
python_sources(
name="service",
)
pex_binary(
name="bin",
platforms=[
"macosx-arm64-cp-310-m",
"linux-x86_64-cp-310-m",
],
)
docker_image(
name="test-service",
)
fast-refrigerator-12613
07/24/2023, 8:31 PMfast-nail-55400
07/24/2023, 8:31 PMhttptools
is for macOS but is being used for Linux.fast-refrigerator-12613
07/24/2023, 8:34 PMlinux-x86*
platform abovefast-refrigerator-12613
07/24/2023, 8:34 PMenough-analyst-54434
07/24/2023, 8:40 PMfast-refrigerator-12613
07/24/2023, 8:40 PM__main__.py
#!/usr/bin/env python3.9
enough-analyst-54434
07/24/2023, 8:42 PMfast-nail-55400
07/24/2023, 8:42 PMfast-nail-55400
07/24/2023, 8:42 PMenough-analyst-54434
07/24/2023, 8:42 PMenough-analyst-54434
07/24/2023, 8:44 PM$ file httptools-0.6.0/httptools/parser/parser.cpython-311-darwin.so
httptools-0.6.0/httptools/parser/parser.cpython-311-darwin.so: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit x86_64 bundle, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL>] [arm64:Mach-O 64-bit arm64 bundle, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL>]
enough-analyst-54434
07/24/2023, 8:44 PM[python]
pip_version = "23.0.1"
fast-refrigerator-12613
07/24/2023, 8:45 PMenough-analyst-54434
07/24/2023, 8:46 PMfast-refrigerator-12613
07/24/2023, 8:47 PMfast-refrigerator-12613
07/24/2023, 8:47 PMdist/services.test_service/bin.pex
pyenv: python3.9: command not found
The `python3.9' command exists in these Python versions:
3.9.16
Note: See 'pyenv help global' for tips on allowing both
python2 and python3 to be found.
enough-analyst-54434
07/24/2023, 8:47 PMfast-refrigerator-12613
07/24/2023, 8:47 PMfast-refrigerator-12613
07/24/2023, 8:47 PMenough-analyst-54434
07/24/2023, 8:47 PMfast-refrigerator-12613
07/24/2023, 8:48 PMfast-refrigerator-12613
07/24/2023, 8:48 PMfast-refrigerator-12613
07/24/2023, 8:48 PMenough-analyst-54434
07/24/2023, 8:49 PMfast-refrigerator-12613
07/24/2023, 8:49 PMfast-refrigerator-12613
07/24/2023, 10:35 PMpants.toml
[pex]
executable_search_paths=["<PYENV>"]
edit: nvm. didn't work.fast-refrigerator-12613
07/24/2023, 10:46 PMfast-refrigerator-12613
07/24/2023, 10:47 PMenough-analyst-54434
07/24/2023, 11:03 PMfast-refrigerator-12613
07/24/2023, 11:04 PMfast-refrigerator-12613
07/24/2023, 11:04 PMenough-analyst-54434
07/24/2023, 11:20 PMfast-refrigerator-12613
07/24/2023, 11:22 PMfast-refrigerator-12613
07/25/2023, 2:03 AMpex_binary(
name="bin",
entry_point="foo.main",
shebang="#!/usr/bin/env python3",
platforms=[
"macosx_11_0_arm64-cp-310-cp310",
"linux_aarch64-cp-310-cp310",
],
)
This finally fixed everything. Thanks for the help John and tdyas!enough-analyst-54434
07/25/2023, 2:42 AM