diff options
author | 2023-09-01 12:24:19 +0200 | |
---|---|---|
committer | 2023-09-01 12:24:19 +0200 | |
commit | 70a3a1448c5fa88b01df23f97be8f2abe23977f2 (patch) | |
tree | 264965c104bea52184c4bc56014e7f8b96cbefa5 | |
parent | Migrate to pyproject.toml (diff) | |
download | tyrian-sphinx-theme-70a3a1448c5fa88b01df23f97be8f2abe23977f2.tar.gz tyrian-sphinx-theme-70a3a1448c5fa88b01df23f97be8f2abe23977f2.tar.bz2 tyrian-sphinx-theme-70a3a1448c5fa88b01df23f97be8f2abe23977f2.zip |
Move __version__ to __init__.py
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r-- | pyproject.toml | 2 | ||||
-rw-r--r-- | tyrian_sphinx_theme/__init__.py | 8 | ||||
-rw-r--r-- | tyrian_sphinx_theme/_version.py | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/pyproject.toml b/pyproject.toml index c6b344d..e23bf89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,4 +38,4 @@ tyrian_sphinx_theme = [ ] [tool.setuptools.dynamic] -version = {attr = "tyrian_sphinx_theme._version.__version__"} +version = {attr = "tyrian_sphinx_theme.__version__"} diff --git a/tyrian_sphinx_theme/__init__.py b/tyrian_sphinx_theme/__init__.py index 5304f18..2102bb4 100644 --- a/tyrian_sphinx_theme/__init__.py +++ b/tyrian_sphinx_theme/__init__.py @@ -1,6 +1,8 @@ import os -from tyrian_sphinx_theme import _version as version + +__version__ = "0.0.8" + def get_path(): """ @@ -11,7 +13,7 @@ def get_path(): def update_context(app, pagename, templatename, context, doctree): - context["tyrian_version"] = version.__version__ + context["tyrian_version"] = __version__ def setup(app): @@ -20,4 +22,4 @@ def setup(app): theme_path = os.path.abspath(os.path.dirname(__file__)) app.add_html_theme("tyrian_sphinx_theme", theme_path) app.connect("html-page-context", update_context) - return {"version": version.__version__, "parallel_read_safe": True}
\ No newline at end of file + return {"version": __version__, "parallel_read_safe": True} diff --git a/tyrian_sphinx_theme/_version.py b/tyrian_sphinx_theme/_version.py deleted file mode 100644 index 87b9c6b..0000000 --- a/tyrian_sphinx_theme/_version.py +++ /dev/null @@ -1,2 +0,0 @@ -__version_info__ = (0, 0, 8) -__version__ = ".".join(map(str, __version_info__)) |