From 60211e4fb4a078f58fff51b13b0e80f4b7e352ad Mon Sep 17 00:00:00 2001 From: fivethreeo Date: Tue, 20 Sep 2011 15:59:57 +0200 Subject: [PATCH] proper version/ bug fixed --- docs/conf.py | 5 +++-- setup.py | 4 +++- simple_translation/__init__.py | 13 +++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index ac9ffb9..733755a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,6 +13,7 @@ # to show the default. import sys, os +import simple_translation # If extensions (or modules to document with autodoc) are in another # directory, add these directories to sys.path here. If the directory is @@ -47,9 +48,9 @@ copyright = unicode('Øyvind Saltvik', 'utf-8') # # The short X.Y version. -version = '0.7.4' +version = simple_translation.get_version() # The full version, including alpha/beta/rc tags. -release = '0.7.4' +release = simple_translation.get_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 3a7fba4..1fd5436 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,11 @@ from setuptools import setup, find_packages import os +import simple_translation + setup( name='simple-translation', - version='0.8', + version=simple_translation.get_version(), description='This is a translation app/plugin with support for django-cms 2.1 plugins in the admin', long_description=open(os.path.join(os.path.dirname(__file__), 'README')).read(), author='Oyvind Saltvik', diff --git a/simple_translation/__init__.py b/simple_translation/__init__.py index e69de29..c5e0633 100644 --- a/simple_translation/__init__.py +++ b/simple_translation/__init__.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +VERSION = (0, 8, 1, 'final', 0) + +def get_version(): # pragma: no cover + version = '%s.%s' % (VERSION[0], VERSION[1]) + if VERSION[2]: + version = '%s.%s' % (version, VERSION[2]) + if VERSION[3:] == ('alpha', 0): + version = '%s pre-alpha' % version + else: + if VERSION[3] != 'final': + version = '%s %s %s' % (version, VERSION[3], VERSION[4]) + return version \ No newline at end of file