Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-setuptools-rust for
openSUSE:Factory checked in at 2026-06-29 17:29:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-setuptools-rust (Old)
and /work/SRC/openSUSE:Factory/.python-setuptools-rust.new.11887 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-setuptools-rust"
Mon Jun 29 17:29:43 2026 rev:16 rq:1362157 version:1.13.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-setuptools-rust/python-setuptools-rust.changes
2026-04-01 19:55:39.193642351 +0200
+++
/work/SRC/openSUSE:Factory/.python-setuptools-rust.new.11887/python-setuptools-rust.changes
2026-06-29 17:30:13.173737812 +0200
@@ -1,0 +2,9 @@
+Sun Jun 28 11:17:54 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 1.13.0:
+ * Add `generated-files` option to `RustExtension` to copy files
+ from the build script output directory to the wheel. #574
+ * Add `-Zunstable-options` when querying rustc for information
+ about custom JSON targets. #587
+
+-------------------------------------------------------------------
Old:
----
setuptools_rust-1.12.1.tar.gz
New:
----
setuptools_rust-1.13.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-setuptools-rust.spec ++++++
--- /var/tmp/diff_new_pack.qIqZPi/_old 2026-06-29 17:30:14.201773255 +0200
+++ /var/tmp/diff_new_pack.qIqZPi/_new 2026-06-29 17:30:14.205773393 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-setuptools-rust
-Version: 1.12.1
+Version: 1.13.0
Release: 0
Summary: Setuptools plugin for Rust extensions
License: MIT
++++++ setuptools_rust-1.12.1.tar.gz -> setuptools_rust-1.13.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/.bumpversion.cfg
new/setuptools_rust-1.13.0/.bumpversion.cfg
--- old/setuptools_rust-1.12.1/.bumpversion.cfg 2026-03-26 09:01:49.000000000
+0100
+++ new/setuptools_rust-1.13.0/.bumpversion.cfg 2026-06-27 23:44:42.000000000
+0200
@@ -1,7 +1,7 @@
[bumpversion]
commit = True
tag = False
-current_version = 1.12.1
+current_version = 1.13.0
message = release: {new_version}
[bumpversion:file:pyproject.toml]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/.github/workflows/ci.yml
new/setuptools_rust-1.13.0/.github/workflows/ci.yml
--- old/setuptools_rust-1.12.1/.github/workflows/ci.yml 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/.github/workflows/ci.yml 2026-06-27
23:44:42.000000000 +0200
@@ -278,7 +278,7 @@
uses: actions/setup-python@v6
with:
python-version: "3.x"
- - uses: docker/setup-qemu-action@v3
+ - uses: docker/setup-qemu-action@v4
- run: pip install nox
- run: nox -s test-crossenv -- ${{ matrix.platform.arch }}
@@ -295,7 +295,7 @@
# need cross HEAD for https://github.com/cross-rs/cross/issues/1645
# will probably be ok to use released cross from 0.3
run: cargo install cross --git https://github.com/cross-rs/cross
- - uses: docker/setup-qemu-action@v3
+ - uses: docker/setup-qemu-action@v4
- run: pip install nox
- run: nox -s test-cross
@@ -331,7 +331,7 @@
python -m build --no-isolation
ls -la dist/
unzip -l dist/*.whl # debug all files inside wheel file
- - uses: uraimo/[email protected]
+ - uses: uraimo/[email protected]
name: Install built wheel
with:
arch: aarch64
@@ -355,7 +355,7 @@
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin
- - uses: pypa/[email protected]
+ - uses: pypa/[email protected]
env:
CIBW_BUILD: cp39-*
CIBW_BEFORE_BUILD: >
@@ -437,7 +437,7 @@
with:
components: rust-src
targets: wasm32-unknown-emscripten
- - uses: mymindstorm/setup-emsdk@v14
+ - uses: mymindstorm/setup-emsdk@v16
with:
version: ${{env.EMSCRIPTEN_VERSION}}
actions-cache-folder: emsdk-cache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/CHANGELOG.md
new/setuptools_rust-1.13.0/CHANGELOG.md
--- old/setuptools_rust-1.12.1/CHANGELOG.md 2026-03-26 09:01:49.000000000
+0100
+++ new/setuptools_rust-1.13.0/CHANGELOG.md 2026-06-27 23:44:42.000000000
+0200
@@ -1,5 +1,12 @@
# Changelog
+## 1.13.0 (2026-06-27)
+### Added
+- Add `generated-files` option to `RustExtension` to copy files from the build
script output directory to the wheel.
[#574](https://github.com/PyO3/setuptools-rust/pull/574)
+
+### Fixed
+- Add `-Zunstable-options` when querying rustc for information about custom
JSON targets. [#587](https://github.com/PyO3/setuptools-rust/pull/587)
+
## 1.12.1 (2026-03-26)
- Migrate to trusted publishing.
[#581](https://github.com/PyO3/setuptools-rust/pull/581)
- Strip target suffix for cargo-zigbuild compatibility.
[#534](https://github.com/PyO3/setuptools-rust/pull/534)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/PKG-INFO
new/setuptools_rust-1.13.0/PKG-INFO
--- old/setuptools_rust-1.12.1/PKG-INFO 2026-03-26 09:01:55.160494300 +0100
+++ new/setuptools_rust-1.13.0/PKG-INFO 2026-06-27 23:44:48.053065500 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: setuptools-rust
-Version: 1.12.1
+Version: 1.13.0
Summary: Setuptools Rust extension plugin
Author-email: Nikolay Kim <[email protected]>
Project-URL: Homepage, https://github.com/PyO3/setuptools-rust
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/docs/requirements.txt
new/setuptools_rust-1.13.0/docs/requirements.txt
--- old/setuptools_rust-1.12.1/docs/requirements.txt 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/docs/requirements.txt 2026-06-27
23:44:42.000000000 +0200
@@ -1,4 +1,4 @@
Sphinx==9.1.0
-sphinx-autodoc-typehints==3.8.0
+sphinx-autodoc-typehints==3.10.4
furo==2025.12.19
-myst-parser==5.0.0
+myst-parser==5.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/docs/setuppy_tutorial.md
new/setuptools_rust-1.13.0/docs/setuppy_tutorial.md
--- old/setuptools_rust-1.12.1/docs/setuppy_tutorial.md 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/docs/setuppy_tutorial.md 2026-06-27
23:44:42.000000000 +0200
@@ -121,6 +121,11 @@
to manually add an extra `build.rs` file, see
[PyO3/setuptools-rust#351](https://github.com/PyO3/setuptools-rust/pull/351)
for more information about the workaround.
+- If your Rust extension generates files as part of its `build.rs` build script
+ that you want to be present in your Python wheel, you can use the
`generated_files`
+ argument of `RustExtension` to define which files should be copied across,
and into
+ which locations in the Python package.
+
- Since the adoption of {pep}`517`, running `python setup.py ...` directly as
a CLI tool is
[considered
deprecated](https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html).
Nevertheless, `setup.py` can be safely used as a configuration file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/emscripten/package-lock.json
new/setuptools_rust-1.13.0/emscripten/package-lock.json
--- old/setuptools_rust-1.12.1/emscripten/package-lock.json 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/emscripten/package-lock.json 2026-06-27
23:44:42.000000000 +0200
@@ -28,9 +28,9 @@
}
},
"node_modules/ws": {
- "version": "8.19.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
- "integrity":
"sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
+ "version": "8.21.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
+ "integrity":
"sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/generated-files/Cargo.toml
new/setuptools_rust-1.13.0/examples/generated-files/Cargo.toml
--- old/setuptools_rust-1.12.1/examples/generated-files/Cargo.toml
1970-01-01 01:00:00.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/generated-files/Cargo.toml
2026-06-27 23:44:42.000000000 +0200
@@ -0,0 +1,13 @@
+[package]
+name = "generated-files"
+version = "0.1.0"
+edition = "2021"
+build = "build.rs"
+
+[dependencies]
+pyo3 = "0.27"
+
+[lib]
+name = "_lib" # private module to be nested into Python package
+crate-type = ["cdylib"]
+path = "rust/lib.rs"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/generated-files/MANIFEST.in
new/setuptools_rust-1.13.0/examples/generated-files/MANIFEST.in
--- old/setuptools_rust-1.12.1/examples/generated-files/MANIFEST.in
1970-01-01 01:00:00.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/generated-files/MANIFEST.in
2026-06-27 23:44:42.000000000 +0200
@@ -0,0 +1,10 @@
+include build.rs
+include Cargo.toml
+include Cargo.lock
+graft rust
+graft tests
+
+# Data files generated by Rust build scripts generally do not need to be
listed in the manifest
+# because they are not generated as part of the `sdist`; the Rust extension is
also not built in an
+# sdist, so neither are the generated files. You should ensure that all
source files needed to
+# generate the build files _are_ included in the manifest, however.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/generated-files/build.rs
new/setuptools_rust-1.13.0/examples/generated-files/build.rs
--- old/setuptools_rust-1.12.1/examples/generated-files/build.rs
1970-01-01 01:00:00.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/generated-files/build.rs
2026-06-27 23:44:42.000000000 +0200
@@ -0,0 +1,16 @@
+use std::fs;
+use std::io::{self, Write};
+use std::path::Path;
+
+fn main() -> io::Result<()> {
+ println!("cargo::rerun-if-changed=build.rs");
+ let out_dir_raw = std::env::var("OUT_DIR").unwrap();
+ let out_dir = Path::new(&out_dir_raw);
+ fs::File::create(out_dir.join("my_file.txt"))?.write_all(b"Generated by a
build script.\n")?;
+
+ let sub_dir = out_dir.join("dir");
+ fs::create_dir_all(&sub_dir)?;
+ fs::File::create(sub_dir.join("a.txt"))?.write_all(b"This is file A.\n")?;
+ fs::File::create(sub_dir.join("b.txt"))?.write_all(b"This is file B.\n")?;
+ Ok(())
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/generated-files/noxfile.py
new/setuptools_rust-1.13.0/examples/generated-files/noxfile.py
--- old/setuptools_rust-1.12.1/examples/generated-files/noxfile.py
1970-01-01 01:00:00.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/generated-files/noxfile.py
2026-06-27 23:44:42.000000000 +0200
@@ -0,0 +1,37 @@
+from pathlib import Path
+
+import nox
+
+SETUPTOOLS_RUST = Path(__file__).parents[2]
+
+
[email protected]()
+def test(session: nox.Session):
+ session.install(str(SETUPTOOLS_RUST), "setuptools", "pytest")
+ session.install("--no-build-isolation", ".")
+ session.run("pytest", "tests", *session.posargs)
+
+
[email protected]()
+def test_inplace(session: nox.Session):
+ session.install(str(SETUPTOOLS_RUST), "setuptools", "pytest")
+ session.install("--no-build-isolation", "--editable", ".")
+ try:
+ session.run("pytest", "tests", *session.posargs)
+ finally:
+ # Clear out any data files that _did_ exist
+ session.run(
+ "python",
+ "-c",
+ """
+import os
+import shutil
+from pathlib import Path
+import generated_files
+
+try:
+ os.remove(Path(generated_files.__file__).parent / "my_file.txt")
+except FileNotFoundError:
+ pass
+shutil.rmtree(Path(generated_files.__file__).parent / "_data",
ignore_errors=True)""",
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/generated-files/pyproject.toml
new/setuptools_rust-1.13.0/examples/generated-files/pyproject.toml
--- old/setuptools_rust-1.12.1/examples/generated-files/pyproject.toml
1970-01-01 01:00:00.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/generated-files/pyproject.toml
2026-06-27 23:44:42.000000000 +0200
@@ -0,0 +1,19 @@
+[build-system]
+requires = ["setuptools", "setuptools-rust"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "generated-files"
+version = "1.0"
+
+[tool.setuptools.packages]
+# Pure Python packages/modules
+find = { where = ["python"] }
+
+[[tool.setuptools-rust.ext-modules]]
+target = "generated_files._lib"
+[tool.setuptools-rust.ext-modules.generated-files]
+# Keys correspond to files/directories in the Rust extension's build directory
`OUT_DIR`.
+# Values are Python packages that the corresponding file or directory should
be placed inside.
+"my_file.txt" = "generated_files"
+"dir" = "generated_files._data"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/generated-files/python/generated_files/__init__.py
new/setuptools_rust-1.13.0/examples/generated-files/python/generated_files/__init__.py
---
old/setuptools_rust-1.12.1/examples/generated-files/python/generated_files/__init__.py
1970-01-01 01:00:00.000000000 +0100
+++
new/setuptools_rust-1.13.0/examples/generated-files/python/generated_files/__init__.py
2026-06-27 23:44:42.000000000 +0200
@@ -0,0 +1,11 @@
+__all__ = ["library_ok", "data_files_content"]
+
+from pathlib import Path
+from ._lib import library_ok
+
+
+def data_files_content() -> dict[Path, str]:
+ us = Path(__file__).parent
+ paths = [us / "my_file.txt"]
+ paths.extend((us / "_data" / "dir").glob("*.txt"))
+ return {path.relative_to(us): path.read_text() for path in paths}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/generated-files/rust/lib.rs
new/setuptools_rust-1.13.0/examples/generated-files/rust/lib.rs
--- old/setuptools_rust-1.12.1/examples/generated-files/rust/lib.rs
1970-01-01 01:00:00.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/generated-files/rust/lib.rs
2026-06-27 23:44:42.000000000 +0200
@@ -0,0 +1,9 @@
+#[pyo3::pymodule]
+mod _lib {
+ use pyo3::prelude::*;
+
+ #[pyfunction]
+ fn library_ok() -> bool {
+ true
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/generated-files/tests/test_lib.py
new/setuptools_rust-1.13.0/examples/generated-files/tests/test_lib.py
--- old/setuptools_rust-1.12.1/examples/generated-files/tests/test_lib.py
1970-01-01 01:00:00.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/generated-files/tests/test_lib.py
2026-06-27 23:44:42.000000000 +0200
@@ -0,0 +1,15 @@
+from pathlib import Path
+import generated_files
+
+
+def test_rust_extension():
+ assert generated_files.library_ok()
+
+
+def test_data_file_content():
+ expected = {
+ Path("my_file.txt"): "Generated by a build script.\n",
+ Path("_data") / "dir" / "a.txt": "This is file A.\n",
+ Path("_data") / "dir" / "b.txt": "This is file B.\n",
+ }
+ assert generated_files.data_files_content() == expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/hello-world/Cargo.lock
new/setuptools_rust-1.13.0/examples/hello-world/Cargo.lock
--- old/setuptools_rust-1.12.1/examples/hello-world/Cargo.lock 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/hello-world/Cargo.lock 2026-06-27
23:44:42.000000000 +0200
@@ -44,9 +44,9 @@
[[package]]
name = "pyo3"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
+checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
dependencies = [
"libc",
"once_cell",
@@ -58,18 +58,18 @@
[[package]]
name = "pyo3-build-config"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
+checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
dependencies = [
"target-lexicon",
]
[[package]]
name = "pyo3-ffi"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
+checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
dependencies = [
"libc",
"pyo3-build-config",
@@ -77,9 +77,9 @@
[[package]]
name = "pyo3-macros"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
+checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
@@ -89,9 +89,9 @@
[[package]]
name = "pyo3-macros-backend"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
+checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
dependencies = [
"heck",
"proc-macro2",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/hello-world-setuppy/Cargo.lock
new/setuptools_rust-1.13.0/examples/hello-world-setuppy/Cargo.lock
--- old/setuptools_rust-1.12.1/examples/hello-world-setuppy/Cargo.lock
2026-03-26 09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/hello-world-setuppy/Cargo.lock
2026-06-27 23:44:42.000000000 +0200
@@ -44,9 +44,9 @@
[[package]]
name = "pyo3"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
+checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
dependencies = [
"libc",
"once_cell",
@@ -58,18 +58,18 @@
[[package]]
name = "pyo3-build-config"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
+checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
dependencies = [
"target-lexicon",
]
[[package]]
name = "pyo3-ffi"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
+checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
dependencies = [
"libc",
"pyo3-build-config",
@@ -77,9 +77,9 @@
[[package]]
name = "pyo3-macros"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
+checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
@@ -89,9 +89,9 @@
[[package]]
name = "pyo3-macros-backend"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
+checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
dependencies = [
"heck",
"proc-macro2",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/html-py-ever/Cargo.lock
new/setuptools_rust-1.13.0/examples/html-py-ever/Cargo.lock
--- old/setuptools_rust-1.12.1/examples/html-py-ever/Cargo.lock 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/html-py-ever/Cargo.lock 2026-06-27
23:44:42.000000000 +0200
@@ -22,9 +22,9 @@
[[package]]
name = "cssparser"
-version = "0.36.0"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2"
+checksum = "8c9cdaae01d5ed7882b04d795e7f752f46ff52d2fa3b50a20d28c464510bba98"
dependencies = [
"cssparser-macros",
"dtoa-short",
@@ -35,9 +35,9 @@
[[package]]
name = "cssparser-macros"
-version = "0.6.1"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
+checksum = "10a2a99df6e410a8ff4245aa2006499ea662245f967cc7c0a38c83ef8eb44dbf"
dependencies = [
"quote",
"syn",
@@ -81,9 +81,9 @@
[[package]]
name = "ego-tree"
-version = "0.10.0"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2972feb8dffe7bc8c5463b1dacda1b0dfbed3710e50f977d965429692d74cd8"
+checksum = "b04dc5a38e4f151a79d9f2451ae6037fb6eaf5cba34771f44781f80e508498e3"
[[package]]
name = "fastrand"
@@ -92,16 +92,6 @@
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
-name = "futf"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
-dependencies = [
- "mac",
- "new_debug_unreachable",
-]
-
-[[package]]
name = "getopts"
version = "0.2.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -126,9 +116,9 @@
[[package]]
name = "html5ever"
-version = "0.36.1"
+version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6452c4751a24e1b99c3260d505eaeee76a050573e61f30ac2c924ddc7236f01e"
+checksum = "46a1761807faccc9a19e86944bbf40610014066306f96edcdedc2fb714bcb7b8"
dependencies = [
"log",
"markup5ever",
@@ -163,16 +153,10 @@
checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
[[package]]
-name = "mac"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
-
-[[package]]
name = "markup5ever"
-version = "0.36.1"
+version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c3294c4d74d0742910f8c7b466f44dda9eb2d5742c1e430138df290a1e8451c"
+checksum = "7122d987ec5f704ee56f6e5b41a7d93722e9aae27ae07cafa4036c4d3f9757de"
dependencies = [
"log",
"tendril",
@@ -290,9 +274,9 @@
[[package]]
name = "pyo3"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
+checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
dependencies = [
"libc",
"once_cell",
@@ -304,18 +288,18 @@
[[package]]
name = "pyo3-build-config"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
+checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
dependencies = [
"target-lexicon",
]
[[package]]
name = "pyo3-ffi"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
+checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
dependencies = [
"libc",
"pyo3-build-config",
@@ -323,9 +307,9 @@
[[package]]
name = "pyo3-macros"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
+checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
@@ -335,9 +319,9 @@
[[package]]
name = "pyo3-macros-backend"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
+checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
dependencies = [
"heck",
"proc-macro2",
@@ -387,9 +371,9 @@
[[package]]
name = "scraper"
-version = "0.25.0"
+version = "0.27.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93cecd86d6259499c844440546d02f55f3e17bd286e529e48d1f9f67e92315cb"
+checksum = "bdd0be4d296f048bfb06dd01bbc80ef789ddd2e55583e8d2e6b804942abfabc2"
dependencies = [
"cssparser",
"ego-tree",
@@ -402,9 +386,9 @@
[[package]]
name = "selectors"
-version = "0.33.0"
+version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "feef350c36147532e1b79ea5c1f3791373e61cbd9a6a2615413b3807bb164fb7"
+checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d"
dependencies = [
"bitflags",
"cssparser",
@@ -515,12 +499,11 @@
[[package]]
name = "tendril"
-version = "0.4.3"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0"
+checksum = "c4790fc369d5a530f4b544b094e31388b9b3a37c0f4652ade4505945f5660d24"
dependencies = [
- "futf",
- "mac",
+ "new_debug_unreachable",
"utf-8",
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/html-py-ever/Cargo.toml
new/setuptools_rust-1.13.0/examples/html-py-ever/Cargo.toml
--- old/setuptools_rust-1.12.1/examples/html-py-ever/Cargo.toml 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/html-py-ever/Cargo.toml 2026-06-27
23:44:42.000000000 +0200
@@ -5,7 +5,7 @@
edition = "2021"
[dependencies]
-scraper = "0.25"
+scraper = "0.27"
pyo3 = "0.28"
[lib]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/namespace_package/Cargo.lock
new/setuptools_rust-1.13.0/examples/namespace_package/Cargo.lock
--- old/setuptools_rust-1.12.1/examples/namespace_package/Cargo.lock
2026-03-26 09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/namespace_package/Cargo.lock
2026-06-27 23:44:42.000000000 +0200
@@ -44,9 +44,9 @@
[[package]]
name = "pyo3"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
+checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
dependencies = [
"libc",
"once_cell",
@@ -58,18 +58,18 @@
[[package]]
name = "pyo3-build-config"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
+checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
dependencies = [
"target-lexicon",
]
[[package]]
name = "pyo3-ffi"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
+checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
dependencies = [
"libc",
"pyo3-build-config",
@@ -77,9 +77,9 @@
[[package]]
name = "pyo3-macros"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
+checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
@@ -89,9 +89,9 @@
[[package]]
name = "pyo3-macros-backend"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
+checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
dependencies = [
"heck",
"proc-macro2",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/examples/rust_with_cffi/Cargo.lock
new/setuptools_rust-1.13.0/examples/rust_with_cffi/Cargo.lock
--- old/setuptools_rust-1.12.1/examples/rust_with_cffi/Cargo.lock
2026-03-26 09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/examples/rust_with_cffi/Cargo.lock
2026-06-27 23:44:42.000000000 +0200
@@ -37,9 +37,9 @@
[[package]]
name = "pyo3"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1"
+checksum = "91fd8e38a3b50ed1167fb981cd6fd60147e091784c427b8f7183a7ee32c31c12"
dependencies = [
"libc",
"once_cell",
@@ -51,18 +51,18 @@
[[package]]
name = "pyo3-build-config"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
+checksum = "e368e7ddfdeb98c9bca7f8383be1648fd84ab466bf2bc015e94008db6d35611e"
dependencies = [
"target-lexicon",
]
[[package]]
name = "pyo3-ffi"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc"
+checksum = "7f29e10af80b1f7ccaf7f69eace800a03ecd13e883acfacc1e5d0988605f651e"
dependencies = [
"libc",
"pyo3-build-config",
@@ -70,9 +70,9 @@
[[package]]
name = "pyo3-macros"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e"
+checksum = "df6e520eff47c45997d2fc7dd8214b25dd1310918bbb2642156ef66a67f29813"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
@@ -82,9 +82,9 @@
[[package]]
name = "pyo3-macros-backend"
-version = "0.28.2"
+version = "0.28.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a"
+checksum = "c4cdc218d835738f81c2338f822078af45b4afdf8b2e33cbb5916f108b813acb"
dependencies = [
"heck",
"proc-macro2",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/pyproject.toml
new/setuptools_rust-1.13.0/pyproject.toml
--- old/setuptools_rust-1.12.1/pyproject.toml 2026-03-26 09:01:49.000000000
+0100
+++ new/setuptools_rust-1.13.0/pyproject.toml 2026-06-27 23:44:42.000000000
+0200
@@ -1,6 +1,6 @@
[project]
name = "setuptools-rust"
-version = "1.12.1"
+version = "1.13.0"
description = "Setuptools Rust extension plugin"
readme = "README.md"
requires-python = ">=3.9"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/setuptools_rust/build.py
new/setuptools_rust-1.13.0/setuptools_rust/build.py
--- old/setuptools_rust-1.12.1/setuptools_rust/build.py 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/setuptools_rust/build.py 2026-06-27
23:44:42.000000000 +0200
@@ -15,6 +15,7 @@
CompileError,
ExecError,
FileError,
+ InternalError,
PlatformError,
)
from sysconfig import get_config_var
@@ -24,6 +25,7 @@
from setuptools import Distribution
from setuptools.command.build_ext import build_ext as CommandBuildExt
from setuptools.command.build_ext import get_abi3_suffix
+from setuptools.command.build_py import build_py as setuptools_build_py
from setuptools.command.install_scripts import install_scripts as
CommandInstallScripts
from ._utils import check_subprocess_output, format_called_process_error, Env
@@ -124,10 +126,17 @@
assert self.plat_name is not None
if self.target is _Platform.CARGO_DEFAULT:
self.target = _override_cargo_default_target(self.plat_name,
ext.env)
- dylib_paths = self.build_extension(ext)
- self.install_extension(ext, dylib_paths)
+ dylib_paths, artifact_dir = self.build_extension(ext)
+ self.install_extension(ext, dylib_paths, artifact_dir)
- def build_extension(self, ext: RustExtension) -> List["_BuiltModule"]:
+ def build_extension(
+ self, ext: RustExtension
+ ) -> Tuple[List["_BuiltModule"], Optional[Path]]:
+ """
+ Build the Rust components, but don't install them anywhere.
+
+ Returns the built modules, and the location of the single-target
``OUT_DIR``, if needed
+ for copying generated files."""
env = _prepare_build_environment(ext.env, ext)
if not os.path.exists(ext.path):
@@ -201,13 +210,21 @@
targets: List[Optional[str]] = [None]
elif self.target is _Platform.UNIVERSAL2:
targets = list(_UNIVERSAL2_TARGETS)
+ if ext.generated_files:
+ raise PlatformError(
+ "generated files are not supported for universal2 wheels"
+ )
else:
targets = [self.target]
- cargo_messages = ""
+ cargo_messages: Dict[str, List[str]] = {}
for target in targets:
target_command = command.copy()
- if target is not None:
+ if target is None:
+ # Normalize the entries in `cargo_messages` to always be in
terms of the
+ # actual target triple.
+ target = get_rust_host(ext.env)
+ else:
target_command += ["--target", target]
if rustc_args:
target_command += ["--"]
@@ -221,12 +238,12 @@
# If quiet, capture all output and only show it in the
exception
# If not quiet, forward all cargo output to stderr
stderr = subprocess.PIPE if quiet else None
- cargo_messages += check_subprocess_output(
+ cargo_messages[target] = check_subprocess_output(
target_command,
env=env,
stderr=stderr,
text=True,
- )
+ ).splitlines()
except subprocess.CalledProcessError as e:
# Don't include stdout in the formatted error as it is a huge
dump
# of cargo json lines which aren't helpful for the end user.
@@ -246,7 +263,7 @@
if ext._uses_exec_binding():
# Find artifact from cargo messages
artifacts = _find_cargo_artifacts(
- cargo_messages.splitlines(),
+ [line for messages in cargo_messages.values() for line in
messages],
package_id=package_id,
kinds={"bin"},
)
@@ -276,7 +293,7 @@
else:
# Find artifact from cargo messages
artifacts = _find_cargo_artifacts(
- cargo_messages.splitlines(),
+ [line for messages in cargo_messages.values() for line in
messages],
package_id=package_id,
kinds={"cdylib", "dylib"},
)
@@ -300,10 +317,35 @@
# guaranteed to be just one element after checks above
dylib_paths.append(_BuiltModule(ext.name, artifact_path))
- return dylib_paths
+
+ if not ext.generated_files:
+ return dylib_paths, None
+
+ out_dirs = [
+ out_dir
+ for target, messages in cargo_messages.items()
+ if (out_dir := _find_cargo_out_dir(messages, package_id)) is not
None
+ ]
+ if not out_dirs:
+ raise FileError(
+ f"extension {ext.name} requests data files, but no
corresponding"
+ " build-script out directories could be found"
+ )
+ if len(out_dirs) > 1:
+ # This is defensive - internal logic around target selection
should already have
+ # prevented control from reaching here.
+ raise InternalError(
+ "generated-files support requires a single target and single
out directory,"
+ f" but we found {out_dirs}"
+ )
+
+ return dylib_paths, out_dirs[0]
def install_extension(
- self, ext: RustExtension, dylib_paths: List["_BuiltModule"]
+ self,
+ ext: RustExtension,
+ dylib_paths: List["_BuiltModule"],
+ build_artifact_dir: Optional[Path],
) -> None:
debug_build = self._is_debug_build(ext)
@@ -400,6 +442,44 @@
mode |= (mode & 0o444) >> 2 # copy R bits to X
os.chmod(ext_path, mode)
+ if not ext.generated_files:
+ return
+ if build_artifact_dir is None:
+ raise FileError(
+ "there are generated files to install but no build-artifact
directory"
+ )
+
+ # We'll delegate the finding of the package directories to Setuptools,
so we
+ # can be sure we're handling editable installs and other complex
situations
+ # correctly.
+ build_py = cast(setuptools_build_py,
self.get_finalized_command("build_py"))
+
+ def get_package_dir(package: str) -> Path:
+ if self.inplace:
+ # If `inplace`, we have to ask `build_py` (like `build_ext`
would).
+ return Path(build_py.get_package_dir(package))
+ # ... If not, `build_ext` knows where to put the package.
+ return Path(build_ext.build_lib) / Path(*package.split("."))
+
+ missed_matches = []
+ for source, package in ext.generated_files.items():
+ dest = get_package_dir(package)
+ dest.mkdir(mode=0o755, parents=True, exist_ok=True)
+ source_full = build_artifact_dir / source
+ dest_full = dest / source_full.name
+ if source_full.is_file():
+ logger.info("Copying data file from %s to %s", source_full,
dest_full)
+ shutil.copy2(source_full, dest_full)
+ elif source_full.is_dir():
+ logger.info(
+ "Copying data directory from %s to %s", source_full,
dest_full
+ )
+ shutil.copytree(source_full, dest_full, dirs_exist_ok=True)
+ else:
+ missed_matches.append(source)
+ if missed_matches:
+ raise FileError(f"failed to find build artifacts for
{missed_matches}")
+
def get_dylib_ext_path(self, ext: RustExtension, target_fname: str) -> str:
assert self.plat_name is not None
build_ext = cast(CommandBuildExt,
self.get_finalized_command("build_ext"))
@@ -835,6 +915,20 @@
return artifacts
+def _find_cargo_out_dir(cargo_messages: List[str], package_id: str) ->
Optional[Path]:
+ # Chances are that the line we're looking for will be the third-last line
in the
+ # messages. The last is the completion report, the penultimate is
generally the
+ # build of the final artifact.
+ for messsage in reversed(cargo_messages):
+ if "build-script-executed" not in messsage or package_id not in
messsage:
+ continue
+ parsed = json.loads(messsage)
+ if parsed.get("package_id") == package_id:
+ out_dir = parsed.get("out_dir")
+ return None if out_dir is None else Path(out_dir)
+ return None
+
+
def _replace_cross_target_dir(path: str, ext: RustExtension, *, quiet: bool)
-> str:
"""Replaces target director from `cross` docker build with the correct
local path.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/setuptools_rust/extension.py
new/setuptools_rust-1.13.0/setuptools_rust/extension.py
--- old/setuptools_rust-1.12.1/setuptools_rust/extension.py 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/setuptools_rust/extension.py 2026-06-27
23:44:42.000000000 +0200
@@ -115,6 +115,15 @@
env: Environment variables to use when calling cargo or rustc (``env=``
in ``subprocess.Popen``). setuptools-rust may add additional
variables or modify ``PATH``.
+ generated_files: Mapping of paths inside the extension's compilation
+ ``OUT_DIR`` to Python (sub)packages that they should be copied
into.
+ Each source path can be either a file or a directory. The source
+ will be copied (recursively, in the case of a directory) inside the
+ mapped location. This option is incompatible with multiple targets.
+
+ If this is populated, the built extension must have a build script
+ that populates its ``OUT_DIR``. Only the output of the build script
+ of the extension itself will be searched for data files.
"""
def __init__(
@@ -135,6 +144,7 @@
optional: bool = False,
py_limited_api: Literal["auto", True, False] = "auto",
env: Optional[Dict[str, str]] = None,
+ generated_files: Optional[Dict[str, str]] = None,
):
if isinstance(target, dict):
name = "; ".join("%s=%s" % (key, val) for key, val in
target.items())
@@ -158,6 +168,12 @@
self.optional = optional
self.py_limited_api = py_limited_api
self.env = Env(env)
+ self.generated_files = generated_files or {}
+
+ if self.generated_files and len(self.target) > 1:
+ raise ValueError(
+ "using 'generated_files' with multiple targets is not
supported"
+ )
if native:
warnings.warn(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/setuptools_rust/rustc_info.py
new/setuptools_rust-1.13.0/setuptools_rust/rustc_info.py
--- old/setuptools_rust-1.12.1/setuptools_rust/rustc_info.py 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/setuptools_rust/rustc_info.py 2026-06-27
23:44:42.000000000 +0200
@@ -1,5 +1,6 @@
from __future__ import annotations
+import os
import subprocess
from setuptools.errors import PlatformError
from functools import lru_cache
@@ -38,6 +39,19 @@
RustCfgs = NewType("RustCfgs", Dict[str, Optional[str]])
+def _is_custom_target(target: str) -> bool:
+ if target.endswith(".json"):
+ return True
+ paths = os.environ.get("RUST_TARGET_PATH")
+ if not paths:
+ return False
+ for p in paths.split(os.pathsep):
+ candidate = os.path.join(p, target + ".json")
+ if os.path.exists(candidate):
+ return True
+ return False
+
+
def get_rustc_cfgs(target_triple: Optional[str], env: Env) -> RustCfgs:
cfgs = RustCfgs({})
for entry in get_rust_target_info(target_triple, env):
@@ -54,6 +68,8 @@
def get_rust_target_info(target_triple: Optional[str], env: Env) -> List[str]:
cmd = ["rustc", "--print", "cfg"]
if target_triple:
+ if _is_custom_target(target_triple):
+ cmd.extend(["-Z", "unstable-options"])
cmd.extend(["--target", target_triple.split(".")[0]])
output = check_subprocess_output(cmd, env=env, text=True)
return output.splitlines()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/setuptools_rust-1.12.1/setuptools_rust/version.py
new/setuptools_rust-1.13.0/setuptools_rust/version.py
--- old/setuptools_rust-1.12.1/setuptools_rust/version.py 2026-03-26
09:01:49.000000000 +0100
+++ new/setuptools_rust-1.13.0/setuptools_rust/version.py 2026-06-27
23:44:42.000000000 +0200
@@ -1,4 +1,4 @@
-__version__ = version = "1.12.1"
+__version__ = version = "1.13.0"
__version_tuple__ = version_tuple = tuple(
map(lambda x: int(x[1]) if x[0] < 3 else x[1],
enumerate(__version__.split(".")))
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/setuptools_rust.egg-info/PKG-INFO
new/setuptools_rust-1.13.0/setuptools_rust.egg-info/PKG-INFO
--- old/setuptools_rust-1.12.1/setuptools_rust.egg-info/PKG-INFO
2026-03-26 09:01:54.000000000 +0100
+++ new/setuptools_rust-1.13.0/setuptools_rust.egg-info/PKG-INFO
2026-06-27 23:44:47.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: setuptools-rust
-Version: 1.12.1
+Version: 1.13.0
Summary: Setuptools Rust extension plugin
Author-email: Nikolay Kim <[email protected]>
Project-URL: Homepage, https://github.com/PyO3/setuptools-rust
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/setuptools_rust-1.12.1/setuptools_rust.egg-info/SOURCES.txt
new/setuptools_rust-1.13.0/setuptools_rust.egg-info/SOURCES.txt
--- old/setuptools_rust-1.12.1/setuptools_rust.egg-info/SOURCES.txt
2026-03-26 09:01:55.000000000 +0100
+++ new/setuptools_rust-1.13.0/setuptools_rust.egg-info/SOURCES.txt
2026-06-27 23:44:48.000000000 +0200
@@ -30,6 +30,14 @@
emscripten/package-lock.json
emscripten/package.json
emscripten/runner.js
+examples/generated-files/Cargo.toml
+examples/generated-files/MANIFEST.in
+examples/generated-files/build.rs
+examples/generated-files/noxfile.py
+examples/generated-files/pyproject.toml
+examples/generated-files/python/generated_files/__init__.py
+examples/generated-files/rust/lib.rs
+examples/generated-files/tests/test_lib.py
examples/hello-world/Cargo.lock
examples/hello-world/Cargo.toml
examples/hello-world/MANIFEST.in