Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable dynamic versions in pip-tools #184

Merged
merged 9 commits into from
Dec 11, 2024
3 changes: 2 additions & 1 deletion {{ cookiecutter.project_slug }}/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
88
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.testing.pytestEnabled": true,
"editor.formatOnSave": false
}
4 changes: 3 additions & 1 deletion {{ cookiecutter.project_slug }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ build-backend = "poetry.core.masonry.api"
{%- elif cookiecutter.packaging == "pip-tools" -%}
[project]
name = "{{ cookiecutter.project_slug }}"
version = "0.1.0"
dynamic = ["version"]
description = "{{ cookiecutter.project_description }}"
authors = [
{ name = "{{ cookiecutter.author }}", email = "{{ cookiecutter.author_email }}" }
Expand Down Expand Up @@ -73,6 +73,8 @@ build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
exclude = ["htmlcov"] # Exclude the coverage report file from setuptools package finder

[tool.setuptools_scm]
{%- endif %}

[tool.mypy]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""The main module for {{ cookiecutter.project_name }}."""

from importlib.metadata import version
from importlib.metadata import PackageNotFoundError, version

__version__ = version(__name__)
try:
__version__ = version("MUSE_OS")
except PackageNotFoundError:
pass
AdrianDAlessandro marked this conversation as resolved.
Show resolved Hide resolved
AdrianDAlessandro marked this conversation as resolved.
Show resolved Hide resolved
Loading