Skip to content

Commit

Permalink
Add platforms for AWS Lambda Runtime configurations
Browse files Browse the repository at this point in the history
As described in the Github [issue](pypa/pip#10760),
`pip` fails to find a manylinux wheel when `--platform` is defined and
there is no exact match.

Add old platforms for the `pip` command when creating the data directory
for the AWS Lambda function.

This should resolved the dependency conflict observed in this
[job](https://gitlab.adacore-it.com/it/iac/-/jobs/864195).
  • Loading branch information
jeromef853 committed Dec 12, 2024
1 parent 4ab4e67 commit d34dc98
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/e3/aws/troposphere/awslambda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,12 @@ class PyFunction(Function):
f"python{version}": {
"implementation": "cp",
# Amazon Linux 2023 glibc version is 2.34
"platforms": ("manylinux_2_34_x86_64",),
"platforms": (
"manylinux_2_17_x86_64",
"manylinux_2_24_x86_64",
"manylinux_2_28_x86_64",
"manylinux_2_34_x86_64",
),
}
for version in AMAZON_LINUX_2023_RUNTIMES
}
Expand Down
20 changes: 18 additions & 2 deletions tests/tests_e3_aws/troposphere/awslambda/awslambda_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,24 @@ def test_pyfunction_with_dlconfig(stack: Stack) -> None:
("3.9", ["manylinux_2_17_x86_64", "manylinux_2_24_x86_64"]),
("3.10", ["manylinux_2_17_x86_64", "manylinux_2_24_x86_64"]),
("3.11", ["manylinux_2_17_x86_64", "manylinux_2_24_x86_64"]),
("3.12", ["manylinux_2_34_x86_64"]),
("3.13", ["manylinux_2_34_x86_64"]),
(
"3.12",
[
"manylinux_2_17_x86_64",
"manylinux_2_24_x86_64",
"manylinux_2_28_x86_64",
"manylinux_2_34_x86_64",
],
),
(
"3.13",
[
"manylinux_2_17_x86_64",
"manylinux_2_24_x86_64",
"manylinux_2_28_x86_64",
"manylinux_2_34_x86_64",
],
),
],
)
def test_pyfunction_with_requirements(
Expand Down

0 comments on commit d34dc98

Please sign in to comment.