53 lines
1.7 KiB
Python
Executable File
53 lines
1.7 KiB
Python
Executable File
# coding:utf-8
|
|
#!/usr/bin/python
|
|
#
|
|
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
|
# its licensors.
|
|
#
|
|
# For complete copyright and license terms please see the LICENSE at the root of this
|
|
# distribution (the "License"). All use of this software is governed by the License,
|
|
# or, if provided, by the license below or the license accompanying this file. Do not
|
|
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
#
|
|
# -- This line is 75 characters -------------------------------------------
|
|
|
|
"""azpy.shared.__init__"""
|
|
|
|
import os
|
|
|
|
from azpy.env_bool import env_bool
|
|
from azpy.constants import ENVAR_DCCSI_GDEBUG
|
|
from azpy.constants import ENVAR_DCCSI_DEV_MODE
|
|
|
|
# global space
|
|
_G_DEBUG = env_bool(ENVAR_DCCSI_GDEBUG, False)
|
|
_DCCSI_DEV_MODE = env_bool(ENVAR_DCCSI_DEV_MODE, False)
|
|
|
|
_PACKAGENAME = __name__
|
|
if _PACKAGENAME is '__main__':
|
|
_PACKAGENAME = 'azpy.shared'
|
|
|
|
import azpy
|
|
_LOGGER = azpy.initialize_logger(_PACKAGENAME)
|
|
_LOGGER.debug('Invoking __init__.py for {0}.'.format({_PACKAGENAME}))
|
|
|
|
# -------------------------------------------------------------------------
|
|
|
|
__all__ = ['common', 'ui']
|
|
|
|
# -------------------------------------------------------------------------
|
|
|
|
|
|
# -------------------------------------------------------------------------
|
|
if _DCCSI_DEV_MODE:
|
|
# If in dev mode this will test imports of __all__
|
|
from azpy import test_imports
|
|
_LOGGER.debug('Testing Imports from {0}'.format(_PACKAGENAME))
|
|
test_imports(__all__,
|
|
_pkg=_PACKAGENAME,
|
|
_logger=_LOGGER)
|
|
# -------------------------------------------------------------------------
|
|
|
|
del _LOGGER
|