Skip to content

Commit ae79b82

Browse files
cleanup template
1 parent 6028831 commit ae79b82

File tree

4 files changed

+14
-22
lines changed

4 files changed

+14
-22
lines changed

snok/services/new.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def _render_content_directory(
3636
relative_path = os.path.relpath(file_path, source_dir)
3737
output_path = os.path.join(output_dir, relative_path)
3838

39-
if output_path.endswith("_pyproject.toml"):
39+
if output_path.endswith("_pyproject_toml"):
4040
output_path = output_path.replace(
41-
"_pyproject.toml", "pyproject.toml"
41+
"_pyproject_toml", "pyproject.toml"
4242
)
4343

4444
_basename = os.path.basename(relative_path)
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ dev = [
3030
"wheel>=0.36",
3131
]
3232

33+
[tool.setuptools.dynamic.version]
34+
attr = "{{ __template_name }}.__version__"
35+
36+
[tool.setuptools.package-data]
37+
{{ __template_name }} = ["py.typed"]
38+
39+
[tool.setuptools.dynamic]
40+
version = {attr = "{{ __template_name }}.__version__"}
41+
42+
[tool.setuptools.packages.find]
43+
exclude = ["tests"]
44+
3345
[tool.ruff]
3446
line-length = 88
3547
ignore = [
@@ -126,6 +138,3 @@ directory = "htmlcov"
126138

127139
[tool.coverage.xml]
128140
output = "coverage.xml"
129-
130-
[tool.setuptools.dynamic.version]
131-
attr = "{{ __template_name }}.__version__"

snok/templates/__shared/setup.cfg

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/test_cli_new.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def test_new_package(cli_runner: CliRunner, setup_test_project_dir: str) -> None
1919
f"{setup_test_project_dir}/tests",
2020
f"{setup_test_project_dir}/.git",
2121
f"{setup_test_project_dir}/README.md",
22-
f"{setup_test_project_dir}/setup.cfg",
2322
f"{setup_test_project_dir}/pyproject.toml",
2423
f"{setup_test_project_dir}/.gitignore",
2524
f"{setup_test_project_dir}/test_package/__init__.py",

0 commit comments

Comments
 (0)