Skip to content

Commit 9d47d0f

Browse files
aborrusoclaude
andcommitted
fix: VERSION letto da package metadata, non hardcoded
Risolve il bug per cui --version mostrava sempre 2.1.10 indipendentemente dalla versione installata. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 401072e commit 9d47d0f

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "normattiva2md"
7-
version = "2.1.12"
7+
version = "2.1.13"
88
description = "Convertitore da XML Akoma Ntoso a formato Markdown con download automatico delle leggi citate e cross-references inline (CLI: normattiva2md)"
99
readme = "README.md"
1010
requires-python = ">=3.7"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def read_readme():
1919

2020
setup(
2121
name="normattiva2md",
22-
version="2.1.12",
22+
version="2.1.13",
2323
description="Convertitore da XML Akoma Ntoso a formato Markdown con download automatico delle leggi citate e cross-references inline (CLI: normattiva2md)",
2424
long_description=read_readme(),
2525
long_description_content_type="text/markdown",

src/normattiva2md/constants.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
MAX_FILE_SIZE_MB = 50
88
MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024
99
DEFAULT_TIMEOUT = 30
10-
VERSION = "2.1.10"
10+
try:
11+
from importlib.metadata import version as _pkg_version
12+
VERSION = _pkg_version("normattiva2md")
13+
except Exception:
14+
VERSION = "unknown"

0 commit comments

Comments
 (0)