diff --git a/test-lambda-function/build.sh b/test-lambda-function/build.sh index d81bb3b..64e6eac 100755 --- a/test-lambda-function/build.sh +++ b/test-lambda-function/build.sh @@ -1,12 +1,15 @@ #!/usr/bin/env bash +set -euo pipefail -set -ex +if ! command -v uv &> /dev/null; then + curl -LsSf https://astral.sh/uv/install.sh | sh +fi rm -rf lambda_function_package.zip rm -rf ./python_with_sentry/package/* -pip install --target ./python_with_sentry/package -r requirements.txt +uv pip install --target ./python_with_sentry/package -r pyproject.toml cd ./python_with_sentry/package && zip -x "**/__pycache__/*" -r ../../lambda_function_package.zip . && cd - -cd ./python_with_sentry && zip -g ../lambda_function_package.zip lambda_function.py && cd - \ No newline at end of file +cd ./python_with_sentry && zip -g ../lambda_function_package.zip lambda_function.py && cd - diff --git a/test-lambda-function/pyproject.toml b/test-lambda-function/pyproject.toml new file mode 100644 index 0000000..96f8e65 --- /dev/null +++ b/test-lambda-function/pyproject.toml @@ -0,0 +1,11 @@ +[project] +name = "test-lambda-function" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "sentry-sdk", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-lambda-function/requirements.txt b/test-lambda-function/requirements.txt deleted file mode 100644 index 4b614c7..0000000 --- a/test-lambda-function/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -sentry-sdk \ No newline at end of file