-
-
Couldn't load subscription status.
- Fork 740
Open
@jussapaavo
Description
Describe the solution you'd like.
The module now supports adding Python dependencies and requirements through pip and poetry. Is it possible to support uv as well? Note that uv also has good support for building AWS Lambda specific packages.
Describe alternatives you've considered.
As a workaround, I'm using these commands in source_path for building with uv:
source_path = [
{
path = "${path.module}/../../${var.source_dir_path}/src/"
commands = [
":zip . app",
]
patterns = [
"!.*/__pycache__.*",
"!.*/.*terragrunt.*",
]
},
{
path = "${path.module}/../../../${var.source_dir_path}"
commands = [
"uv export --frozen --no-dev --no-editable -o requirements.txt",
join(" ", [
"uv pip install",
"--no-installer-metadata",
"--no-compile-bytecode",
"--python-platform x86_64-manylinux2014",
"--python ${replace(var.runtime, "python", "")}",
"--target packages",
"-r requirements.txt"
]),
"cd packages",
":zip"
]
}
]
This works as intended and is a viable solution. However, it would be nice to have this as an officially supported feature, something like how poetry is supported.
Additional context
I created this feature request also for knowledge-sharing purposes, so other people can benefit from this implementation as a reference.
Thank you for already making this module so flexible that builds like this is possible.
Metadata
Metadata
Assignees
Labels
No labels