@@ -42,94 +42,18 @@ requires = ["meson-python", "pybind11"]
42
42
build-backend = " mesonpy"
43
43
{%- elif cookiecutter.backend == "poetry" %}
44
44
{%- if cookiecutter.vcs %}
45
- requires = [" poetry-core>=1 .0.0" , " poetry-dynamic-versioning" ]
45
+ requires = [" poetry-core>=2 .0.0" , " poetry-dynamic-versioning" ]
46
46
build-backend = " poetry_dynamic_versioning.backend"
47
47
{%- else %}
48
- requires = [" poetry_core>=1 .0.0" ]
48
+ requires = [" poetry_core>=2 .0.0" ]
49
49
build-backend = " poetry.core.masonry.api"
50
50
{%- endif %}
51
51
{%- endif %}
52
52
53
53
54
- {%- if cookiecutter.backend == "poetry" %}
55
-
56
-
57
- [tool .poetry ]
58
- name = " {{ cookiecutter.project_name }}"
59
- {%- if cookiecutter.vcs %}
60
- version = " 0.0.0"
61
- {%- else %}
62
- version = " 0.1.0"
63
- {%- endif %}
64
- authors = [
65
- " {{ cookiecutter.full_name }} <{{ cookiecutter.email }}>" ,
66
- ]
67
- {%- if cookiecutter.org == "scikit-hep" %}
68
- maintainers = [
69
- " The Scikit-HEP admins <[email protected] >" ,
70
- ]
71
- {%- endif %}
72
- homepage = " {{ cookiecutter.url }}"
73
- repository = " {{ cookiecutter.url }}"
74
- {%- if cookiecutter.license == "BSD" %}
75
- license = " BSD-3-Clause"
76
- {%- elif cookiecutter.license == "Apache" %}
77
- license = " Apache-2.0"
78
- {%- elif cookiecutter.license == "MIT" %}
79
- license = " MIT"
80
- {%- endif %}
81
- description = " {{ cookiecutter.project_short_description }}"
82
- readme = " README.md"
83
-
84
- classifiers = [
85
- " Development Status :: 1 - Planning" ,
86
- " Intended Audience :: Science/Research" ,
87
- " Intended Audience :: Developers" ,
88
- " Operating System :: OS Independent" ,
89
- " Topic :: Scientific/Engineering" ,
90
- " Typing :: Typed" ,
91
- ]
92
-
93
- [tool .poetry .dependencies ]
94
- python = " >=3.9"
95
-
96
- furo = { version = " >=2023.08.17" , optional = true }
97
- myst_parser = { version = " >=0.13" , optional = true }
98
- pytest = { version = " >=6" , optional = true }
99
- pytest-cov = { version = " >=3" , optional = true }
100
- sphinx = { version = " >=7.0" , optional = true }
101
- sphinx_copybutton = { version = " >=0.3.0" , optional = true }
102
- sphinx-autodoc-typehints = { version = " *" , optional = true }
103
- docutils = { version = " !=0.21.post1" , optional = true }
104
-
105
- [tool .poetry .dev-dependencies ]
106
- pytest = " >= 6"
107
- pytest-cov = " >= 3"
108
-
109
- [tool .poetry .extras ]
110
- test = [" pytest" , " pytest-cov" ]
111
- dev = [" pytest" , " pytest-cov" ]
112
- docs = [
113
- " furo" ,
114
- " myst_parser" ,
115
- " sphinx" ,
116
- " sphinx_autodoc_typehints" ,
117
- " sphinx_copybutton" ,
118
- " docutils" ,
119
- ]
120
-
121
- {%- if cookiecutter.vcs %}
122
-
123
- [tool .poetry-dynamic-versioning ]
124
- enable = true
125
- substitution.files = [" src/{{ cookiecutter.__project_slug }}/__init__.py" ]
126
- {%- endif %}
127
- {%- else %}
128
-
129
-
130
54
[project ]
131
55
name = " {{ cookiecutter.project_name }}"
132
- {%- if cookiecutter.backend in ['maturin', 'mesonpy'] or not cookiecutter.vcs and cookiecutter.backend in ['setuptools', 'pybind11', 'skbuild'] %}
56
+ {%- if cookiecutter.backend in ['maturin', 'mesonpy'] or not cookiecutter.vcs and cookiecutter.backend in ['setuptools', 'pybind11', 'skbuild', 'poetry' ] %}
133
57
version = " 0.1.0"
134
58
{%- endif %}
135
59
authors = [
@@ -196,7 +120,6 @@ Homepage = "{{ cookiecutter.url }}"
196
120
"Bug Tracker" = " {{ cookiecutter.url }}/issues"
197
121
Discussions = " {{ cookiecutter.url }}/discussions"
198
122
Changelog = " {{ cookiecutter.url }}/releases"
199
- {%- endif %}
200
123
201
124
202
125
{%- if cookiecutter.backend == "skbuild" %}
@@ -257,17 +180,32 @@ path = "src/{{ cookiecutter.__project_slug }}/__init__.py"
257
180
[tool .pdm .dev-dependencies ]
258
181
devtest = [" pytest" , " pytest-cov" ]
259
182
183
+ {%- elif cookiecutter.backend == "poetry" %}
184
+ {%- if cookiecutter.vcs %}
185
+ [tool .poetry ]
186
+ version = " 0.0.0"
187
+
188
+ [tool .poetry .requires-plugins ]
189
+ poetry-dynamic-versioning = { version = " >=1.0.0" , extras = [" plugin" ] }
190
+
191
+ [tool .poetry-dynamic-versioning ]
192
+ enable = true
193
+ substitution.files = [" src/{{ cookiecutter.__project_slug }}/__init__.py" ]
260
194
{%- endif %}
261
195
262
- {%- if cookiecutter.backend in ["pybind11", "poetry", "flit", "skbuild", "setuptools"] and cookiecutter.vcs %}
196
+ [tool .poetry .group .test .dependencies ]
197
+ pytest = " >= 6"
198
+ pytest-cov = " >= 3"
199
+ {%- endif %}
200
+
201
+
202
+ {%- if cookiecutter.backend in ["pybind11", "flit", "skbuild", "setuptools"] and cookiecutter.vcs %}
263
203
264
204
265
205
[tool .setuptools_scm ]
266
206
write_to = " src/{{ cookiecutter.__project_slug }}/_version.py"
267
- {%- endif %}
268
-
269
207
270
- {%- if cookiecutter.backend != "poetry" %}
208
+ {%- endif %}
271
209
272
210
273
211
[tool .uv ]
@@ -276,9 +214,6 @@ dev-dependencies = [
276
214
]
277
215
278
216
279
- {%- endif %}
280
-
281
-
282
217
{%- if cookiecutter.__type == "compiled" %}
283
218
284
219
0 commit comments