Skip to content

Commit

Permalink
Use Makefile to get around SAM issue
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Nov 30, 2024
1 parent 5e832b2 commit c0a9c5f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
5 changes: 5 additions & 0 deletions lambda-layers/DependenciesLayer/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

build-DependenciesLayer:
pip install --break-system-packages setuptools
cd $(ARTIFACTS_DIR)
pip install --break-system-packages -r requirements.txt
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ description = " 📮 A Django port of the original PHP code from electionleaflet
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"aws-sam-cli==1.131.0",
"dc-design-system",
"dc-django-utils",
"dj-pagination==2.4.0",
Expand All @@ -29,6 +28,7 @@ dependencies = [
"psycopg2-binary==2.9.10",
"sorl-thumbnail===12.11.0",
"setuptools>=75.6.0",
"aws-wsgi",
]

[tool.uv.workspace]
Expand All @@ -38,7 +38,7 @@ members = ["thumbs"]
django-uk-political-parties = { git = "https://github.com/DemocracyClub/django-uk-political-parties.git", rev = "86ffa51f8306858c379c9de5be2f4bdb24b3a910" }
dc-design-system = { git = "https://github.com/DemocracyClub/design-system.git", rev = "c5c5de6b792b4b57997b65370fdcdfa4f099cdf4" }
dc-django-utils = { git = "https://github.com/DemocracyClub/dc_django_utils.git", rev = "7.0.1" }
aws-wsgi = { git = "https://github.com/DemocracyClub/awsgi.git", rev = "master" }
aws-wsgi = { git = "https://github.com/DemocracyClub/awsgi.git" }

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "electionleaflets.settings.testing"
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Resources:
CompatibleRuntimes:
- python3.12
Metadata:
BuildMethod: python3.12
BuildMethod: makefile


ElectionLeafletsFunction:
Expand Down
11 changes: 9 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c0a9c5f

Please sign in to comment.