mMecoSettings - Package Global Env
Meco™ provides a Python module mMecoSettings.packageGlobalEnvLib
where you can change/add global package environment
settings. You can change the behaviour of package initialization paths globally by adding new classes or changing
the existing classes in this module.
Example
The following example has been directly taken from mMecoSettings.packageGlobalEnvLib
module that you can find
in mMecoSettings/python/mMecoSettings/packageGlobalEnvLib.py
path.
from platform import system
#
# PACKAGE
#
## @brief [ ENUM CLASS ] - Package folder structure for Linux.
class PackageLinux(object):
## [ str ] - Bin (executables) path.
PATH = ['bin/{}'.format(system().lower()),
'python/bin']
## [ str ] - Library path.
LD_LIBRARY_PATH = ['lib/{}'.format(system().lower())]
## [ str ] - Python path.
PYTHONPATH = ['python']
#
## @brief [ ENUM CLASS ] - Package folder structure for Darwin.
class PackageDarwin(PackageLinux):
## [ str ] - Library path.
LD_LIBRARY_PATH = None
## [ str ] - Library path.
DYLD_FALLBACK_LIBRARY_PATH = ['lib/{}'.format(system().lower())]
#
## @brief [ ENUM CLASS ] - Package folder structure for Windows.
class PackageWindows(object):
## [ str ] - Bin (executables) path.
PATH = ['bin\\{}'.format(system().lower()),
'python\\bin']
## [ str ] - Library path.
LIBRARY_PATH = ['lib\\{}'.format(system().lower())]
## [ str ] - Python path.
PYTHONPATH = ['python']
#
# MAYA
#
## @brief [ ENUM CLASS ] - Maya folder structure in a package for Linux.
class MayaLinux(object):
## [ str ] - Python path.
PYTHONPATH = ['FOLDER_NAME/VERSION/python']
## [ str ] - Maya script.
MAYA_SCRIPT_PATH = ['FOLDER_NAME/VERSION/mel']
## [ str ] - Maya shelves.
MAYA_SHELF_PATH = ['FOLDER_NAME/VERSION/shelves']
## [ str ] - Maya plugin.
MAYA_PLUG_IN_PATH = ['FOLDER_NAME/VERSION/plugin/{}'.format(system().lower())]
## [ str ] - Maya XMB.
XBMLANGPATH = ['FOLDER_NAME/VERSION/xbm']
#
## @brief [ ENUM CLASS ] - Maya folder structure in a package for Darwin.
class MayaDarwin(MayaLinux):
pass
#
## @brief [ ENUM CLASS ] - Maya folder structure in a package for Windows.
class MayaWindows(object):
## [ str ] - Python path.
PYTHONPATH = ['FOLDER_NAME\\VERSION\\python']
## [ str ] - Maya script.
MAYA_SCRIPT_PATH = ['FOLDER_NAME\\VERSION\\mel']
## [ str ] - Maya shelves.
MAYA_SHELF_PATH = ['FOLDER_NAME\\VERSION\\shelves']
## [ str ] - Maya plugin.
MAYA_PLUG_IN_PATH = ['FOLDER_NAME\\VERSION\\plugin\\{}'.format(system().lower())]
## [ str ] - Maya XMB.
XBMLANGPATH = ['FOLDER_NAME\\VERSION\\xbm']