[build-system]
requires = ["maturin>={{ version_major }}.{{ version_minor }},<{{ version_major + 1 }}.0"]
build-backend = "maturin"

[project]
name = "{{ name }}"
requires-python = ">=3.7"
classifiers = [
    "Programming Language :: Rust",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: Python :: Implementation :: PyPy",
]
{% if bindings == "cffi" -%}
dependencies = ["cffi"]
{%- endif %}

{% if bindings in ["bin", "cffi", "pyo3", "rust-cpython"] or mixed_non_src -%}
[tool.maturin]
{% if bindings == "cffi" or bindings == "bin" -%}
bindings = "{{ bindings }}"
{% endif -%}
{% if mixed_non_src -%}
python-source = "python"
{% endif -%}
{% if bindings == "pyo3" -%}
features = ["pyo3/extension-module"]
{% elif bindings == "rust-cpython" -%}
features = ["cpython/extension-module"]
{% endif -%}
{% endif -%}
