diff --git a/ale/__init__.py b/ale/__init__.py index 5ca10dc2d9c7d0aea041ca4091c2423891599d6f..2c88f6c020ec3a78618819fbe38134c26052cef0 100644 --- a/ale/__init__.py +++ b/ale/__init__.py @@ -1,3 +1,21 @@ from . import drivers from . import formatters from .drivers import load, loads + +import os + +from pkg_resources import get_distribution, DistributionNotFound + +try: + _dist = get_distribution('ale') + # Normalize case for Windows systems + dist_loc = os.path.normcase(_dist.location) + here = os.path.normcase(__file__) + if not here.startswith(os.path.join(dist_loc, 'ale')): + # not installed, but there is another version that *is* + raise DistributionNotFound +except DistributionNotFound: + __version__ = 'Please install this project with setup.py' +else: + __version__ = _dist.version + diff --git a/ale/config.py b/ale/config.py index ae3fe14d4acb4e7abd7aefd14876cbea595a5b4b..0dd30a03ed96028aaa8b33f7849a9fc5ce50bb0b 100644 --- a/ale/config.py +++ b/ale/config.py @@ -9,5 +9,4 @@ mdis = '/data/spice/mess-e_v_h-spice-6-v1.0/messsp_1000/extras/mk' # Messenger mro = '/data/spice/mro-m-spice-6-v1.0/mrosp_1000/extras/mk' # Mars Reconnaissance Orbiter kaguya = '/data/spice/SELENE/kernels/mk/' dawn = '/data/spice/dawn-m_a-spice-6-v1.0/dawnsp_1000/extras/mk' -lro = '/usgs/cpkgs/isis3/data/lro/kernels/mk/' # LRO - +lro = '/usgs/cpkgs/isis3/data/lro/kernels/mk/' # LRO diff --git a/setup.py b/setup.py index 9183dc023422b665cf8ec356feb622812c76eb95..b5ecc602437e7fcdbb980d39387b32bed8afc1d5 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import setup, find_packages NAME = "Ale" -VERSION = "0.0.3" +VERSION = "0.2.0" # To install the library, run the following #