Skip to content

Commit 49e9000

Browse files
committed
ci: use nox
1 parent ab36450 commit 49e9000

File tree

16 files changed

+64
-67
lines changed

16 files changed

+64
-67
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
# If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
6060
fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
6161
matrix:
62-
python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.7, pypy-3.8]
62+
python-version: ["3.7", "3.8", "3.9", "3.10", pypy-3.7, pypy-3.8]
6363
platform: [
6464
{ os: "macos-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
6565
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
@@ -96,11 +96,7 @@ jobs:
9696
run: rustup target add aarch64-apple-darwin
9797

9898
- name: Install test dependencies
99-
run: pip install --upgrade tox
100-
101-
- name: Install wheel (workaround python 3.10 CI issue)
102-
if: matrix.python-version == '3.10-dev'
103-
run: pip install --upgrade wheel
99+
run: pip install --upgrade nox
104100

105101
- name: Build package
106102
run: pip install -e .
@@ -109,10 +105,7 @@ jobs:
109105
shell: bash
110106
env:
111107
PYTHON: ${{ matrix.python-version }}
112-
run: |
113-
for example_dir in examples/*; do
114-
tox -c $example_dir -e py -vvvv
115-
done
108+
run: nox -s test-examples
116109

117110
- name: Test macOS universal2
118111
if: matrix.platform.os == 'macos-latest' && !startsWith(matrix.python-version, 'pypy')

CHANGELOG.md

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

33
## Unreleased
4+
### Packaging
5+
- Drop support for Python 3.6. [#209](https://github.com/PyO3/setuptools-rust/pull/209)
6+
47
### Added
58
- Add support for `kebab-case` executable names. [#205](https://github.com/PyO3/setuptools-rust/pull/205)
69
- Add support for custom cargo profiles. [#216](https://github.com/PyO3/setuptools-rust/pull/216)

examples/hello-world/noxfile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from os.path import dirname
2+
3+
import nox
4+
5+
SETUPTOOLS_RUST = dirname(dirname(dirname(__file__)))
6+
7+
8+
@nox.session()
9+
def test(session: nox.Session):
10+
session.install(SETUPTOOLS_RUST)
11+
session.install(".")
12+
session.run("hello-world", *session.posargs)

examples/hello-world/pytest.ini

Whitespace-only changes.

examples/hello-world/tox.ini

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/html-py-ever/noxfile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from os.path import dirname
2+
3+
import nox
4+
5+
SETUPTOOLS_RUST = dirname(dirname(dirname(__file__)))
6+
7+
8+
@nox.session()
9+
def test(session: nox.Session):
10+
session.install(SETUPTOOLS_RUST, "pytest", "pytest-benchmark", "beautifulsoup4")
11+
session.install(".")
12+
session.run("pytest", *session.posargs)

examples/html-py-ever/pytest.ini

Whitespace-only changes.

examples/html-py-ever/tox.ini

Lines changed: 0 additions & 16 deletions
This file was deleted.

examples/namespace_package/noxfile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from os.path import dirname
2+
3+
import nox
4+
5+
SETUPTOOLS_RUST = dirname(dirname(dirname(__file__)))
6+
7+
8+
@nox.session()
9+
def test(session: nox.Session):
10+
session.install(SETUPTOOLS_RUST, "pytest")
11+
session.install(".")
12+
session.run("pytest", *session.posargs)

examples/namespace_package/pytest.ini

Whitespace-only changes.

examples/namespace_package/tox.ini

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/rust_with_cffi/noxfile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from os.path import dirname
2+
3+
import nox
4+
5+
SETUPTOOLS_RUST = dirname(dirname(dirname(__file__)))
6+
7+
8+
@nox.session()
9+
def test(session: nox.Session):
10+
session.install(SETUPTOOLS_RUST, "pytest", "cffi")
11+
session.install(".")
12+
session.run("pytest", *session.posargs)

examples/rust_with_cffi/pytest.ini

Whitespace-only changes.

examples/rust_with_cffi/tox.ini

Lines changed: 0 additions & 15 deletions
This file was deleted.

noxfile.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from glob import glob
2+
3+
import nox
4+
5+
6+
@nox.session(name="test-examples", venv_backend="none")
7+
def test_examples(session: nox.Session):
8+
for example in glob("examples/*/noxfile.py"):
9+
session.run("nox", "-f", example, external=True)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ packages = setuptools_rust
2828
zip_safe = True
2929
install_requires = setuptools>=46.1; semantic_version>=2.8.2,<3; typing_extensions>=3.7.4.3
3030
setup_requires = setuptools>=46.1; setuptools_scm>=6.3.2
31-
python_requires = >=3.6
31+
python_requires = >=3.7
3232

3333
[options.entry_points]
3434
distutils.commands =

0 commit comments

Comments
 (0)