diff --git a/src/pyclaw/__init__.py b/src/pyclaw/__init__.py index 6c9a62ea..ec472353 100644 --- a/src/pyclaw/__init__.py +++ b/src/pyclaw/__init__.py @@ -4,19 +4,14 @@ import os import logging, logging.config - -CLAW_dir = os.environ.get('CLAW') -if CLAW_dir == None: - raise Exception('You must set the CLAW environment to use an editable install.') -# To get pyclaw.examples -_path = os.path.dirname(os.path.join(CLAW_dir, 'clawpack')) -if os.path.isdir(_path): - __path__.append(_path) -del _path +_init = os.path.abspath(__file__) +_root = os.path.dirname(os.path.dirname(os.path.dirname(_init))) +if os.path.isdir(_root): + __path__.append(_root) # Default logging configuration file _DEFAULT_LOG_CONFIG_PATH = os.path.join(os.path.dirname(__file__),'log.config') -del os +del os, _init, _root # Setup loggers logging.config.fileConfig(_DEFAULT_LOG_CONFIG_PATH, disable_existing_loggers=False)