From 135a7f41c295e65c31daa07a841041cb6137f000 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Thu, 5 Dec 2024 09:42:44 -0500 Subject: [PATCH 1/6] runtime: bump pkginfo to ~1.12 Signed-off-by: William Woodruff --- requirements/runtime.in | 3 +++ requirements/runtime.txt | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/requirements/runtime.in b/requirements/runtime.in index cd43891..308168c 100644 --- a/requirements/runtime.in +++ b/requirements/runtime.in @@ -1,5 +1,8 @@ twine ~= 6.0 +# NOTE: 1.12.0 and later enable support for metadata 2.4 +pkginfo ~= 1.12.0 + # NOTE: Used to detect an ambient OIDC credential for OIDC publishing, # NOTE: as well as PEP 740 attestations. id ~= 1.0 diff --git a/requirements/runtime.txt b/requirements/runtime.txt index d50cb0a..638b3cf 100644 --- a/requirements/runtime.txt +++ b/requirements/runtime.txt @@ -66,8 +66,10 @@ packaging==24.1 # -r runtime.in # pypi-attestations # twine -pkginfo==1.10.0 - # via twine +pkginfo==1.12.0 + # via + # -r runtime.in + # twine platformdirs==4.2.2 # via sigstore pyasn1==0.6.0 From 3f7b27164f160ed930e4e9755a1292096364ce21 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Thu, 5 Dec 2024 09:45:17 -0500 Subject: [PATCH 2/6] requirements: add twine PR ref Signed-off-by: William Woodruff --- requirements/runtime.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements/runtime.in b/requirements/runtime.in index 308168c..63d2a7d 100644 --- a/requirements/runtime.in +++ b/requirements/runtime.in @@ -1,6 +1,8 @@ twine ~= 6.0 # NOTE: 1.12.0 and later enable support for metadata 2.4 +# NOTE: This can be dropped once twine stops using pkginfo +# Ref: https://github.com/pypa/twine/pull/1180 pkginfo ~= 1.12.0 # NOTE: Used to detect an ambient OIDC credential for OIDC publishing, From 157222628391efac16984d028d83a3f1b103d60d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 6 Dec 2024 04:21:39 +0100 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=A7=AA=20Add=20a=20Maturin-based=20pa?= =?UTF-8?q?ckage=20to=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/reusable-smoke-test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/reusable-smoke-test.yml b/.github/workflows/reusable-smoke-test.yml index ac59f08..aaf90ad 100644 --- a/.github/workflows/reusable-smoke-test.yml +++ b/.github/workflows/reusable-smoke-test.yml @@ -96,6 +96,14 @@ jobs: readme = "README.md" - name: Build the stub package sdist and wheel distributions run: python3 -m build + - name: Create the Rust package directory + run: mkdir -pv rust-example + - name: Initialize a Rust project + run: cargo init + working-directory: rust-example + - name: Build a Rust project + run: pipx run maturin build --release --out ../dist/ + working-directory: rust-example - name: Register the stub package in devpi run: twine register dist/*.tar.gz env: From 3c535cf57c9ff74b259316ebb950c9dfb9a94a2b Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 6 Dec 2024 04:37:55 +0100 Subject: [PATCH 4/6] debug! rust sdist+whl via pypa/build --- .github/workflows/reusable-smoke-test.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-smoke-test.yml b/.github/workflows/reusable-smoke-test.yml index aaf90ad..a5a5edd 100644 --- a/.github/workflows/reusable-smoke-test.yml +++ b/.github/workflows/reusable-smoke-test.yml @@ -101,9 +101,18 @@ jobs: - name: Initialize a Rust project run: cargo init working-directory: rust-example - - name: Build a Rust project - run: pipx run maturin build --release --out ../dist/ + - name: Populate the Rust package `pyproject.toml` + run: echo "$CONTENTS" > pyproject.toml + env: + CONTENTS: | + [build-system] + requires = [ + "maturin ~=1.0", + ] + build-backend = "maturin" working-directory: rust-example + - name: Build the stub package sdist and wheel distributions + run: python3 -m build rust-example/ - name: Register the stub package in devpi run: twine register dist/*.tar.gz env: From cf5261395bccb817440ea2699737843c3091184a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 6 Dec 2024 04:41:28 +0100 Subject: [PATCH 5/6] debug! dist dir --- .github/workflows/reusable-smoke-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-smoke-test.yml b/.github/workflows/reusable-smoke-test.yml index a5a5edd..2237bb5 100644 --- a/.github/workflows/reusable-smoke-test.yml +++ b/.github/workflows/reusable-smoke-test.yml @@ -112,7 +112,8 @@ jobs: build-backend = "maturin" working-directory: rust-example - name: Build the stub package sdist and wheel distributions - run: python3 -m build rust-example/ + run: python3 -m build -o ../dist/ + working-directory: rust-example - name: Register the stub package in devpi run: twine register dist/*.tar.gz env: From 30bbd88cebd72a3d3f4bd19de2c91fcd724e1d9d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Fri, 6 Dec 2024 04:44:41 +0100 Subject: [PATCH 6/6] debug! Iterate over the dists --- .github/workflows/reusable-smoke-test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-smoke-test.yml b/.github/workflows/reusable-smoke-test.yml index 2237bb5..1b59efa 100644 --- a/.github/workflows/reusable-smoke-test.yml +++ b/.github/workflows/reusable-smoke-test.yml @@ -115,7 +115,12 @@ jobs: run: python3 -m build -o ../dist/ working-directory: rust-example - name: Register the stub package in devpi - run: twine register dist/*.tar.gz + run: | + for dist in dist/*.tar.gz + do + echo "Registering ${dist}..." + twine register "${dist}" + done env: TWINE_USERNAME: ${{ env.devpi-username }} TWINE_PASSWORD: ${{ env.devpi-password }}