brash-student-40401
01/11/2023, 5:55 PMdocker_image(
name="create_json_image",
repository="repo",
dependencies=[":create_json_lambda"],
image_tags=["tag"],
)
python_awslambda(
name="create_json_lambda",
runtime="python3.8",
handler="lambda_function.py:lambda_handler",
)
python_sources(
dependencies=[
"src/vendor/python:reqs#pkg1",
"src/vendor/python:reqs#pkg2",
]
)
And then the Lambda itself gives me errors like:
[ERROR] ResolveError: Failed to resolve requirements from PEX environment @ /app.
Needed cp38-cp38-manylinux_2_26_x86_64 compatible dependencies for:
1: Pillow>=8.1.1
Required by:
pkg2
But this pex had no ProjectName(raw='Pillow', normalized='pillow') distributions.
(with lots of other un-available packages). Is this a problem with Lambdex? Pants has always been so great at avoiding dependency errors!broad-processor-92400
01/11/2023, 8:29 PMruntime
that just estimates what will be compatible, and may choose wheels that are too new/incompatible.
Once you use a JSON file, you may also need to tell pants about the latest version of the PEX tool, as it contains some relevant bug fixes.
Here’s a thread from a few days ago that discusses these: https://pantsbuild.slack.com/archives/C046T6T9U/p1673153412271249
(Note: that’s for 3.9, not 3.8, so the files there won’t be directly applicable)broad-processor-92400
01/11/2023, 8:41 PMmanylinux
tag greater than 2_26
, eg Pillow-…manylinux_2_32….whl