Changeset 1060

Show
Ignore:
Timestamp:
06/24/08 20:48:29 (2 months ago)
Author:
mattknox_ca
Message:

extract actual version number in fall back scenario

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/timeseries/scikits/timeseries/version.py

    r1039 r1060  
    55except DistributionNotFound: 
    66    # package hasn't actually been installed. Importing directly from source 
    7     # folder. Assign a dummy value for __version__ . 
     7    # folder. Explicitly import setup.py to extract version number 
    88    # This should only happen for developers of the package 
    9     __version__ = '0.0.0 - dev' 
     9    import imp 
     10    import os 
     11    _parent_dir = os.path.split(os.path.dirname(__file__))[0] 
     12    _setup_dir = os.path.split(_parent_dir)[0] 
     13 
     14    _setup = imp.load_source("setup", os.path.join(_setup_dir, "setup.py")) 
     15    __version__ = _setup.version