From ab36450143c2bd1c384ac1393ba7a4b62efeb90e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 13:03:54 +0000 Subject: [PATCH 1/2] build(deps): bump pyo3 in /examples/namespace_package Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.15.1 to 0.16.0. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.15.1...v0.16.0) --- updated-dependencies: - dependency-name: pyo3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- examples/namespace_package/Cargo.lock | 72 ++++++++------------------- examples/namespace_package/Cargo.toml | 2 +- 2 files changed, 23 insertions(+), 51 deletions(-) diff --git a/examples/namespace_package/Cargo.lock b/examples/namespace_package/Cargo.lock index a0314e01..0bd4d291 100644 --- a/examples/namespace_package/Cargo.lock +++ b/examples/namespace_package/Cargo.lock @@ -16,24 +16,10 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "indoc" -version = "0.3.6" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47741a8bc60fb26eb8d6e0238bbb26d8575ff623fdc97b1a2c00c050b9684ed8" +checksum = "e7906a9fababaeacb774f72410e497a1d18de916322e33797bb2cd29baa23c9e" dependencies = [ - "indoc-impl", - "proc-macro-hack", -] - -[[package]] -name = "indoc-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce046d161f000fffde5f432a0d034d0341dc152643b2598ed5bfce44c4f3a8f0" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", "unindent", ] @@ -99,31 +85,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "paste" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" -dependencies = [ - "paste-impl", - "proc-macro-hack", -] - -[[package]] -name = "paste-impl" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" -dependencies = [ - "proc-macro-hack", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" version = "1.0.36" @@ -135,35 +96,46 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cf01dbf1c05af0a14c7779ed6f3aa9deac9c3419606ac9de537a2d649005720" +checksum = "a378727d5fdcaafd15b5afe9842cff1c25fdc43f62a162ffda2263c57ad98703" dependencies = [ "cfg-if", "indoc", "libc", "parking_lot", - "paste", "pyo3-build-config", + "pyo3-ffi", "pyo3-macros", "unindent", ] [[package]] name = "pyo3-build-config" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf9e4d128bfbddc898ad3409900080d8d5095c379632fbbfbb9c8cfb1fb852b" +checksum = "4fbb27a3e96edd34c13d97d0feefccc90a79270c577c66e19d95af8323823dfc" dependencies = [ "once_cell", ] +[[package]] +name = "pyo3-ffi" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b719fff844bcf3f911132112ec06527eb195f6a98e0c42cf97e1118929fd4ea" +dependencies = [ + "libc", + "pyo3-build-config", +] + [[package]] name = "pyo3-macros" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67701eb32b1f9a9722b4bc54b548ff9d7ebfded011c12daece7b9063be1fd755" +checksum = "f795e52d3320abb349ca28b501a7112154a87f353fae1c811deecd58e99cfa9b" dependencies = [ + "proc-macro2", "pyo3-macros-backend", "quote", "syn", @@ -171,9 +143,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44f09e825ee49a105f2c7b23ebee50886a9aee0746f4dd5a704138a64b0218a" +checksum = "39e03aa57a3bb7b96982958088df38302a139df4eef54671bc595f26556cb75b" dependencies = [ "proc-macro2", "pyo3-build-config", diff --git a/examples/namespace_package/Cargo.toml b/examples/namespace_package/Cargo.toml index 3e2ebe4f..41dea1de 100644 --- a/examples/namespace_package/Cargo.toml +++ b/examples/namespace_package/Cargo.toml @@ -7,4 +7,4 @@ edition = "2018" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.15.1", features = ["extension-module"] } +pyo3 = { version = "0.16.2", features = ["extension-module"] } From 49e9000c661ece1d8b4a6a56479aea760bf5516d Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:20:13 +0000 Subject: [PATCH 2/2] ci: use nox --- .github/workflows/ci.yml | 13 +++---------- CHANGELOG.md | 3 +++ examples/hello-world/noxfile.py | 12 ++++++++++++ examples/hello-world/pytest.ini | 0 examples/hello-world/tox.ini | 10 ---------- examples/html-py-ever/noxfile.py | 12 ++++++++++++ examples/html-py-ever/pytest.ini | 0 examples/html-py-ever/tox.ini | 16 ---------------- examples/namespace_package/noxfile.py | 12 ++++++++++++ examples/namespace_package/pytest.ini | 0 examples/namespace_package/tox.ini | 15 --------------- examples/rust_with_cffi/noxfile.py | 12 ++++++++++++ examples/rust_with_cffi/pytest.ini | 0 examples/rust_with_cffi/tox.ini | 15 --------------- noxfile.py | 9 +++++++++ setup.cfg | 2 +- 16 files changed, 64 insertions(+), 67 deletions(-) create mode 100644 examples/hello-world/noxfile.py create mode 100644 examples/hello-world/pytest.ini delete mode 100644 examples/hello-world/tox.ini create mode 100644 examples/html-py-ever/noxfile.py create mode 100644 examples/html-py-ever/pytest.ini delete mode 100644 examples/html-py-ever/tox.ini create mode 100644 examples/namespace_package/noxfile.py create mode 100644 examples/namespace_package/pytest.ini delete mode 100644 examples/namespace_package/tox.ini create mode 100644 examples/rust_with_cffi/noxfile.py create mode 100644 examples/rust_with_cffi/pytest.ini delete mode 100644 examples/rust_with_cffi/tox.ini create mode 100644 noxfile.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a385edf..ce289977 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: # If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }} matrix: - python-version: [3.7, 3.8, 3.9, "3.10", pypy-3.7, pypy-3.8] + python-version: ["3.7", "3.8", "3.9", "3.10", pypy-3.7, pypy-3.8] platform: [ { os: "macos-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }, { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }, @@ -96,11 +96,7 @@ jobs: run: rustup target add aarch64-apple-darwin - name: Install test dependencies - run: pip install --upgrade tox - - - name: Install wheel (workaround python 3.10 CI issue) - if: matrix.python-version == '3.10-dev' - run: pip install --upgrade wheel + run: pip install --upgrade nox - name: Build package run: pip install -e . @@ -109,10 +105,7 @@ jobs: shell: bash env: PYTHON: ${{ matrix.python-version }} - run: | - for example_dir in examples/*; do - tox -c $example_dir -e py -vvvv - done + run: nox -s test-examples - name: Test macOS universal2 if: matrix.platform.os == 'macos-latest' && !startsWith(matrix.python-version, 'pypy') diff --git a/CHANGELOG.md b/CHANGELOG.md index 42eb9291..df97ca3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## Unreleased +### Packaging +- Drop support for Python 3.6. [#209](https://github.com/PyO3/setuptools-rust/pull/209) + ### Added - Add support for `kebab-case` executable names. [#205](https://github.com/PyO3/setuptools-rust/pull/205) - Add support for custom cargo profiles. [#216](https://github.com/PyO3/setuptools-rust/pull/216) diff --git a/examples/hello-world/noxfile.py b/examples/hello-world/noxfile.py new file mode 100644 index 00000000..e980e6f3 --- /dev/null +++ b/examples/hello-world/noxfile.py @@ -0,0 +1,12 @@ +from os.path import dirname + +import nox + +SETUPTOOLS_RUST = dirname(dirname(dirname(__file__))) + + +@nox.session() +def test(session: nox.Session): + session.install(SETUPTOOLS_RUST) + session.install(".") + session.run("hello-world", *session.posargs) diff --git a/examples/hello-world/pytest.ini b/examples/hello-world/pytest.ini new file mode 100644 index 00000000..e69de29b diff --git a/examples/hello-world/tox.ini b/examples/hello-world/tox.ini deleted file mode 100644 index 33626a80..00000000 --- a/examples/hello-world/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -requires = - setuptools-rust @ file://{toxinidir}/../../ - -[testenv] -description = Run the unit tests under {basepython} -deps = - setuptools-rust @ file://{toxinidir}/../../ -commands = hello-world {posargs} -passenv = * diff --git a/examples/html-py-ever/noxfile.py b/examples/html-py-ever/noxfile.py new file mode 100644 index 00000000..9d09f8e0 --- /dev/null +++ b/examples/html-py-ever/noxfile.py @@ -0,0 +1,12 @@ +from os.path import dirname + +import nox + +SETUPTOOLS_RUST = dirname(dirname(dirname(__file__))) + + +@nox.session() +def test(session: nox.Session): + session.install(SETUPTOOLS_RUST, "pytest", "pytest-benchmark", "beautifulsoup4") + session.install(".") + session.run("pytest", *session.posargs) diff --git a/examples/html-py-ever/pytest.ini b/examples/html-py-ever/pytest.ini new file mode 100644 index 00000000..e69de29b diff --git a/examples/html-py-ever/tox.ini b/examples/html-py-ever/tox.ini deleted file mode 100644 index bde8256e..00000000 --- a/examples/html-py-ever/tox.ini +++ /dev/null @@ -1,16 +0,0 @@ -[tox] -requires = - setuptools-rust @ file://{toxinidir}/../../ - -[testenv] -description = Run the unit tests under {basepython} -deps = - setuptools-rust @ file://{toxinidir}/../../ - pytest-benchmark - beautifulsoup4 - pytest>=3.6 -commands = pytest {posargs} - -[pytest] -testpaths = - test diff --git a/examples/namespace_package/noxfile.py b/examples/namespace_package/noxfile.py new file mode 100644 index 00000000..5723114b --- /dev/null +++ b/examples/namespace_package/noxfile.py @@ -0,0 +1,12 @@ +from os.path import dirname + +import nox + +SETUPTOOLS_RUST = dirname(dirname(dirname(__file__))) + + +@nox.session() +def test(session: nox.Session): + session.install(SETUPTOOLS_RUST, "pytest") + session.install(".") + session.run("pytest", *session.posargs) diff --git a/examples/namespace_package/pytest.ini b/examples/namespace_package/pytest.ini new file mode 100644 index 00000000..e69de29b diff --git a/examples/namespace_package/tox.ini b/examples/namespace_package/tox.ini deleted file mode 100644 index a8ebe231..00000000 --- a/examples/namespace_package/tox.ini +++ /dev/null @@ -1,15 +0,0 @@ -[tox] -requires = - setuptools-rust @ file://{toxinidir}/../../ - -[testenv] -description = Run the unit tests under {basepython} -deps = - setuptools-rust @ file://{toxinidir}/../../ - pytest -commands = pytest {posargs} -passenv = * - -[pytest] -testpaths = - tests diff --git a/examples/rust_with_cffi/noxfile.py b/examples/rust_with_cffi/noxfile.py new file mode 100644 index 00000000..85679e36 --- /dev/null +++ b/examples/rust_with_cffi/noxfile.py @@ -0,0 +1,12 @@ +from os.path import dirname + +import nox + +SETUPTOOLS_RUST = dirname(dirname(dirname(__file__))) + + +@nox.session() +def test(session: nox.Session): + session.install(SETUPTOOLS_RUST, "pytest", "cffi") + session.install(".") + session.run("pytest", *session.posargs) diff --git a/examples/rust_with_cffi/pytest.ini b/examples/rust_with_cffi/pytest.ini new file mode 100644 index 00000000..e69de29b diff --git a/examples/rust_with_cffi/tox.ini b/examples/rust_with_cffi/tox.ini deleted file mode 100644 index 13fb99ba..00000000 --- a/examples/rust_with_cffi/tox.ini +++ /dev/null @@ -1,15 +0,0 @@ -[tox] -requires = - setuptools-rust @ file://{toxinidir}/../../ - -[testenv] -description = Run the unit tests under {basepython} -deps = - setuptools-rust @ file://{toxinidir}/../../ - pytest - cffi -commands = pytest {posargs} - -[pytest] -testpaths = - tests diff --git a/noxfile.py b/noxfile.py new file mode 100644 index 00000000..b4ce9873 --- /dev/null +++ b/noxfile.py @@ -0,0 +1,9 @@ +from glob import glob + +import nox + + +@nox.session(name="test-examples", venv_backend="none") +def test_examples(session: nox.Session): + for example in glob("examples/*/noxfile.py"): + session.run("nox", "-f", example, external=True) diff --git a/setup.cfg b/setup.cfg index 9cf0237a..036bb48f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,7 +28,7 @@ packages = setuptools_rust zip_safe = True install_requires = setuptools>=46.1; semantic_version>=2.8.2,<3; typing_extensions>=3.7.4.3 setup_requires = setuptools>=46.1; setuptools_scm>=6.3.2 -python_requires = >=3.6 +python_requires = >=3.7 [options.entry_points] distutils.commands =