Skip to content

Commit 82ffb64

Browse files
authored
build(test-potel-aws-lambda): Migrate from pip to uv (#58)
Replace lambda_function/requirements.txt with pyproject.toml and update deploy.sh to use uv pip install for Lambda packaging. Fixes PY-2485
1 parent c5d4814 commit 82ffb64

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

test-potel-aws-lambda/deploy.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ echo "Creating temporary directory: $TEMP_DIR"
5353
echo "Copying function code..."
5454
cp -r lambda_function/* $TEMP_DIR/
5555

56-
# Create virtual environment and install dependencies
56+
# Install dependencies
5757
echo "Setting up Python environment..."
58-
python -m venv $TEMP_DIR/.venv
59-
source $TEMP_DIR/.venv/bin/activate
60-
pip install -r $TEMP_DIR/requirements.txt -t $TEMP_DIR/
58+
if ! command -v uv &> /dev/null; then
59+
curl -LsSf https://astral.sh/uv/install.sh | sh
60+
fi
61+
uv pip install --system --no-cache -r $TEMP_DIR/pyproject.toml --target $TEMP_DIR/
6162

6263
# Create deployment package
6364
echo "Creating deployment package..."
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[project]
2+
name = "test-potel-aws-lambda"
3+
version = "0"
4+
requires-python = ">=3.12"
5+
6+
dependencies = [
7+
"sentry-sdk>=3.0.0a1",
8+
]

test-potel-aws-lambda/lambda_function/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)