diff --git a/README.rst b/README.rst index 66b0d69..4aba52a 100644 --- a/README.rst +++ b/README.rst @@ -16,7 +16,7 @@ visualization. .. figure:: https://raw.githubusercontent.com/cloudbrain/cloudbrain/master/docs/images/features.png :alt: features - :width: 600 px + :width: 100 % Using CloudBrain ================ diff --git a/setup.py b/setup.py index 67dc824..9dc6c4f 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,13 @@ from setuptools import setup, find_packages from pip.download import PipSession from pip.req import parse_requirements +import os -VERSION = '0.0.10' +# Get __version__ and set other constants. +exec(open(os.path.join('src', 'cloudbrain', + 'version.py')).read()) URL = 'https://github.com/cloudbrain/cloudbrain' -DOWNLOAD_URL='%s/archive/%s.tar.gz' % (URL, VERSION) +DOWNLOAD_URL='%s/archive/%s.tar.gz' % (URL, __version__) DESCRIPTION = open('README.rst').read() # Requirements @@ -12,7 +15,7 @@ reqs = [str(ir.req) for ir in install_reqs] setup(name='cloudbrain', - version=VERSION, + version=__version__, description='Platform for wearable data analysis.', author='Marion Le Borgne', author_email='marion@ebrain.io', @@ -34,6 +37,6 @@ }, entry_points = { 'console_scripts': - ['cloudbrain = cloudbrain.run'] + ['cloudbrain=cloudbrain.run:main'] } ) diff --git a/src/cloudbrain/__init__.py b/src/cloudbrain/__init__.py index e69de29..58f3ace 100644 --- a/src/cloudbrain/__init__.py +++ b/src/cloudbrain/__init__.py @@ -0,0 +1 @@ +from .version import __version__ diff --git a/src/cloudbrain/version.py b/src/cloudbrain/version.py new file mode 100644 index 0000000..23bbbd7 --- /dev/null +++ b/src/cloudbrain/version.py @@ -0,0 +1,7 @@ +# Store the version here so: +# 1) we don't load dependencies by storing it in __init__.py +# 2) we can import it in setup.py for the same reason +# 3) we can import it into your module module +# +# Source: https://stackoverflow.com/a/16084844 +__version__ = '0.0.11'