Skip to content

Commit f371c3d

Browse files
authored
Merge pull request #313 from webknjaz/maintenance/metadata-2.4
This patch adds support for uploading dists with metadata v2.4 through bumping the transitive dependency `pkgutil` to v1.12 to enable support for validating metadata v2.4 in Twine. It also integrates a Maturin-based package into the smoke test in CI as a regression check. Closes #312 Resolves #311 Resolves #310
2 parents e7723a4 + 138a121 commit f371c3d

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

.github/workflows/reusable-smoke-test.yml

+24-1
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,31 @@ jobs:
9696
readme = "README.md"
9797
- name: Build the stub package sdist and wheel distributions
9898
run: python3 -m build
99+
- name: Create the Rust package directory
100+
run: mkdir -pv rust-example
101+
- name: Initialize a Rust project
102+
run: cargo init
103+
working-directory: rust-example
104+
- name: Populate the Rust package `pyproject.toml`
105+
run: echo "$CONTENTS" > pyproject.toml
106+
env:
107+
CONTENTS: |
108+
[build-system]
109+
requires = [
110+
"maturin ~=1.0",
111+
]
112+
build-backend = "maturin"
113+
working-directory: rust-example
114+
- name: Build the stub package sdist and wheel distributions
115+
run: python3 -m build -o ../dist/
116+
working-directory: rust-example
99117
- name: Register the stub package in devpi
100-
run: twine register dist/*.tar.gz
118+
run: |
119+
for dist in dist/*.tar.gz
120+
do
121+
echo "Registering ${dist}..."
122+
twine register "${dist}"
123+
done
101124
env:
102125
TWINE_USERNAME: ${{ env.devpi-username }}
103126
TWINE_PASSWORD: ${{ env.devpi-password }}

requirements/runtime.in

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
twine ~= 6.0
22

3+
# NOTE: 1.12.0 and later enable support for metadata 2.4
4+
# NOTE: This can be dropped once twine stops using pkginfo
5+
# Ref: https://github.com/pypa/twine/pull/1180
6+
pkginfo ~= 1.12.0
7+
38
# NOTE: Used to detect an ambient OIDC credential for OIDC publishing,
49
# NOTE: as well as PEP 740 attestations.
510
id ~= 1.0

requirements/runtime.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ packaging==24.1
6666
# -r runtime.in
6767
# pypi-attestations
6868
# twine
69-
pkginfo==1.10.0
70-
# via twine
69+
pkginfo==1.12.0
70+
# via
71+
# -r runtime.in
72+
# twine
7173
platformdirs==4.2.2
7274
# via sigstore
7375
pyasn1==0.6.0

0 commit comments

Comments
 (0)