Consolidate version strings in pyproject.toml

Storing the current version in a single place greatly simplifies
issuing new package releases.
This commit is contained in:
Justin Mayer 2019-07-03 23:31:38 +02:00
commit 54911fff39
3 changed files with 26 additions and 3 deletions

View file

@ -32,7 +32,12 @@ from pelican.utils import (clean_output_dir, file_watcher,
folder_watcher, maybe_pluralize)
from pelican.writers import Writer
__version__ = "4.0.2.dev0"
try:
__version__ = __import__('pkg_resources') \
.get_distribution('pelican').version
except Exception:
__version__ = "unknown"
DEFAULT_CONFIG_NAME = 'pelicanconf.py'
logger = logging.getLogger(__name__)