Skip to content

Commit

Permalink
use setuptools_scm to determine the version based on the latest git tag
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Lauser <[email protected]>
Signed-off-by: Florian Jost <[email protected]>
  • Loading branch information
andlaus committed Nov 16, 2023
1 parent 8009b0c commit 6b5bf72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=68"]
requires = ["setuptools>=68", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -33,6 +33,9 @@ dependencies = [
]
dynamic = ["version"]

[tool.setuptools_scm]
version_file = "src/cantools/version.py"

[project.optional-dependencies]
dev = [
"mypy",
Expand All @@ -59,9 +62,6 @@ where = ["src"]
[tool.setuptools.package-data]
cantools = ["py.typed"]

[tool.setuptools.dynamic]
version = {attr = "cantools.__version__"}

[tool.mypy]
show_error_codes = true
warn_return_any = true
Expand Down
2 changes: 1 addition & 1 deletion src/cantools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from . import database as db # isort: skip

__author__ = 'Erik Moqvist'
__version__ = '39.3.0'
from .version import version as __version__

class _ErrorSubparser:
def __init__(self, subparser_name, error_message):
Expand Down

0 comments on commit 6b5bf72

Please sign in to comment.