Skip to content

Commit 8aee60e

Browse files
IvanIsCodingmtreinish
authored andcommitted
DNM: Fix sdist and retrigger release job
This commit updates the release artifact workflow to only run the sdist build and manually trigger the job on a throwaway branch. The 0.17.1 release was missing its sdist because of broken package metadata. This commit bundles the fix from #1494 and adjust the workflow to run from the branch so as to not polute the git history of a tracked branch.
1 parent 7318a80 commit 8aee60e

File tree

3 files changed

+6
-167
lines changed

3 files changed

+6
-167
lines changed

.github/workflows/wheels.yml

Lines changed: 5 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -2,197 +2,37 @@
22
name: Wheel Builds
33
on:
44
push:
5-
tags:
6-
- '*'
5+
branches:
6+
- 'dnm-retrigger-0.17.1'
77
jobs:
8-
rustworkx-core:
9-
name: Publish rustworkx-core
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v4
13-
- uses: dtolnay/rust-toolchain@stable
14-
- name: Run cargo publish
15-
run: |
16-
cd rustworkx-core
17-
cargo publish
18-
env:
19-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
208
sdist:
219
name: Build sdist
2210
runs-on: ubuntu-latest
2311
environment: release
2412
permissions:
2513
id-token: write
26-
needs: ["upload_shared_wheels"]
2714
steps:
2815
- uses: actions/checkout@v4
2916
- uses: actions/setup-python@v5
3017
name: Install Python
3118
with:
3219
python-version: '3.10'
3320
- name: Install deps
34-
run: pip install -U setuptools-rust
21+
run: pip install -U setuptools-rust build
3522
- name: Build sdist
36-
run: python setup.py sdist
23+
run: python -m build --sdist
3724
- uses: actions/upload-artifact@v4
3825
with:
3926
path: ./dist/*
4027
name: sdist-rustworkx
4128
- name: Publish package distributions to PyPI
4229
uses: pypa/gh-action-pypi-publish@release/v1
43-
build_wheels:
44-
name: Build wheels on ${{ matrix.os }}
45-
runs-on: ${{ matrix.os }}
46-
environment: release
47-
strategy:
48-
fail-fast: false
49-
matrix:
50-
os: [ubuntu-latest, windows-latest, macos-13, macos-14, ubuntu-24.04-arm]
51-
steps:
52-
- uses: actions/checkout@v4
53-
- uses: actions/setup-python@v5
54-
name: Install Python
55-
with:
56-
python-version: '3.10'
57-
- uses: dtolnay/rust-toolchain@stable
58-
- name: Install cibuildwheel
59-
run: |
60-
python -m pip install -U --group releaseinfra
61-
- name: Build wheels
62-
run: |
63-
python -m cibuildwheel --output-dir wheelhouse
64-
- uses: actions/upload-artifact@v4
65-
with:
66-
path: ./wheelhouse/*.whl
67-
name: shared-wheel-builds-${{ matrix.os }}
68-
upload_shared_wheels:
69-
name: Upload shared build wheels
70-
runs-on: ubuntu-latest
71-
environment: release
72-
permissions:
73-
id-token: write
74-
needs: ["build_wheels", "build-win32-wheels"]
75-
steps:
76-
- uses: actions/download-artifact@v4
77-
with:
78-
pattern: shared-wheel-builds-*
79-
merge-multiple: true
80-
path: deploy
81-
- name: Publish package distributions to PyPI
82-
uses: pypa/gh-action-pypi-publish@release/v1
83-
with:
84-
packages-dir: deploy
85-
build_wheels_ppc64le:
86-
name: Build wheels on ${{ matrix.os }}
87-
runs-on: ${{ matrix.os }}
88-
environment: release
89-
permissions:
90-
id-token: write
91-
strategy:
92-
fail-fast: false
93-
matrix:
94-
os: [ubuntu-latest]
95-
steps:
96-
- uses: actions/checkout@v4
97-
- uses: actions/setup-python@v5
98-
name: Install Python
99-
with:
100-
python-version: '3.10'
101-
- uses: dtolnay/rust-toolchain@stable
102-
- name: Set up QEMU
103-
uses: docker/setup-qemu-action@v2
104-
with:
105-
platforms: all
106-
- name: Install cibuildwheel
107-
run: |
108-
python -m pip install -U --group releaseinfra
109-
- name: Build wheels
110-
run: |
111-
python -m cibuildwheel --output-dir wheelhouse
112-
env:
113-
CIBW_SKIP: cp36-* cp37-* pp* *win32 *musl*
114-
CIBW_ARCHS_LINUX: ppc64le
115-
- uses: actions/upload-artifact@v4
116-
with:
117-
path: ./wheelhouse/*.whl
118-
name: wheel-builds-ppc64le
119-
- name: Publish package distributions to PyPI
120-
uses: pypa/gh-action-pypi-publish@release/v1
121-
with:
122-
packages-dir: wheelhouse/
123-
build_wheels_s390x:
124-
name: Build wheels on ${{ matrix.os }}
125-
runs-on: ${{ matrix.os }}
126-
environment: release
127-
permissions:
128-
id-token: write
129-
strategy:
130-
fail-fast: false
131-
matrix:
132-
os: [ubuntu-latest]
133-
steps:
134-
- uses: actions/checkout@v4
135-
- uses: actions/setup-python@v5
136-
name: Install Python
137-
with:
138-
python-version: '3.10'
139-
- uses: dtolnay/rust-toolchain@stable
140-
- name: Set up QEMU
141-
uses: docker/setup-qemu-action@v2
142-
with:
143-
platforms: all
144-
- name: Install cibuildwheel
145-
run: |
146-
python -m pip install -U --group releaseinfra
147-
- name: Build wheels
148-
run: |
149-
python -m cibuildwheel --output-dir wheelhouse
150-
env:
151-
CIBW_SKIP: cp36-* cp37-* pp* *win32 *musl*
152-
CIBW_ARCHS_LINUX: s390x
153-
- uses: actions/upload-artifact@v4
154-
with:
155-
path: ./wheelhouse/*.whl
156-
name: wheel-builds-s390x
157-
- name: Publish package distributions to PyPI
158-
uses: pypa/gh-action-pypi-publish@release/v1
159-
with:
160-
packages-dir: wheelhouse/
161-
build-win32-wheels:
162-
name: Build wheels on win32
163-
runs-on: windows-latest
164-
environment: release
165-
steps:
166-
- uses: actions/checkout@v4
167-
- uses: actions/setup-python@v5
168-
name: Install Python
169-
with:
170-
python-version: '3.10'
171-
architecture: 'x86'
172-
- uses: dtolnay/rust-toolchain@stable
173-
with:
174-
targets: i686-pc-windows-msvc
175-
- name: Force win32 rust
176-
run: rustup default stable-i686-pc-windows-msvc
177-
- name: Install cibuildwheel
178-
run: |
179-
python -m pip install -U --group releaseinfra
180-
- name: Build wheels
181-
run: |
182-
python -m cibuildwheel --output-dir wheelhouse
183-
env:
184-
CIBW_SKIP: cp36-* cp37-* pp* *amd64 *musl*
185-
- uses: actions/upload-artifact@v4
186-
with:
187-
path: ./wheelhouse/*.whl
188-
name: shared-wheel-builds-win32
18930
retworkx-compat-build:
19031
name: Build retworkx
19132
runs-on: ubuntu-latest
19233
environment: release
19334
permissions:
19435
id-token: write
195-
needs: ["upload_shared_wheels"]
19636
steps:
19737
- uses: actions/checkout@v4
19838
- uses: actions/setup-python@v5
@@ -205,7 +45,7 @@ jobs:
20545
run: pushd retworkx && python setup.py bdist_wheel && popd
20646
- uses: actions/upload-artifact@v4
20747
with:
208-
path: ./retworkx/dist/*
48+
path: ./dist/*
20949
name: sdist-retworkx
21050
- name: Publish package distributions to PyPI
21151
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ dependencies = [
88
]
99
readme = {file = "README.md", content-type = "text/markdown"}
1010
license-files = ["LICENSE"]
11-
license = "Apache-2.0"
1211
classifiers=[
1312
"Intended Audience :: Developers",
1413
"Intended Audience :: Science/Research",

retworkx/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
long_description_content_type="text/markdown",
4343
author=pyproject["project"]["authors"][0]["name"],
4444
author_email=pyproject["project"]["authors"][0]["email"],
45-
license=pyproject["project"]["license"],
45+
license="Apache-2.0",
4646
classifiers=pyproject["project"]["classifiers"],
4747
keywords=pyproject["project"]["keywords"],
4848
project_urls=pyproject["project"]["urls"],

0 commit comments

Comments
 (0)