Skip to content

Commit

Permalink
Add VERSION field and use it in setup.py and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jodal committed Dec 7, 2010
1 parent 912cfb5 commit a72a94f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))

import pykka

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -48,9 +50,9 @@
# built documents.
#
# The short X.Y version.
version = '0.3'
version = pykka.get_version()
# The full version, including alpha/beta/rc tags.
release = '0.3'
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
9 changes: 9 additions & 0 deletions pykka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
__all__ = ['Actor', 'ActorRegistry', 'get_all', 'wait_all']


VERSION = (0, 4)

def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if len(VERSION) > 2:
version = '%s.%s' % (version, VERSION[2])
return version


class ActorRegistry(object):
"""
Registry which provides easy access to all running actors.
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from distutils.core import setup

import pykka

setup(
name='Pykka',
version='0.3',
version=pykka.get_version(),
author='Stein Magnus Jodal',
author_email='stein.magnus@jodal.no',
packages=['pykka'],
Expand Down

0 comments on commit a72a94f

Please sign in to comment.