__version_info__ = ('0', '2', '0') # major, minor, patchlevel
__version__ = '.'.join(__version_info__) + 'b2'

# Set the default logging level for global module. It is unfortunate that
# logging module has ERROR/WARN only has the default levels. All loggers
# (pypm.**) will inherit this level unless explicitly overrided elsewhere.
import logging
logging.getLogger('pypm').setLevel(logging.DEBUG) # DEBUG and above levels


# We depend on distribute; if setuptools is loaded somewhere in sys.path,
# we are screwed (for we rely on several features/bug-fixes in distribute)
import setuptools
if not getattr(setuptools, '_distribute', False):
    raise SystemExit, '''error: \
PyPM requires Distribute; but you have setuptools installed at "{0}". To use \
PyPM (ActivePython already comes with Distribute), you must remove the \
existing setuptools installation. See {1} for more details.\
'''.format(
    setuptools.__file__,
    'http://docs.activestate.com/activepython/2.6/faq.html#what-if-i-have-setuptools-installed')
