diff --git a/djrill/__init__.py b/djrill/__init__.py index 565b557..b8acf10 100644 --- a/djrill/__init__.py +++ b/djrill/__init__.py @@ -4,8 +4,7 @@ from django.utils.text import capfirst from djrill.exceptions import MandrillAPIError, NotSupportedByMandrillError -VERSION = (0, 3, 1) -__version__ = '.'.join([str(x) for x in VERSION]) +from ._version import * # This backend was developed against this API endpoint. # You can override in settings.py, if desired. diff --git a/djrill/_version.py b/djrill/_version.py new file mode 100644 index 0000000..5801cf9 --- /dev/null +++ b/djrill/_version.py @@ -0,0 +1,3 @@ +VERSION = (0, 3, 1) +__version__ = '.'.join([str(x) for x in VERSION]) +__minor_version__ = '.'.join([str(x) for x in VERSION[:2]]) # Sphinx's X.Y "version" diff --git a/docs/conf.py b/docs/conf.py index 2dfe240..49222ff 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,7 +16,9 @@ import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('..')) + +execfile('../djrill/_version.py') # -- General configuration ----------------------------------------------------- @@ -48,9 +50,9 @@ copyright = u'2013, Djrill contributors (see AUTHORS.txt)' # built documents. # # The short X.Y version. -version = '0.3' +version = __minor_version__ # The full version, including alpha/beta/rc tags. -release = '0.3.1' +release = __version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 34a0c0a..bd08c5d 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ from setuptools import setup +execfile('djrill/_version.py') with open('LICENSE') as file: license_text = file.read() @@ -7,7 +8,7 @@ with open('README.rst') as file: setup( name="djrill", - version="0.3.1", + version=__version__, description='Django email backend for Mandrill.', keywords="django, mailchimp, mandrill, email, email backend", author="Kenneth Love , Chris Jones ",