diff options
-rw-r--r-- | diplomacy/version.py | 2 | ||||
-rw-r--r-- | docs/conf.py | 6 | ||||
-rw-r--r-- | setup.py | 9 |
3 files changed, 11 insertions, 6 deletions
diff --git a/diplomacy/version.py b/diplomacy/version.py new file mode 100644 index 0000000..af3331a --- /dev/null +++ b/diplomacy/version.py @@ -0,0 +1,2 @@ +""" Contains the package version """ +PACKAGE_VERSION = '1.1.0' diff --git a/docs/conf.py b/docs/conf.py index 10f8f40..3ed18df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,9 @@ import os import sys sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.join(os.path.abspath('..'), 'diplomacy')) from datetime import datetime +from version import PACKAGE_VERSION # -- Project information ----------------------------------------------------- @@ -22,8 +24,8 @@ author = 'Philip Paquette' copyright = str(datetime.now().year) + ' - ' + author # The full version, including alpha/beta/rc tags -version = 'latest' -release = 'latest' +version = PACKAGE_VERSION +release = PACKAGE_VERSION # -- General configuration --------------------------------------------------- autodoc_member_order = 'bysource' @@ -19,6 +19,10 @@ import os import sys from setuptools import setup, find_packages +# Import the current version +sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'diplomacy')) +from version import PACKAGE_VERSION + # Requiring python 3.5+. # To simplify code for Tornado coroutines return statements, we don't support Python 3.4 # ( more info here: http://www.tornadoweb.org/en/stable/guide/coroutines.html#coroutines ). @@ -28,10 +32,7 @@ if (sys.version_info.major, sys.version_info.minor) <= (3, 4): # ------------------------------------ # Configuration -PACKAGE_NAME = 'diplomacy' -PACKAGE_VERSION = '1.1.0' - -setup(name=PACKAGE_NAME, +setup(name='diplomacy', version=PACKAGE_VERSION, description='Diplomacy: DATC-Compliant Game Engine with Web Interface', long_description=open(os.path.join(os.path.dirname(__file__), 'README.md')).read(), |