Skip to content

Commit d74c92c

Browse files
authored
use uv for reproducible (#8548)
1 parent c6b160f commit d74c92c

File tree

5 files changed

+36
-56
lines changed

5 files changed

+36
-56
lines changed

.github/workflows/update-reproducibles.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,23 @@ jobs:
1515
pull-requests: write
1616
contents: write
1717
if: github.repository_owner == 'aws'
18-
strategy:
19-
matrix:
20-
include:
21-
- os: ubuntu-latest
22-
python: 3.11
23-
target: update-reproducible-linux-reqs
24-
- os: macos-latest
25-
python: 3.11
26-
target: update-reproducible-mac-reqs
27-
- os: windows-latest
28-
python: 3.12
29-
target: update-reproducible-win-reqs
30-
max-parallel: 1
31-
runs-on: ${{ matrix.os }}
18+
runs-on: ubuntu-latest
3219
steps:
3320
- uses: actions/checkout@v6
3421
with:
3522
ref: ${{ github.head_ref }}
3623
- uses: actions/setup-python@v6
3724
with:
38-
python-version: ${{ matrix.python }}
39-
- run: make ${{ matrix.target }}
25+
python-version: "3.11"
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v5
28+
- name: Update all reproducible requirements
29+
run: make update-reproducible-reqs-uv
4030
- name: Push changes
4131
run: |
4232
git config --global user.email "[email protected]"
4333
git config --global user.name "GitHub Action"
4434
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
45-
git commit -am "Update reproducibles: ${{ matrix.target }}" || echo "nothing to commit"
35+
git add requirements/reproducible-*.txt
36+
git commit -m "Update reproducible requirements" || echo "nothing to commit"
4637
git push

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,10 @@ update-reproducible-win-reqs:
8787

8888

8989
update-reproducible-reqs: update-reproducible-linux-reqs update-reproducible-mac-reqs
90+
91+
# Update all reproducible requirements using uv (can run from any platform)
92+
update-reproducible-reqs-uv:
93+
@command -v uv >/dev/null 2>&1 || pip install uv
94+
uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-linux.txt --python-platform linux --python-version 3.11 --no-cache --no-strip-extras
95+
uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-mac.txt --python-platform macos --python-version 3.11 --no-cache --no-strip-extras
96+
uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-win.txt --python-platform windows --python-version 3.12 --no-cache --no-strip-extras

requirements/reproducible-linux.txt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.11
3-
# by the following command:
4-
#
5-
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/reproducible-linux.txt
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-linux.txt --python-platform linux --python-version 3.11 --no-cache --no-strip-extras
73
annotated-types==0.7.0 \
84
--hash=sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 \
95
--hash=sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89
@@ -84,7 +80,7 @@ boto3[crt]==1.42.1 \
8480
# via
8581
# aws-sam-cli (setup.py)
8682
# aws-sam-translator
87-
boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.42.17 \
83+
boto3-stubs[apigateway, cloudformation, ecr, iam, kinesis, lambda, s3, schemas, secretsmanager, signer, sqs, stepfunctions, sts, xray]==1.42.17 \
8884
--hash=sha256:773a41e3249acb64d06558e1fa2fc44a09152dad2dce0c8bc61c3b49b00ce905 \
8985
--hash=sha256:847567107d658aa0143dd09074bba9cb646453251a86fb96c5fe12b3b0e504ee
9086
# via aws-sam-cli (setup.py)
@@ -1156,6 +1152,10 @@ s3transfer==0.16.0 \
11561152
--hash=sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe \
11571153
--hash=sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920
11581154
# via boto3
1155+
setuptools==80.9.0 \
1156+
--hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \
1157+
--hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c
1158+
# via aws-lambda-builders
11591159
six==1.17.0 \
11601160
--hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \
11611161
--hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81
@@ -1273,9 +1273,3 @@ wheel==0.45.1 \
12731273
--hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \
12741274
--hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248
12751275
# via aws-lambda-builders
1276-
1277-
# The following packages are considered to be unsafe in a requirements file:
1278-
setuptools==80.9.0 \
1279-
--hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \
1280-
--hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c
1281-
# via aws-lambda-builders

requirements/reproducible-mac.txt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.11
3-
# by the following command:
4-
#
5-
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/reproducible-mac.txt
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-mac.txt --python-platform macos --python-version 3.11 --no-cache --no-strip-extras
73
annotated-types==0.7.0 \
84
--hash=sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 \
95
--hash=sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89
@@ -84,7 +80,7 @@ boto3[crt]==1.42.1 \
8480
# via
8581
# aws-sam-cli (setup.py)
8682
# aws-sam-translator
87-
boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.42.17 \
83+
boto3-stubs[apigateway, cloudformation, ecr, iam, kinesis, lambda, s3, schemas, secretsmanager, signer, sqs, stepfunctions, sts, xray]==1.42.17 \
8884
--hash=sha256:773a41e3249acb64d06558e1fa2fc44a09152dad2dce0c8bc61c3b49b00ce905 \
8985
--hash=sha256:847567107d658aa0143dd09074bba9cb646453251a86fb96c5fe12b3b0e504ee
9086
# via aws-sam-cli (setup.py)
@@ -1156,6 +1152,10 @@ s3transfer==0.16.0 \
11561152
--hash=sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe \
11571153
--hash=sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920
11581154
# via boto3
1155+
setuptools==80.9.0 \
1156+
--hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \
1157+
--hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c
1158+
# via aws-lambda-builders
11591159
six==1.17.0 \
11601160
--hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \
11611161
--hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81
@@ -1273,9 +1273,3 @@ wheel==0.45.1 \
12731273
--hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \
12741274
--hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248
12751275
# via aws-lambda-builders
1276-
1277-
# The following packages are considered to be unsafe in a requirements file:
1278-
setuptools==80.9.0 \
1279-
--hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \
1280-
--hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c
1281-
# via aws-lambda-builders

requirements/reproducible-win.txt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.12
3-
# by the following command:
4-
#
5-
# pip-compile --allow-unsafe --generate-hashes --output-file='requirements\reproducible-win.txt'
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile setup.py --generate-hashes --output-file requirements/reproducible-win.txt --python-platform windows --python-version 3.12 --no-cache --no-strip-extras
73
annotated-types==0.7.0 \
84
--hash=sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53 \
95
--hash=sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89
@@ -84,7 +80,7 @@ boto3[crt]==1.42.1 \
8480
# via
8581
# aws-sam-cli (setup.py)
8682
# aws-sam-translator
87-
boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.42.17 \
83+
boto3-stubs[apigateway, cloudformation, ecr, iam, kinesis, lambda, s3, schemas, secretsmanager, signer, sqs, stepfunctions, sts, xray]==1.42.17 \
8884
--hash=sha256:773a41e3249acb64d06558e1fa2fc44a09152dad2dce0c8bc61c3b49b00ce905 \
8985
--hash=sha256:847567107d658aa0143dd09074bba9cb646453251a86fb96c5fe12b3b0e504ee
9086
# via aws-sam-cli (setup.py)
@@ -1182,6 +1178,10 @@ s3transfer==0.16.0 \
11821178
--hash=sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe \
11831179
--hash=sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920
11841180
# via boto3
1181+
setuptools==80.9.0 \
1182+
--hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \
1183+
--hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c
1184+
# via aws-lambda-builders
11851185
six==1.17.0 \
11861186
--hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \
11871187
--hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81
@@ -1286,9 +1286,3 @@ wheel==0.45.1 \
12861286
--hash=sha256:661e1abd9198507b1409a20c02106d9670b2576e916d58f520316666abca6729 \
12871287
--hash=sha256:708e7481cc80179af0e556bbf0cc00b8444c7321e2700b8d8580231d13017248
12881288
# via aws-lambda-builders
1289-
1290-
# The following packages are considered to be unsafe in a requirements file:
1291-
setuptools==80.9.0 \
1292-
--hash=sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 \
1293-
--hash=sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c
1294-
# via aws-lambda-builders

0 commit comments

Comments
 (0)