From 6fa4282102516d5f72e46b8fcd32e0a8cf99536a Mon Sep 17 00:00:00 2001 From: alfred82santa Date: Wed, 2 Nov 2016 20:28:43 +0100 Subject: [PATCH] Share version --- README.rst | 2 ++ dirty_models/__init__.py | 2 ++ docs/source/conf.py | 9 +++++---- setup.py | 5 ++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index d386dad..923e36c 100644 --- a/README.rst +++ b/README.rst @@ -93,6 +93,8 @@ Version 0.9.0 - Fixes on requirements. - Fixes on formatter iters. - Fixes on code. +- Added ``__version__`` to main package file. +- Synchronized version between main packege file, ``setup.py`` and docs. Version 0.8.1 diff --git a/dirty_models/__init__.py b/dirty_models/__init__.py index 0c40a86..3dec7f4 100644 --- a/dirty_models/__init__.py +++ b/dirty_models/__init__.py @@ -6,3 +6,5 @@ from .models import * from .fields import * + +__version__ = '0.9.0' \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index d11e9ad..6221e0d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,7 +15,7 @@ import sys import os - +from datetime import datetime dirty_models_path = os.path.join(os.path.dirname(__file__), '..', '..') sys.path.insert(0, dirty_models_path) # If extensions (or modules to document with autodoc) are in another directory, @@ -57,17 +57,18 @@ # General information about the project. project = 'Dirty Models' -copyright = '2016, alfred82santa, tmarques82, padajuan, xejarque, oarnau' +copyright = '{}, alfred82santa, tmarques82, padajuan, xejarque, oarnau'.format(datetime.now().year) author = 'alfred82santa, tmarques82, padajuan, xejarque, oarnau' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # +from dirty_models import __version__ # The short X.Y version. -version = '0.9.0' +version = __version__ # The full version, including alpha/beta/rc tags. -release = '0.9.0' +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 d92a3c3..974b920 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,11 @@ import sys + import os import re from setuptools import setup +import dirty_models + install_requires = ['python-dateutil'] if sys.version_info < (3, 4): @@ -19,7 +22,7 @@ name='dirty-models', url='https://github.com/alfred82santa/dirty-models', author='alfred82santa', - version='0.9.0', + version=dirty_models.__version__, author_email='alfred82santa@gmail.com', license='BSD', classifiers=[