Debian Codegraph @

src/templates/pyproject.toml.j2

raw
1 [build-system]
2 requires = ["maturin>={{ version_major }}.{{ version_minor }},<{{ version_major + 1 }}.0"]
3 build-backend = "maturin"
4
5 [project]
6 name = "{{ name }}"
7 requires-python = ">=3.8"
8 classifiers = [
9 "Programming Language :: Rust",
10 "Programming Language :: Python :: Implementation :: CPython",
11 "Programming Language :: Python :: Implementation :: PyPy",
12 ]
13 {% if bindings == "cffi" -%}
14 dependencies = ["cffi"]
15 {% endif -%}
16 dynamic = ["version"]
17 {% if mixed_non_src -%}
18 [project.optional-dependencies]
19 tests = [
20 "pytest",
21 ]
22 {% endif -%}
23
24 {% if bindings in ["bin", "cffi", "pyo3"] or mixed_non_src -%}
25 [tool.maturin]
26 {% if bindings == "cffi" or bindings == "bin" -%}
27 bindings = "{{ bindings }}"
28 {% endif -%}
29 {% if mixed_non_src -%}
30 python-source = "python"
31 {% endif -%}
32 {% if bindings == "pyo3" -%}
33 features = ["pyo3/extension-module"]
34 {% endif -%}
35 {% endif -%}