Skip to content

Commit c964815

Browse files
authored
chore: meson and maturin now support SPDX licenses too (#622)
Only poetry-core is missing support now. Signed-off-by: Henry Schreiner <[email protected]>
1 parent 4f8141f commit c964815

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
requires = ["pdm-backend>=2.4"]
44
build-backend = "pdm.backend"
55
{%- elif cookiecutter.backend == "maturin" %}
6-
requires = ["maturin>=0.15,<2"]
6+
requires = ["maturin>=1.9,<2"]
77
build-backend = "maturin"
88
{%- elif cookiecutter.backend == "hatch" %}
99
{%- if cookiecutter.vcs %}
@@ -38,11 +38,11 @@ build-backend = "setuptools.build_meta"
3838
requires = ["pybind11", "scikit-build-core>=0.11"]
3939
build-backend = "scikit_build_core.build"
4040
{%- elif cookiecutter.backend == "mesonpy" %}
41-
requires = ["meson-python", "pybind11"]
41+
requires = ["meson-python>=0.18", "pybind11"]
4242
build-backend = "mesonpy"
4343
{%- elif cookiecutter.backend == "poetry" %}
4444
{%- if cookiecutter.vcs %}
45-
requires = ["poetry-core>=2.0.0", "poetry-dynamic-versioning"]
45+
requires = ["poetry-core>=2.0", "poetry-dynamic-versioning"]
4646
build-backend = "poetry_dynamic_versioning.backend"
4747
{%- else %}
4848
requires = ["poetry_core>=2.0.0"]
@@ -66,24 +66,22 @@ maintainers = [
6666
{%- endif %}
6767
description = "{{ cookiecutter.project_short_description }}"
6868
readme = "README.md"
69-
{%- if cookiecutter.backend not in ['poetry', 'mesonpy', 'maturin'] %}
69+
{%- if cookiecutter.backend != 'poetry' %}
7070
{%- if cookiecutter.license == "BSD" %}
7171
license = "BSD-3-Clause"
7272
{%- elif cookiecutter.license == "Apache" %}
7373
license = "Apache-2.0"
7474
{%- elif cookiecutter.license == "MIT" %}
7575
license = "MIT"
7676
{%- endif %}
77-
{%- endif %}
78-
{%- if cookiecutter.backend in ['mesonpy'] %}
79-
license.file = "LICENSE"
77+
license-files = ["LICENSE"]
8078
{%- endif %}
8179
requires-python = ">=3.9"
8280
classifiers = [
8381
"Development Status :: 1 - Planning",
8482
"Intended Audience :: Science/Research",
8583
"Intended Audience :: Developers",
86-
{%- if cookiecutter.backend in ['poetry', 'mesonpy', 'maturin'] %}
84+
{%- if cookiecutter.backend == ['poetry'] %}
8785
{%- if cookiecutter.license == "BSD" %}
8886
"License :: OSI Approved :: BSD License",
8987
{%- elif cookiecutter.license == "Apache" %}

0 commit comments

Comments
 (0)