famous-xylophone-36532
02/13/2023, 10:46 AMpants test ...
results in Pex errors with the following:
Failed to resolve requirements from PEX environment @ /Users/peder/.cache/pants/named_caches/pex_root/unzipped_pexes/34b6a8b7483f933e686d61c8b7737afee5e7dd24.
Needed cp39-cp39-macosx_12_0_x86_64 compatible dependencies for:
I managed to get this working for building a Pex binary and specifying the target platform, but that isn't possible for python_tests
afaik?famous-xylophone-36532
02/13/2023, 11:04 AMrefined-addition-53644
02/13/2023, 11:15 AMfamous-xylophone-36532
02/13/2023, 11:20 AMcp39-cp39-macosx_12_0_arm64 compatible dependencies
.famous-xylophone-36532
02/13/2023, 11:20 AMfamous-xylophone-36532
02/13/2023, 11:59 AMaarch64
instead of macos
. Same error, it complains that it can't resolve most of my dependencies. While I am perfectly able to install the same dependencies with a simple pip call.busy-vase-39202
02/13/2023, 3:53 PMhappy-kitchen-89482
02/13/2023, 4:26 PMhappy-kitchen-89482
02/13/2023, 4:26 PMhappy-kitchen-89482
02/13/2023, 4:27 PMhappy-kitchen-89482
02/13/2023, 4:27 PMpants.toml
to a gist?busy-vase-39202
02/13/2023, 9:45 PMrefined-addition-53644
02/13/2023, 9:50 PMbusy-vase-39202
02/13/2023, 10:06 PMfamous-xylophone-36532
02/14/2023, 8:18 AM[GLOBAL]
pants_version = "2.14.1"
backend_packages = [
"pants.backend.python",
"pants.backend.python.lint.black",
"pants.backend.docker",
]
famous-xylophone-36532
02/14/2023, 8:19 AMFailed to resolve requirements from PEX environment @ /Users/peder/.cache/pants/named_caches/pex_root/unzipped_pexes/61b7f8b89bc2656505f1efe0d3e5c7d40323664c.
Needed cp38-cp38-macosx_12_0_arm64 compatible dependencies for:
And then there's lots of
1: aiohttp~=3.8.3
Required by:
... 0.0.0
But this pex had no ProjectName(raw='aiohttp', normalized='aiohttp') distributions.
famous-xylophone-36532
02/14/2023, 8:21 AM./pants test ./lib/my_library/tests/my_test.py
. The BUILD
file contains
python_sources(
name = "lib",
)
python_requirements(
name = "req",
)
python_distribution(
name = "pkg",
provides = python_artifact(
name = "...",
version = "0.0.0",
),
dependencies = [
":lib",
":req",
]
)
python_tests(
name = "tests",
sources= ["./tests/*"],
dependencies = [
":pkg"
],
)