1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
[build-system]
requires = ["setuptools", "wheel", "setuptools-rust"]
build-backend = "setuptools.build_meta"
[project]
name="namespace_package"
version="0.1.0"
[project.optional-dependencies]
dev = ["pytest"]
[tool.pytest.ini_options]
[tool.setuptools.packages]
# Pure Python packages/modules
find = { where = ["python"] }
[[tool.setuptools-rust.ext-modules]]
target = "namespace_package.rust"
# ^-- The last part of the target name (e.g. "rust") should match lib.name in Cargo.toml,
# but you can add a prefix to nest it inside of a parent Python package or namespace.
# Note that lib.name may not be defined in the Cargo.toml, but you still
# have to match the name of the function with the `#[pymodule]` attribute.
path = "Cargo.toml"
# ^-- Default value for cargo's manifest (can be omitted)
# Each manifest can have a single [lib] definition.
# To specify multiple extension modules you can use different toml files (one each).
binding = "PyO3" # Default value, can be omitted
debug = false
# See reference for RustExtension in https://setuptools-rust.readthedocs.io/en/latest/reference.html
|