Explicitly write Version to file

This commit is contained in:
Manuel Ebert 2019-11-07 16:48:47 -08:00
parent 53677a9df1
commit de52081481
4 changed files with 10 additions and 4 deletions

View file

@ -1,9 +1,12 @@
#!/usr/bin/env python
# encoding: utf-8
import pkg_resources
import os
dist = pkg_resources.get_distribution('jrnl')
__title__ = dist.project_name
__version__ = dist.version
__title__ = "jrnl"
__version__ = "source"
version_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "VERSION.txt")
if os.path.exists(version_path):
with open(version_path) as version_file:
__version__ = version_file.read()