Skip to content

Commit 7b3bc3c

Browse files
committed
prevent template reuse file check by renaming it and renaming back on procesing
1 parent 0c15c57 commit 7b3bc3c

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ classifiers = [
1212
"Intended Audience :: Science/Research",
1313
"Intended Audience :: Developers",
1414
]
15-
authors = [{name = "Anton Pirogov", email = "a.pirogov@fz-juelich.de"}, {name = "Mustafa Soylu", email = "m.soylu@fz-juelich.de"}]
16-
maintainers = [{name = "Mustafa Soylu", email = "m.soylu@fz-juelich.de"}]
1715
requires-python = ">=3.9"
1816
dependencies = [
1917
"cookiecutter>=2.6.0",
@@ -26,6 +24,8 @@ dependencies = [
2624
"importlib-resources>=6.4.0",
2725
"importlib-metadata (>=8.6.1,<9.0.0)"
2826
]
27+
authors = [{name = "Anton Pirogov", email = "a.pirogov@fz-juelich.de"}, {name = "Mustafa Soylu", email = "m.soylu@fz-juelich.de"}]
28+
maintainers = [{name = "Mustafa Soylu", email = "m.soylu@fz-juelich.de"}]
2929
[project.urls]
3030
homepage = "https://materials-data-science-and-informatics.github.io/fair-python-cookiecutter"
3131
repository = "https://github.com/Materials-Data-Science-and-Informatics/fair-python-cookiecutter"

src/fair_python_cookiecutter/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ def download_licenses(
6666
"""Download all needed licenses and create main LICENSE file."""
6767
# download licenses if no licenses dir is in the project dir
6868
if force_download or not (proj_root / "LICENSES").is_dir():
69+
# first rename temp-REUSE.toml to REUSE.toml
70+
if (proj_root / "temp-REUSE.toml").is_file():
71+
(proj_root / "temp-REUSE.toml").rename(proj_root / "REUSE.toml")
6972
# only install reuse/pipx if it is not found
7073
reuse_cmd = "reuse --suppress-deprecation download --all"
7174
if not which("reuse"):

src/fair_python_cookiecutter/template/{{ cookiecutter.project_slug }}/REUSE.toml renamed to src/fair_python_cookiecutter/template/{{ cookiecutter.project_slug }}/temp-REUSE.toml

File renamed without changes.

0 commit comments

Comments
 (0)