diff --git a/.gitignore b/.gitignore index 040f57c..ad83af9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ !example-*.yml !.*.yml -# Ignore automatically generated version for normal commits. This is bumped manually when needed. +# Automatically generated by setup.py __init__.py env/ diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..ea5e9d3 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.9-beta1 diff --git a/__init__.py b/__init__.py deleted file mode 100644 index e2c1666..0000000 --- a/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = '0.9-beta1' diff --git a/setup.py b/setup.py index 8961eec..6bc7665 100644 --- a/setup.py +++ b/setup.py @@ -10,8 +10,9 @@ try: version = subprocess.check_output(['git', 'describe', '--tags']).decode('utf-8').strip() except Exception as e: print('ERROR: Failed to get version from "git describe --tags": %s: %s' % (type(e).__name__, e)) - from __init__ import __version__ as fallback_version + with open('VERSION') as f: + fallback_version = f.read().strip() print('Using fallback version of %r.' % fallback_version) version = fallback_version