Skip to content

Commit

Permalink
Reduce the count of locations where the version number must be update…
Browse files Browse the repository at this point in the history
…d to exactly one.

See also python-poetry/poetry#2366 (comment) for recommended practice
  • Loading branch information
Csonkás Kristóf Gyula committed Feb 26, 2021
1 parent 799bef9 commit 4ed8c12
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
19 changes: 9 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ authors = ["Csonkás Kristóf Gyula <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.7"
sphinx = "^3.5.1"
importlib-metadata = { version = "^1.0", python = "<3.8" }

[tool.poetry.dev-dependencies]
pytest = "^3.0"
Expand Down
8 changes: 7 additions & 1 deletion sphinx_thrift/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import sys
from typing import Any, Dict

from sphinx.application import Sphinx

__version__ = '0.1.0'
if sys.version_info >= (3, 8):
from importlib import metadata as importlib_metadata
else:
import importlib_metadata

__version__ = importlib_metadata.version(__name__)


def setup(app: Sphinx) -> Dict[str, Any]:
Expand Down

0 comments on commit 4ed8c12

Please sign in to comment.