Skip to content

Commit

Permalink
Storing version number in only one place
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Apr 17, 2016
1 parent f316851 commit c48ca23
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion caravel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
from flask.ext.cache import Cache
from flask.ext.migrate import Migrate

VERSION = '0.8.8'
from caravel import version

VERSION = version.VERSION_STRING

APP_DIR = os.path.dirname(__file__)
CONFIG_MODULE = os.environ.get('CARAVEL_CONFIG', 'caravel.config')
Expand Down
7 changes: 7 additions & 0 deletions caravel/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
VERSION_MAJOR = 0
VERSION_MINOR = 8
VERSION_BUILD = 8
VERSION_INFO = (VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD)
VERSION_STRING = "%d.%d.%d" % VERSION_INFO

__version__ = VERSION_INFO
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import imp, os
from setuptools import setup, find_packages

VERSION = '0.8.8'

version = imp.load_source(
'version', os.path.join('caravel', 'version.py'))

setup(
name='caravel',
description=(
"A interactive data visualization platform build on SqlAlchemy "
"and druid.io"),
version=VERSION,
version=version.VERSION_STRING,
packages=find_packages(),
include_package_data=True,
zip_safe=False,
Expand Down Expand Up @@ -41,5 +42,5 @@
author_email='[email protected]',
url='https://github.com/airbnb/caravel',
download_url=(
'https://github.com/airbnb/caravel/tarball/' + VERSION),
'https://github.com/airbnb/caravel/tarball/' + version.VERSION_STRING),
)

0 comments on commit c48ca23

Please sign in to comment.