Skip to content

Commit

Permalink
Simplify version template for setuptools-scm
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCEllis committed Jul 17, 2024
1 parent f62845d commit bb24f7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ where = ["src"]

[tool.setuptools_scm]
version_file = "src/ducktools/classbuilder/_version.py"
version_file_template = "__version__ = \"{version}\"\n__version_tuple__ = {version_tuple}\n"


[project.optional-dependencies]
testing = ["pytest>=8.2", "pytest-cov", "mypy", "typing_extensions"]
Expand Down
2 changes: 1 addition & 1 deletion src/ducktools/classbuilder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import os

from .annotations import get_ns_annotations, is_classvar
from ._version import __version__
from ._version import __version__, __version_tuple__

# Change this name if you make heavy modifications
INTERNALS_DICT = "__classbuilder_internals__"
Expand Down
1 change: 1 addition & 0 deletions src/ducktools/classbuilder/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ _py_type = type | str # Alias for type hint values
_CopiableMappings = dict[str, typing.Any] | MappingProxyType[str, typing.Any]

__version__: str
__version_tuple__: tuple[str | int, ...]
INTERNALS_DICT: str
META_GATHERER_NAME: str

Expand Down

0 comments on commit bb24f7f

Please sign in to comment.