Layer root¶
Overview¶
This is the root
layer of the MFEXT module.
This layer mainly includes core libraries and utilities like :
layerapi2
library and utilities which manage the layer system- wrappers (
python2
,python3
,python
…) - glib (gnome) library
- (and some other documented below)
The root
layer is loaded by default and does not depend on another layer. This
is the layer dependencies root.
Special focus on python wrappers¶
python2 wrapper¶
The python2
wrapper is available in ${MFEXT_HOME}/bin
. It executes
a python2 interpreter with following layers loaded :
python2_core@mfext
python2@mfext
(if installed)python2@mfcom
(if installed)python2@{current_module}
(if installed)
So, if you want to execute a python2 script without any question about currently loaded layers, this is the way to go.
For example:
#!/usr/bin/env python2
print "this code will be always executed in python2 environnement"
print "(thanks to the above python2 shebang)"
or
python2 /path/to/a/python2/script.py
python3 wrapper¶
The python3
wrapper is available in ${MFEXT_HOME}/bin
. It executes
a python3 interpreter with following layers loaded :
python3_core@mfext
python3@mfext
(if installed)python3@mfcom
(if installed)python3@{current_module}
(if installed)
So, if you want to execute a python3 script without any question about currently loaded layers, this is the way to go.
For example:
#!/usr/bin/env python3
print("this code will be always executed in python3 environnement")
print("(thanks to the above python3 shebang)")
or
python3 /path/to/a/python3/script.py
python wrapper¶
The python
wrapper is available in ${MFEXT_HOME}/bin
. It works exactly
as the two above wrappers. But the major python version is selected with
the METWORK_PYTHON_MODE
environnement variable.
Utilities¶
mfext_wrapper¶
usage: /opt/metwork-mfext-0.5/bin/mfext_wrapper COMMAND_TO_WRAP [COMMAND_ARG1] [COMMAND_ARG2] [...]
=> launch the given command within metwork/mfext environnent
=> note: the current environnent is cleared before
=> (only MODULE_RUNTIME_SUFFIX and MODULE_RUNTIME_HOME env var are keeped intact
clear.sh¶
clear wrapper (clear command does not work well for some terminal, force a xterm clear in this case)
usage: clear.sh
metwork_debug¶
usage: metwork_debug
print debug informations on stdout
bootstrap_layer.sh¶
usage: bootstrap_layer.sh LAYER_LABEL LAYER_HOME
=> bootstrap a new layer in the given LAYER_HOME (directory path)
with the given LAYER_LABEL
=> the directory is automatically created (if it does not exist)
and the .layerapi2_label file is created (if it does not exist)
=> a bin/, lib/ and lib/pkgconfig/ subdirectories are also created
=> if ${METWORK_PYTHON_MODE} environnement variable == 2,
a lib/python${PYTHON2_SHORT_VERSION}/site-packages is created
=> if ${METWORK_PYTHON_MODE} environnement variable == 3,
a lib/python${PYTHON3_SHORT_VERSION}/site-packages is created
envtpl¶
usage: envtpl [ENVTPL_ARG1] [ENVTPL_ARG2] [...]
=> envtpl wrapper, load python3 layer dynamically but also use
some other locations because we use envtpl during build
(before python3/envtpl formal installation)
flake82.sh¶
usage: flake82.sh [FLAKE8_ARG1] [FLAGE8_ARG2] [...]
=> execute flake8 command with given args in a python2 env
(even if we are currently in python3 mode)
=> some documentation errors/hints are also ignored here
flake83.sh¶
usage: flake83.sh [FLAKE8_ARG1] [FLAGE8_ARG2] [...]
=> execute flake8 command with given args in a python3 env
(even if we are currently in python2 mode)
=> some documentation errors/hints are also ignored here
is_layer_installed¶
Usage:
is_layer_installed [OPTION?] LAYER LABEL - output 1 is the given layer is installed
Help Options:
-h, --help Show help options
is_layer_loaded¶
Usage:
is_layer_loaded [OPTION?] LAYER LABEL OR LAYER HOME - output 1 is the given layer is already loaded
Help Options:
-h, --help Show help options
layers¶
Usage:
layers [OPTION?] - list installed layers
Help Options:
-h, --help Show help options
Application Options:
-r, --raw raw output
-m, --loaded-filter Loaded layer filter (default: no filter, possible values: yes, no)
layer_wrapper¶
Usage:
layer_wrapper [OPTION?] -- COMMAND [COMMAND_ARG1] [COMMAND_ARG2] [...] - wrapper to execute the given command in a process with some specific layers loaded
Help Options:
-h, --help Show help options
Application Options:
-d, --debug debug mode
-e, --empty unload all layers before
-c, --cwd change working directory to the last layer home
-x, --extra-env-prefix if set, add three environnement variables {PREFIX}_NAME, {PREFIX}_LABEL and {PREFIX}_DIR containing the last layer name, label and the last layer home
-E, --empty-env empty environnement (imply --empty)
-k, --empty-env-keeps coma separated list of env var to keep with --empty-env
-l, --layers coma separated list of layers labels/homes ('-' before the name of the layer means 'optional dependency')
-p, --prepend-env ENV_VAR,VALUE string to prepend VALUE in : separated ENV_VAR (like PATH) (can be used multiple times)
-f, --force-prepend do not check existing paths in prepend
mfext_wrapper¶
usage: /opt/metwork-mfext-0.5/bin/mfext_wrapper COMMAND_TO_WRAP [COMMAND_ARG1] [COMMAND_ARG2] [...]
=> launch the given command within metwork/mfext environnent
=> note: the current environnent is cleared before
=> (only MODULE_RUNTIME_SUFFIX and MODULE_RUNTIME_HOME env var are keeped intact
nosetests2.sh¶
usage: nosetests2.sh [NOSETESTS_ARG1] [NOSETESTS_ARG2] [...]
=> execute nosetests command with given args in a python2 env
(even if we are currently in python3 mode)
nosetests3.sh¶
usage: nosetests3.sh [NOSETESTS_ARG1] [NOSETESTS_ARG2] [...]
=> execute nosetests command with given args in a python3 env
(even if we are currently in python2 mode)
pylint2.sh¶
usage: pylint2.sh [PYLINT_ARG1] [PYLIN2_ARG2] [...]
=> execute pylint command with given args in a python2 env
(even if we are currently in python3 mode)
pylint3.sh¶
usage: pylint3.sh [PYLINT_ARG1] [PYLINT_ARG2] [...]
=> execute pylint command with given args in a python3 env
(even if we are currently in python2 mode)
python¶
usage: /opt/metwork-mfext-0.5/bin/python [ARG1] [ARG2] [...]
=> wrapper to execute the command 'python [ARG1] [ARG2] [...]' in a context with layers 'python@mfext,-python@mfcom,-python@{MODULE_LOWERCASE}' loaded
python2¶
usage: /opt/metwork-mfext-0.5/bin/python2 [ARG1] [ARG2] [...]
=> wrapper to execute the command 'python [ARG1] [ARG2] [...]' in a context with layers 'python2_core@mfext,-python2@mfext,-python2@mfcom,-python2@{MODULE_LOWERCASE}' loaded
python3¶
usage: /opt/metwork-mfext-0.5/bin/python3 [ARG1] [ARG2] [...]
=> wrapper to execute the command 'python [ARG1] [ARG2] [...]' in a context with layers 'python3_core@mfext,-python3@mfext,-python3@mfcom,-python3@{MODULE_LOWERCASE}' loaded
sphinx_wrapper¶
usage: /opt/metwork-mfext-0.5/bin/sphinx_wrapper [ARG1] [ARG2] [...]
=> wrapper to execute the command 'sphinx-build [ARG1] [ARG2] [...]' in a context with layers 'python3_devtools@mfext' loaded
Packages¶
Name | Version | Description | Home-Page |
---|---|---|---|
glib | 2.56.4 | GLib provides the core application building blocks for libraries and applications written in C. | https://developer.gnome.org/glib/ |
(1 package)