Skip to content

Commit 9838a26

Browse files
authored
Merge pull request #232 from messense/examples-pep517
Add `pyproject.toml` to examples
2 parents f2a62c3 + 9f54a84 commit 9838a26

File tree

6 files changed

+14
-2
lines changed

6 files changed

+14
-2
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187
python -c "from rust_with_cffi import rust; assert rust.rust_func() == 14"
188188
python -c "from rust_with_cffi.cffi import lib; assert lib.cffi_func() == 15"
189189
190-
test-cross-compile:
190+
test-crossenv:
191191
runs-on: ubuntu-latest
192192
strategy:
193193
# If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
@@ -204,6 +204,10 @@ jobs:
204204
echo 'curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
205205
source ~/.cargo/env
206206
rustup target add ${{ matrix.platform.target }}
207+
208+
# https://github.com/pypa/setuptools_scm/issues/707
209+
git config --global --add safe.directory /io
210+
207211
cd examples/rust_with_cffi/
208212
python3.9 -m pip install crossenv
209213
python3.9 -m crossenv "/opt/python/cp39-cp39/bin/python3" --cc $TARGET_CC --cxx $TARGET_CXX --sysroot $TARGET_SYSROOT --env LIBRARY_PATH= --manylinux manylinux1 venv

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Finished processing dependencies for hello_rust==1.0
8080
Or you can use commands like `bdist_wheel` (after installing `wheel`). See also [the notes in the documentation about building wheels](https://setuptools-rust.readthedocs.io/en/latest/building_wheels.html).
8181

8282
Cross-compiling is also supported, using one of [`crossenv`](https://github.com/benfogle/crossenv), [`cross`](https://github.com/rust-embedded/cross) or [`cargo-zigbuild`](https://github.com/messense/cargo-zigbuild).
83-
For examples see the `test-cross-compile` and `test-cross` and `test-zigbuild` Github actions jobs in [`ci.yml`](https://github.com/PyO3/setuptools-rust/blob/main/.github/workflows/ci.yml).
83+
For examples see the `test-crossenv` and `test-cross` and `test-zigbuild` Github actions jobs in [`ci.yml`](https://github.com/PyO3/setuptools-rust/blob/main/.github/workflows/ci.yml).
8484

8585
By default, `develop` will create a debug build, while `install` will create a release build.
8686

examples/hello-world/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel", "setuptools-rust"]

examples/html-py-ever/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel", "setuptools-rust"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel", "setuptools-rust"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel", "setuptools-rust"]

0 commit comments

Comments
 (0)