included version in docs and setup

This commit is contained in:
Lars Kiesow 2013-05-16 19:30:29 +02:00
parent 2bccdecde0
commit 950e2f909d
4 changed files with 20 additions and 8 deletions

View file

@ -11,6 +11,8 @@ import sys, os, time, codecs, re
sys.path.insert(0, os.path.abspath('../')) sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('.'))
import feedgen.version
# -- General configuration ----------------------------------------------------- # -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
@ -37,7 +39,7 @@ source_encoding = 'utf-8-sig'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'pyFeedGen' project = u'python-feedgen'
copyright = u'2013, Lars Kiesow' copyright = u'2013, Lars Kiesow'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
@ -45,9 +47,9 @@ copyright = u'2013, Lars Kiesow'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.2' version = feedgen.version.version_minor_str
# The full version, including alpha/beta/rc tags. # 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 # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View file

@ -18,7 +18,7 @@ from feedgen.util import ensure_format
import feedgen.version import feedgen.version
_feedgen_version = feedgen.version.version _feedgen_version = feedgen.version.version_str
class FeedGenerator(object): class FeedGenerator(object):
@ -47,7 +47,7 @@ class FeedGenerator(object):
self.__atom_generator = { self.__atom_generator = {
'value' :'python-feedgen', 'value' :'python-feedgen',
'url' :'http://lkiesow.github.io/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_icon = None
self.__atom_logo = None self.__atom_logo = None
self.__atom_rights = None self.__atom_rights = None

View file

@ -10,8 +10,16 @@
''' '''
'Version of python-feedgen represented as tuple' 'Version of python-feedgen represented as tuple'
version_elements = (0, 2, 3) version = (0, 2, 3)
'Version of python-feedgen represented as string' '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])

View file

@ -2,10 +2,12 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from distutils.core import setup from distutils.core import setup
import feedgen.version
setup( setup(
name = 'feedgen', name = 'feedgen',
packages = ['feedgen', 'feedgen/ext'], packages = ['feedgen', 'feedgen/ext'],
version = '0.2.3', version = feedgen.version.version_full_str,
description = 'Feed Generator (ATOM, RSS, Podcasts)', description = 'Feed Generator (ATOM, RSS, Podcasts)',
author = 'Lars Kiesow', author = 'Lars Kiesow',
author_email = 'lkiesow@uos.de', author_email = 'lkiesow@uos.de',