diff --git a/Makefile b/Makefile index 88e8ff5..bb92a5f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION:=$(shell cat VERSION.txt) +VERSION:=$(shell python -c 'from cascadenik import __version__ as v; print v') TARBALL=cascadenik-$(VERSION).tar.gz all: dist/$(TARBALL) diff --git a/VERSION.txt b/VERSION.txt deleted file mode 100644 index 276cbf9..0000000 --- a/VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -2.3.0 diff --git a/cascadenik/__init__.py b/cascadenik/__init__.py index 5bcb434..b0eba24 100644 --- a/cascadenik/__init__.py +++ b/cascadenik/__init__.py @@ -5,6 +5,8 @@ http://code.google.com/p/mapnik-utils/wiki/Cascadenik """ +__version__ = '2.3.0' + from os import mkdir, chmod from os.path import isdir, realpath, expanduser, dirname, exists from urlparse import urlparse @@ -30,8 +32,7 @@ # compile function -> "compile" from .compile import compile, Directories -# define Cascadenik version -VERSION = '1.0.0' +# define Cascadenik default cache directory CACHE_DIR = '~/.cascadenik' __all__ = ['load_map', 'compile', '_compile', 'style', 'stylesheet_declarations'] diff --git a/setup.py b/setup.py index 84d9d84..a2338c7 100644 --- a/setup.py +++ b/setup.py @@ -10,8 +10,8 @@ except ImportError: from distutils.core import setup HAS_SETUPTOOLS = False - -VERSION = open('VERSION.txt', 'r').read().strip() + +from cascadenik import __version__ as VERSION options = dict(name='cascadenik', version = VERSION,