11[build-system ]
2- {%- if cookiecutter.project_type == "trampolim" %}
2+ {%- if cookiecutter.backend == "trampolim" %}
33requires = [" trampolim>=0.1.0" ]
44build-backend = " trampolim"
5- {%- elif cookiecutter.project_type == "whey" %}
5+ {%- elif cookiecutter.backend == "whey" %}
66requires = [" whey>=0.0.17" ]
77build-backend = " whey"
8- {%- elif cookiecutter.project_type == "pdm" %}
8+ {%- elif cookiecutter.backend == "pdm" %}
99requires = [" pdm-backend" ]
1010build-backend = " pdm.backend"
11- {%- elif cookiecutter.project_type == "maturin" %}
11+ {%- elif cookiecutter.backend == "maturin" %}
1212requires = [" maturin>=0.12,<0.15" ]
1313build-backend = " maturin"
14- {%- elif cookiecutter.project_type == "hatch" %}
14+ {%- elif cookiecutter.backend == "hatch" %}
1515requires = [" hatchling" ]
1616build-backend = " hatchling.build"
17- {%- elif cookiecutter.project_type == "setuptools621" %}
17+ {%- elif cookiecutter.backend == "setuptools621" %}
1818requires = [" setuptools>=61.0" ]
1919build-backend = " setuptools.build_meta"
20- {%- elif cookiecutter.project_type == "flit" %}
20+ {%- elif cookiecutter.backend == "flit" %}
2121requires = [" flit_core >=3.4" ]
2222build-backend = " flit_core.buildapi"
23- {%- elif cookiecutter.project_type == "setuptools" %}
23+ {%- elif cookiecutter.backend == "setuptools" %}
2424requires = [" setuptools>=42" , " setuptools_scm[toml]>=3.4" ]
2525build-backend = " setuptools.build_meta"
26- {%- elif cookiecutter.project_type == "pybind11" %}
26+ {%- elif cookiecutter.backend == "pybind11" %}
2727requires = [" setuptools>=42" , " setuptools_scm[toml]>=3.4" , " pybind11" ]
2828build-backend = " setuptools.build_meta"
29- {%- elif cookiecutter.project_type == "skbuild" %}
29+ {%- elif cookiecutter.backend == "skbuild" %}
3030requires = [" pybind11" , " scikit-build-core" ]
3131build-backend = " scikit_build_core.build"
32- {%- elif cookiecutter.project_type == "mesonpy" %}
32+ {%- elif cookiecutter.backend == "mesonpy" %}
3333requires = [" pybind11" , " meson-python" ]
3434build-backend = " mesonpy"
35- {%- elif cookiecutter.project_type == "poetry" %}
35+ {%- elif cookiecutter.backend == "poetry" %}
3636requires = [" poetry_core>=1.0.0" ]
3737build-backend = " poetry.core.masonry.api"
3838{%- endif %}
3939
40- {%- if cookiecutter.project_type in ["setuptools", "pybind11"] %}
40+ {%- if cookiecutter.backend in ["setuptools", "pybind11"] %}
4141
4242
4343[tool .setuptools_scm ]
@@ -54,7 +54,7 @@ ignore = [
5454 " noxfile.py" ,
5555]
5656
57- {%- elif cookiecutter.project_type == "poetry" %}
57+ {%- elif cookiecutter.backend == "poetry" %}
5858
5959
6060[tool .poetry ]
@@ -120,7 +120,7 @@ docs = [
120120
121121[project ]
122122name = " {{ cookiecutter.project_name }}"
123- {%- if cookiecutter.project_type not in ["trampolim", "flit", "hatch"] %}
123+ {%- if cookiecutter.backend not in ["trampolim", "flit", "hatch"] %}
124124version = " 0.1.0"
125125{%- endif %}
126126authors = [
@@ -158,7 +158,7 @@ classifiers = [
158158 "Topic :: Scientific/Engineering",
159159 "Typing :: Typed",
160160]
161- {%- if cookiecutter.project_type in ["trampolim", "flit", "hatch"] %}
161+ {%- if cookiecutter.backend in ["trampolim", "flit", "hatch"] %}
162162dynamic = [" version" ]
163163{%- endif %}
164164dependencies = [
@@ -190,24 +190,24 @@ Changelog = "{{ cookiecutter.url }}/releases"
190190{%- endif %}
191191
192192
193- {%- if cookiecutter.project_type == "skbuild" %}
193+ {%- if cookiecutter.backend == "skbuild" %}
194194[tool .scikit-build ]
195195minimum-version = " 0.2"
196196build-dir = " build/{cache_tag}"
197- {%- elif cookiecutter.project_type == "whey" %}
197+ {%- elif cookiecutter.backend == "whey" %}
198198[tool .whey ]
199199source-dir = " src"
200- {%- elif cookiecutter.project_type == "trampolim" %}
200+ {%- elif cookiecutter.backend == "trampolim" %}
201201[tool .trampolim ]
202202module-location = " src"
203- {%- elif cookiecutter.project_type == "hatch" %}
203+ {%- elif cookiecutter.backend == "hatch" %}
204204[tool .hatch ]
205205version.path = " src/{{ cookiecutter.__project_slug }}/__init__.py"
206206envs.default.dependencies = [
207207 " pytest" ,
208208 " pytest-cov" ,
209209]
210- {%- elif cookiecutter.project_type == "pdm" %}
210+ {%- elif cookiecutter.backend == "pdm" %}
211211[tool .pdm .dev-dependencies ]
212212devtest = [" pytest" , " pytest-cov" ]
213213{%- endif %}
0 commit comments