From 9e0b9b1f678c083624e391d98ab233d77b588f0d Mon Sep 17 00:00:00 2001 From: Sym Roe Date: Sat, 30 Nov 2024 08:56:00 +0000 Subject: [PATCH] Use Makefile to get around SAM issue https://github.com/aws/aws-lambda-builders/issues/675 --- lambda-layers/DependenciesLayer/Makefile | 4 ++++ pyproject.toml | 1 + template.yaml | 2 +- uv.lock | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 lambda-layers/DependenciesLayer/Makefile diff --git a/lambda-layers/DependenciesLayer/Makefile b/lambda-layers/DependenciesLayer/Makefile new file mode 100644 index 00000000..c61905d3 --- /dev/null +++ b/lambda-layers/DependenciesLayer/Makefile @@ -0,0 +1,4 @@ + +build-DependenciesLayer: + pip install --break-system-packages setuptools + pip install --upgrade -r requirements.txt --target "$(ARTIFACTS_DIR)/python/" diff --git a/pyproject.toml b/pyproject.toml index a8541500..9acc5dd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,7 @@ lint.extend-select = [ [dependency-groups] dev = [ + "aws-sam-cli==1.131.0", "pytest==8.3.3", "pytest-cov==6.0.0", "pytest-django==4.9.0", diff --git a/template.yaml b/template.yaml index 6c20d7be..572f3772 100644 --- a/template.yaml +++ b/template.yaml @@ -86,7 +86,7 @@ Resources: CompatibleRuntimes: - python3.12 Metadata: - BuildMethod: python3.12 + BuildMethod: makefile ElectionLeafletsFunction: diff --git a/uv.lock b/uv.lock index 3b328541..ae656a83 100644 --- a/uv.lock +++ b/uv.lock @@ -779,6 +779,7 @@ deploy = [ ] dev = [ { name = "aloe-django" }, + { name = "aws-sam-cli" }, { name = "django-debug-toolbar" }, { name = "moto" }, { name = "pytest" }, @@ -825,6 +826,7 @@ deploy = [ ] dev = [ { name = "aloe-django", specifier = "==0.2.0" }, + { name = "aws-sam-cli", specifier = "==1.131.0" }, { name = "django-debug-toolbar", specifier = "==5.0.0a0" }, { name = "moto", specifier = "==5.0.21" }, { name = "pytest", specifier = "==8.3.3" },