Added the VERSION constant to the accounting module for the package version, and revised pyproject.toml and conf.py to read the version from it.
This commit is contained in:
parent
5f75d93c6a
commit
5815608288
@ -6,6 +6,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('../../src/'))
|
sys.path.insert(0, os.path.abspath('../../src/'))
|
||||||
|
import accounting
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||||
@ -13,7 +14,7 @@ sys.path.insert(0, os.path.abspath('../../src/'))
|
|||||||
project = 'Mia! Accounting'
|
project = 'Mia! Accounting'
|
||||||
copyright = '2023, imacat'
|
copyright = '2023, imacat'
|
||||||
author = 'imacat'
|
author = 'imacat'
|
||||||
release = '1.4.1'
|
release = accounting.VERSION
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "mia-accounting"
|
name = "mia-accounting"
|
||||||
version = "1.4.1"
|
dynamic = ["version"]
|
||||||
description = "A Flask accounting module."
|
description = "A Flask accounting module."
|
||||||
readme = "README.rst"
|
readme = "README.rst"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
@ -59,6 +59,9 @@ test = [
|
|||||||
requires = ["setuptools>=42"]
|
requires = ["setuptools>=42"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[tool.setuptools.dynamic]
|
||||||
|
version = {attr = "accounting.VERSION"}
|
||||||
|
|
||||||
[tool.setuptools.exclude-package-data]
|
[tool.setuptools.exclude-package-data]
|
||||||
"*" = [
|
"*" = [
|
||||||
"babel.cfg",
|
"babel.cfg",
|
||||||
|
@ -24,6 +24,8 @@ from flask_sqlalchemy import SQLAlchemy
|
|||||||
|
|
||||||
from accounting.utils.user import UserUtilityInterface
|
from accounting.utils.user import UserUtilityInterface
|
||||||
|
|
||||||
|
VERSION: str = "1.4.1"
|
||||||
|
"""The package version."""
|
||||||
db: SQLAlchemy = SQLAlchemy()
|
db: SQLAlchemy = SQLAlchemy()
|
||||||
"""The database instance."""
|
"""The database instance."""
|
||||||
data_dir: Path = Path(__file__).parent / "data"
|
data_dir: Path = Path(__file__).parent / "data"
|
||||||
|
Loading…
Reference in New Issue
Block a user