bright-monitor-59146
08/15/2023, 5:37 AM[ERROR] ResolveError: Failed to resolve requirements from PEX environment @ /var/task.
Needed cp311-cp311-manylinux_2_26_x86_64 compatible dependencies for:
1: cryptography>=1.8.1
Required by:
dynamodb-encryption-sdk 3.2.0
But this pex had no ProjectName(raw='cryptography', normalized='cryptography') distributions.
Traceback (most recent call last):
File "/var/lang/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/var/task/lambdex_handler.py", line 34, in <module>
bootstrap_pex_env(__entry_point__)
File "/var/task/.bootstrap/pex/pex_bootstrapper.py", line 702, in bootstrap_pex_env
PEXEnvironment.mount(entry_point, pex_info).activate()
File "/var/task/.bootstrap/pex/environment.py", line 321, in activate
self._activated_dists = self._activate()
File "/var/task/.bootstrap/pex/environment.py", line 671, in _activate
resolved = self.resolve()
File "/var/task/.bootstrap/pex/environment.py", line 502, in resolve
for fingerprinted_distribution in self.resolve_dists(all_reqs)
File "/var/task/.bootstrap/pex/environment.py", line 589, in resolve_dists
raise ResolveError(
cryptography
is indeed bundled in the .deps
directory of the ZIP file at: cryptography-41.0.3-cp37-abi3-manylinux_2_28_x86_64.whl
EDIT: not sure if the clue lies in Needed cp311-cp311-manylinux_2_26_x86_64 compatibile dependencies
and the cryptography
distribution included is -cp37-abi3-
? if this is the case, do I need to adjust my interpreter_constraints
in pants.toml
?broad-processor-92400
08/15/2023, 6:14 AMcomplete_platforms
parameter to python_awslambda
. https://github.com/pantsbuild/pants/discussions/18756 walks through what we dobright-monitor-59146
08/15/2023, 6:21 AMbright-monitor-59146
08/17/2023, 12:55 AMiteration-utilities
is the module) and its target doesn’t match the list in the json file, what would be the best approach here? add the target into the list? something else?broad-processor-92400
08/17/2023, 2:30 AMcomplete_platforms
, run the build within a docker image matching the target environment (likely one of the sam
ones, e.g. public.ecr.aws/sam/build-python3.11
), with the 'environments' feature in pants https://www.pantsbuild.org/docs/environments, meaning the dependency is built on every run, and built in a compatible way.
As I said, I've not encountered this so can't speak to the details. Options 1 or 2 will result in faster builds compared to option 3, by avoiding needing to do the C compilation on every single pants package
call.broad-processor-92400
08/17/2023, 2:31 AMiteration-utilities
has wheels up to Python 3.9, but not 3.10 or 3.11, so maybe the upstream work is as "simple" as just adding additional versions to a list somewhere: https://pypi.org/project/iteration-utilities/#files)broad-processor-92400
08/17/2023, 2:32 AMbright-monitor-59146
08/17/2023, 2:49 AMbright-monitor-59146
08/17/2023, 4:59 AM