From bffec48e01767bcb29ea26aa951bae4427a497e1 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 9 May 2020 17:32:05 -0500 Subject: [PATCH] Adds centralized version store --- dj_rest_auth/__version__.py | 8 ++++++++ docs/conf.py | 8 ++++++-- setup.py | 6 +++++- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 dj_rest_auth/__version__.py diff --git a/dj_rest_auth/__version__.py b/dj_rest_auth/__version__.py new file mode 100644 index 0000000..dd67bed --- /dev/null +++ b/dj_rest_auth/__version__.py @@ -0,0 +1,8 @@ +__title__ = 'dj-rest-auth' +__description__ = 'Authentication and Registration in Django Rest Framework.' +__url__ = 'http://github.com/jazzband/dj-rest-auth' +__version__ = '1.0.5' +__author__ = '@iMerica https://github.com/iMerica' +__author_email__ = 'imichael@pm.me' +__license__ = 'MIT' +__copyright__ = 'Copyright 2020 @iMerica https://github.com/iMerica' \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 1f57578..97831a7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,10 @@ import os import sys +about = {} +with open('../dj_rest_auth/__version__.py', 'r', encoding="utf8") as f: + exec(f.read(), about) + # 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. @@ -51,9 +55,9 @@ copyright = u'2020, @iMerica' # built documents. # # The short X.Y version. -version = '0.9.5' +version = about['__version__'] # The full version, including alpha/beta/rc tags. -release = '0.9.5' +release = about['__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 9c98f60..fac004b 100644 --- a/setup.py +++ b/setup.py @@ -10,9 +10,13 @@ long_description = f.read().strip() f.close() +about = {} +with open('dj_rest_auth/__version__.py', 'r', encoding="utf8") as f: + exec(f.read(), about) + setup( name='dj-rest-auth', - version='1.0.4', + version=about['__version__'], author='iMerica', author_email='imichael@pm.me', url='http://github.com/jazzband/dj-rest-auth',