proper version/ bug fixed

This commit is contained in:
fivethreeo 2011-09-20 15:59:57 +02:00
parent 2c21b672df
commit 60211e4fb4
3 changed files with 19 additions and 3 deletions

View File

@ -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.

View File

@ -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',

View File

@ -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