diff --git a/noxfile.py b/noxfile.py index bfd74236f..9408110f0 100644 --- a/noxfile.py +++ b/noxfile.py @@ -24,17 +24,16 @@ def append_to_github_env(name: str, value: str): def update_pyo3(session: nox.Session): # TODO: support updating major and minor versions by editing Cargo.toml first test_crate_dir = Path("./test-crates").resolve() + crates_to_update = ["pyo3", "pyo3-ffi", "python3-dll-a"] for root, _, files in os.walk(test_crate_dir): if "Cargo.lock" in files: cargo_lock_path = Path(root) / "Cargo.lock" with open(cargo_lock_path, "r") as lock_file: content = lock_file.read() - if 'name = "pyo3"' in content: - with session.chdir(root): - session.run("cargo", f"+{MSRV}", "update", "-p", "pyo3", external=True) - elif 'name = "pyo3-ffi"' in content: - with session.chdir(root): - session.run("cargo", f"+{MSRV}", "update", "-p", "pyo3-ffi", external=True) + for crate in crates_to_update: + if f'name = "{crate}"' in content: + with session.chdir(root): + session.run("cargo", f"+{MSRV}", "update", "-p", crate, external=True) @nox.session(name="setup-pyodide", python=False) diff --git a/test-crates/pyo3-mixed-include-exclude/Cargo.lock b/test-crates/pyo3-mixed-include-exclude/Cargo.lock index 6678c36cd..9ec6fd57f 100644 --- a/test-crates/pyo3-mixed-include-exclude/Cargo.lock +++ b/test-crates/pyo3-mixed-include-exclude/Cargo.lock @@ -144,9 +144,9 @@ dependencies = [ [[package]] name = "python3-dll-a" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9e268ee1be609e93a13eb06839f68f67e5fe0fb4049834d261c2d5091c1b6d" +checksum = "9b66f9171950e674e64bad3456e11bb3cca108e5c34844383cfe277f45c8a7a8" dependencies = [ "cc", ] diff --git a/test-crates/pyo3-mixed-src/rust/Cargo.lock b/test-crates/pyo3-mixed-src/rust/Cargo.lock index bacf4f7b4..0be7419b7 100644 --- a/test-crates/pyo3-mixed-src/rust/Cargo.lock +++ b/test-crates/pyo3-mixed-src/rust/Cargo.lock @@ -141,9 +141,9 @@ dependencies = [ [[package]] name = "python3-dll-a" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9e268ee1be609e93a13eb06839f68f67e5fe0fb4049834d261c2d5091c1b6d" +checksum = "9b66f9171950e674e64bad3456e11bb3cca108e5c34844383cfe277f45c8a7a8" dependencies = [ "cc", ] diff --git a/test-crates/pyo3-mixed-with-path-dep/Cargo.lock b/test-crates/pyo3-mixed-with-path-dep/Cargo.lock index 634aca839..dfff8fa3f 100644 --- a/test-crates/pyo3-mixed-with-path-dep/Cargo.lock +++ b/test-crates/pyo3-mixed-with-path-dep/Cargo.lock @@ -145,9 +145,9 @@ dependencies = [ [[package]] name = "python3-dll-a" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9e268ee1be609e93a13eb06839f68f67e5fe0fb4049834d261c2d5091c1b6d" +checksum = "9b66f9171950e674e64bad3456e11bb3cca108e5c34844383cfe277f45c8a7a8" dependencies = [ "cc", ] diff --git a/test-crates/pyo3-mixed-workspace/rust/Cargo.lock b/test-crates/pyo3-mixed-workspace/rust/Cargo.lock index 3d6f6cb5c..a60d80cf4 100644 --- a/test-crates/pyo3-mixed-workspace/rust/Cargo.lock +++ b/test-crates/pyo3-mixed-workspace/rust/Cargo.lock @@ -149,9 +149,9 @@ dependencies = [ [[package]] name = "python3-dll-a" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9e268ee1be609e93a13eb06839f68f67e5fe0fb4049834d261c2d5091c1b6d" +checksum = "9b66f9171950e674e64bad3456e11bb3cca108e5c34844383cfe277f45c8a7a8" dependencies = [ "cc", ] diff --git a/test-crates/pyo3-mixed/Cargo.lock b/test-crates/pyo3-mixed/Cargo.lock index 17007757a..8795a8fec 100644 --- a/test-crates/pyo3-mixed/Cargo.lock +++ b/test-crates/pyo3-mixed/Cargo.lock @@ -144,9 +144,9 @@ dependencies = [ [[package]] name = "python3-dll-a" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9e268ee1be609e93a13eb06839f68f67e5fe0fb4049834d261c2d5091c1b6d" +checksum = "9b66f9171950e674e64bad3456e11bb3cca108e5c34844383cfe277f45c8a7a8" dependencies = [ "cc", ] diff --git a/test-crates/pyo3-pure/Cargo.lock b/test-crates/pyo3-pure/Cargo.lock index 2d136a2dc..433cb5825 100644 --- a/test-crates/pyo3-pure/Cargo.lock +++ b/test-crates/pyo3-pure/Cargo.lock @@ -148,9 +148,9 @@ dependencies = [ [[package]] name = "python3-dll-a" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9e268ee1be609e93a13eb06839f68f67e5fe0fb4049834d261c2d5091c1b6d" +checksum = "9b66f9171950e674e64bad3456e11bb3cca108e5c34844383cfe277f45c8a7a8" dependencies = [ "cc", ]