Skip to content

Commit 37dd294

Browse files
Handle wheel.bdist_wheel deprecation warning (#463)
* Handle wheel.bdist_wheel deprecation warning * Add relevant type ignore annotations * Remove unused type: ignore annotations * Remove wheel dependency and rely on setuptools providing bdist_wheel * Add temporary workaround for issue 117 of cffi * Further changes to avoid CI errors with CFFI * Ensure recent setuptools is installed to avoid CI error * Fallback to importing bdist_wheel from wheel for type-checking * remove pin * remove pins * CHANGELOG entry --------- Co-authored-by: David Hewitt <mail@davidhewitt.dev>
1 parent 4e5f25f commit 37dd294

File tree

18 files changed

+41
-35
lines changed

18 files changed

+41
-35
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
rustup target add aarch64-apple-darwin
121121
rustup target add x86_64-apple-darwin
122122
cd examples/namespace_package
123-
pip install build wheel
123+
pip install build 'setuptools>=70.1'
124124
python -m build --no-isolation
125125
ls -l dist/
126126
pip install --force-reinstall dist/namespace_package*_universal2.whl
@@ -163,7 +163,7 @@ jobs:
163163
set -e
164164
cd examples/rust_with_cffi/
165165
python --version
166-
pip install -U build cffi wheel
166+
pip install -U build cffi 'setuptools>=70.1'
167167
echo -e "[bdist_wheel]\npy_limited_api=cp39" > $DIST_EXTRA_CONFIG
168168
python -m build --no-isolation
169169
ls -la dist/
@@ -180,7 +180,6 @@ jobs:
180180
run: |
181181
set -e
182182
cd examples/
183-
pip install -U wheel
184183
python --version
185184
pip install rust_with_cffi/dist/rust_with_cffi*.whl
186185
python -c "from rust_with_cffi import rust; assert rust.rust_func() == 14"
@@ -235,7 +234,7 @@ jobs:
235234
run: |
236235
cd examples/namespace_package
237236
docker build -t cross-pyo3:aarch64-unknown-linux-gnu .
238-
python -m pip install build wheel
237+
python -m pip install build
239238
echo -e "[bdist_wheel]\nplat_name=manylinux2014_aarch64" > $DIST_EXTRA_CONFIG
240239
python -m build --no-isolation
241240
ls -la dist/
@@ -283,7 +282,7 @@ jobs:
283282
mkdir -p $PYO3_CROSS_LIB_DIR
284283
docker cp -L $(docker create --rm quay.io/pypa/manylinux2014_aarch64:latest):/opt/python/cp38-cp38 /opt/python
285284
cd examples/namespace_package
286-
python -m pip install build wheel
285+
python -m pip install build
287286
echo -e "[bdist_wheel]\nplat_name=manylinux2014_aarch64" > $DIST_EXTRA_CONFIG
288287
python -m build --no-isolation
289288
ls -la dist/
@@ -315,7 +314,7 @@ jobs:
315314
env:
316315
CIBW_BUILD: cp39-*
317316
CIBW_BEFORE_BUILD: >
318-
pip install -U 'pip>=23.2.1' 'setuptools>=68.0.0' 'wheel>=0.41.2' 'auditwheel>=5.4.0'
317+
pip install -U 'pip>=23.2.1' 'setuptools>=70.1.0' 'auditwheel>=5.4.0'
319318
&& pip install -e .
320319
&& pip list
321320
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
@@ -354,7 +353,7 @@ jobs:
354353

355354
- name: Install test dependencies
356355
shell: msys2 {0}
357-
run: python -m pip install --upgrade nox pip wheel
356+
run: python -m pip install --upgrade nox pip
358357

359358
- name: Create libpython symlink
360359
shell: msys2 {0}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.10.2 (2024-10-01)
4+
### Fixed
5+
- Fix deprecation warning from use of `wheel.bdist_wheel`.
6+
37
## 1.10.1 (2024-08-04)
48
### Fixed
59
- Fix regression in 1.10.0 where editable builds would be built in release mode

examples/hello-world-script/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@nox.session()
99
def test(session: nox.Session):
10-
session.install(SETUPTOOLS_RUST, "wheel")
10+
session.install(SETUPTOOLS_RUST)
1111
# Ensure build uses version of setuptools-rust under development
1212
session.install("--no-build-isolation", ".")
1313
# Test Rust binary

examples/hello-world-script/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "setuptools-rust"]
2+
requires = ["setuptools", "setuptools-rust"]
33
build-backend = "setuptools.build_meta"
44

55
[project]

examples/hello-world-setuppy/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@nox.session()
99
def test(session: nox.Session):
10-
session.install(SETUPTOOLS_RUST, "wheel")
10+
session.install(SETUPTOOLS_RUST)
1111
# Ensure build uses version of setuptools-rust under development
1212
session.install("--no-build-isolation", ".")
1313
# Test Rust binary
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "setuptools-rust"]
2+
requires = ["setuptools", "setuptools-rust"]
33
build-backend = "setuptools.build_meta"

examples/hello-world/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@nox.session()
99
def test(session: nox.Session):
10-
session.install(SETUPTOOLS_RUST, "wheel", "build", "pytest")
10+
session.install(SETUPTOOLS_RUST, "build", "pytest")
1111
# Ensure build works as intended
1212
session.install("--no-build-isolation", ".")
1313
# Test Rust binary

examples/html-py-ever/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ test_bench_selector_python[/home/david/dev/setuptools-rust/examples/html-py-ever
9696

9797
**building and installing**
9898
```
99-
pip install setuptools-rust setuptools wheel
99+
pip install setuptools-rust setuptools
100100
python3 setup.py install --user
101101
```
102102

examples/html-py-ever/build-wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export PATH="$HOME/.cargo/bin:$PATH"
77
# Compile wheels
88
for PYBIN in /opt/python/cp{37,38,39,310}*/bin; do
99
rm -rf /io/build/
10-
"${PYBIN}/pip" install -U setuptools setuptools-rust wheel
10+
"${PYBIN}/pip" install -U setuptools setuptools-rust
1111
"${PYBIN}/pip" wheel /io/ -w /io/dist/ --no-deps
1212
done
1313

examples/html-py-ever/noxfile.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
@nox.session()
99
def test(session: nox.Session):
10-
session.install(
11-
SETUPTOOLS_RUST, "wheel", "pytest", "pytest-benchmark", "beautifulsoup4"
12-
)
10+
session.install(SETUPTOOLS_RUST, "pytest", "pytest-benchmark", "beautifulsoup4")
1311
# Ensure build uses version of setuptools-rust under development
1412
session.install("--no-build-isolation", ".")
1513
# Test Python package

0 commit comments

Comments
 (0)