💄 Pull version from installation metadata (#172)

The version string in the `__init__` module is needed to support
towncrier, but that does mean there are now two locations for the
project version: pyproject.toml and the `__init__.py` file. Use
`importlib.metadata` to pull the version from the installation metadata.
This commit is contained in:
Martijn Pieters
2023-05-17 18:09:52 +01:00
committed by GitHub
parent 70d8fef402
commit fbdaa62e24
4 changed files with 19 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ aiomcache = { version = "*", optional = true }
pendulum = "*"
aiobotocore = { version = ">=1.4.1,<3.0.0", optional = true }
typing-extensions = { version = ">=4.1.0" }
importlib-metadata = {version = "^6.6.0", python = "<3.8"}
[tool.poetry.group.linting]
optional = true