Changeset 1501

Show
Ignore:
Timestamp:
09/27/08 08:06:16 (2 months ago)
Author:
mattknox_ca
Message:

just leave version as None if not able to detect automatically rather than raise error (addresses bug filed by Nils)

Files:

Legend:

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

    r1060 r1501  
    1111    _parent_dir = os.path.split(os.path.dirname(__file__))[0] 
    1212    _setup_dir = os.path.split(_parent_dir)[0] 
     13    _setup_py = os.path.join(_setup_dir, "setup.py") 
    1314 
    14     _setup = imp.load_source("setup", os.path.join(_setup_dir, "setup.py")) 
    15     __version__ = _setup.version 
     15    if os.path.exists(_setup_py): 
     16        _setup = imp.load_source("setup", os.path.join(_setup_dir, "setup.py")) 
     17        __version__ = _setup.version 
     18    else: 
     19        # package not installed through setup tools, just leave version undefined 
     20        __version__ = None