From 5cc63e67cfb8aec15ff1d0a4fc8240cafd64cd71 Mon Sep 17 00:00:00 2001 From: Jon Haddad Date: Thu, 27 Jun 2013 14:58:32 -0700 Subject: [PATCH] CQL version file instead of manually updating --- cqlengine/VERSION | 1 + cqlengine/__init__.py | 4 +++- docs/conf.py | 7 +++++-- setup.py | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 cqlengine/VERSION diff --git a/cqlengine/VERSION b/cqlengine/VERSION new file mode 100644 index 00000000..cb498ab2 --- /dev/null +++ b/cqlengine/VERSION @@ -0,0 +1 @@ +0.4.8 diff --git a/cqlengine/__init__.py b/cqlengine/__init__.py index d9763109..bdcaa6e4 100644 --- a/cqlengine/__init__.py +++ b/cqlengine/__init__.py @@ -3,5 +3,7 @@ from cqlengine.functions import * from cqlengine.models import Model from cqlengine.query import BatchQuery -__version__ = '0.4.7' +__cqlengine_version_path__ = os.path.realpath(__file__ + '/../VERSION') +__version__ = open(__cqlengine_version_path__, 'r').readline().strip() + diff --git a/docs/conf.py b/docs/conf.py index 2b29bbfe..847ef50d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,10 +47,13 @@ copyright = u'2012, Blake Eggleston' # |version| and |release|, also used in various other places throughout the # built documents. # +__cqlengine_version_path__ = os.path.realpath(__file__ + '/../VERSION') # The short X.Y version. -version = '0.4.7' +version = open(__cqlengine_version_path__, 'r').readline().strip() # The full version, including alpha/beta/rc tags. -release = '0.4.7' +release = version + + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index 9865237f..5fd44142 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages #python setup.py register #python setup.py sdist upload -version = '0.4.7' +version = open('cqlengine/VERSION', 'r').readline().strip() long_desc = """ Cassandra CQL 3 Object Mapper for Python