diff --git a/doc/conf.py b/doc/conf.py index dbeac75..0795320 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -11,6 +11,8 @@ import sys, os, time, codecs, re sys.path.insert(0, os.path.abspath('../')) sys.path.insert(0, os.path.abspath('.')) +import feedgen.version + # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -37,7 +39,7 @@ source_encoding = 'utf-8-sig' master_doc = 'index' # General information about the project. -project = u'pyFeedGen' +project = u'python-feedgen' copyright = u'2013, Lars Kiesow' # The version info for the project you're documenting, acts as replacement for @@ -45,9 +47,9 @@ copyright = u'2013, Lars Kiesow' # built documents. # # The short X.Y version. -version = '0.2' +version = feedgen.version.version_minor_str # The full version, including alpha/beta/rc tags. -release = '0.2.3' +release = feedgen.version.version_full_str # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/feedgen/feed.py b/feedgen/feed.py index ec40fa7..989d061 100644 --- a/feedgen/feed.py +++ b/feedgen/feed.py @@ -18,7 +18,7 @@ from feedgen.util import ensure_format import feedgen.version -_feedgen_version = feedgen.version.version +_feedgen_version = feedgen.version.version_str class FeedGenerator(object): @@ -47,7 +47,7 @@ class FeedGenerator(object): self.__atom_generator = { 'value' :'python-feedgen', 'url' :'http://lkiesow.github.io/python-feedgen', - 'version':feedgen.version.version } #{value*,uri,version} + 'version':feedgen.version.version_str } #{value*,uri,version} self.__atom_icon = None self.__atom_logo = None self.__atom_rights = None diff --git a/feedgen/version.py b/feedgen/version.py index 24e4941..af05694 100644 --- a/feedgen/version.py +++ b/feedgen/version.py @@ -10,8 +10,16 @@ ''' 'Version of python-feedgen represented as tuple' -version_elements = (0, 2, 3) +version = (0, 2, 3) 'Version of python-feedgen represented as string' -version = '.'.join([str(x) for x in version_elements]) +version_str = '.'.join([str(x) for x in version]) + +version_major = version[:1] +version_minor = version[:2] +version_full = version + +version_major_str = '.'.join([str(x) for x in version_major]) +version_minor_str = '.'.join([str(x) for x in version_minor]) +version_full_str = '.'.join([str(x) for x in version_full]) diff --git a/setup.py b/setup.py index e3b9e55..843f1d7 100755 --- a/setup.py +++ b/setup.py @@ -2,10 +2,12 @@ # -*- coding: utf-8 -*- from distutils.core import setup +import feedgen.version + setup( name = 'feedgen', packages = ['feedgen', 'feedgen/ext'], - version = '0.2.3', + version = feedgen.version.version_full_str, description = 'Feed Generator (ATOM, RSS, Podcasts)', author = 'Lars Kiesow', author_email = 'lkiesow@uos.de',