-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from ssciwr/optional-setuptools-scm
Make the use of setuptools_scm optional
- Loading branch information
Showing
6 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,9 @@ | |
[build-system] | ||
requires = [ | ||
"setuptools >=61", | ||
{%- if cookiecutter.version_management == "setuptools_scm" %} | ||
"setuptools_scm >=7", | ||
{%- endif %} | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
@@ -18,7 +20,11 @@ readme = "README.md" | |
maintainers = [ | ||
{ name = "{{ cookiecutter.full_name}}", email = "[email protected]" }, | ||
] | ||
{%- if cookiecutter.version_management == "setuptools_scm" %} | ||
dynamic = ["version"] | ||
{%- else %} | ||
version = "0.0.1" | ||
{%- endif %} | ||
requires-python = ">=3.8" | ||
{%- if cookiecutter.license != "None" %} | ||
license = { text = "{{ cookiecutter.license }}" } | ||
|
@@ -75,6 +81,7 @@ docs = [ | |
packages = [ | ||
"{{ cookiecutter|modname }}", | ||
] | ||
{%- if cookiecutter.version_management == "setuptools_scm" %} | ||
|
||
# Configure setuptools_scm, which extracts the version number from | ||
# the version control system. For more information see its documentation: | ||
|
@@ -83,6 +90,7 @@ packages = [ | |
version_scheme = "post-release" | ||
local_scheme = "node-and-date" | ||
write_to = "{{ cookiecutter|modname }}/_version.py" | ||
{%- endif %} | ||
|
||
# The following is the configuration for the pytest test suite | ||
[tool.pytest.ini_options] | ||
|
6 changes: 6 additions & 0 deletions
6
{{cookiecutter.project_slug}}/{{cookiecutter.__modname}}/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters