mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #27379 from jfindlay/pip_vars
document and check dict type for pip env_vars
This commit is contained in:
commit
989733ea86
@ -435,14 +435,20 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
|
|||||||
process_dependency_links
|
process_dependency_links
|
||||||
Enable the processing of dependency links
|
Enable the processing of dependency links
|
||||||
|
|
||||||
use_vt
|
|
||||||
Use VT terminal emulation (see ouptut while installing)
|
|
||||||
|
|
||||||
env_vars
|
env_vars
|
||||||
Set environment variables that some builds will depend on. For example,
|
Set environment variables that some builds will depend on. For example,
|
||||||
a Python C-module may have a Makefile that needs INCLUDE_PATH set to
|
a Python C-module may have a Makefile that needs INCLUDE_PATH set to
|
||||||
pick up a header file while compiling.
|
pick up a header file while compiling. This must be in the form of a
|
||||||
|
dictionary or a mapping.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
salt '*' pip.install django_app env_vars="{'CUSTOM_PATH': '/opt/django_app'}"
|
||||||
|
|
||||||
|
use_vt
|
||||||
|
Use VT terminal emulation (see ouptut while installing)
|
||||||
|
|
||||||
CLI Example:
|
CLI Example:
|
||||||
|
|
||||||
@ -718,7 +724,10 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
|
|||||||
cmd.append('--process-dependency-links')
|
cmd.append('--process-dependency-links')
|
||||||
|
|
||||||
if env_vars:
|
if env_vars:
|
||||||
|
if isinstance(env_vars, dict):
|
||||||
os.environ.update(env_vars)
|
os.environ.update(env_vars)
|
||||||
|
else:
|
||||||
|
raise CommandExecutionError('env_vars {0} is not a dictionary'.format(env_vars))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cmd_kwargs = dict(cwd=cwd, saltenv=saltenv, use_vt=use_vt, runas=user)
|
cmd_kwargs = dict(cwd=cwd, saltenv=saltenv, use_vt=use_vt, runas=user)
|
||||||
|
@ -387,7 +387,18 @@ def installed(name,
|
|||||||
env_vars
|
env_vars
|
||||||
Add or modify environment variables. Useful for tweaking build steps,
|
Add or modify environment variables. Useful for tweaking build steps,
|
||||||
such as specifying INCLUDE or LIBRARY paths in Makefiles, build scripts or
|
such as specifying INCLUDE or LIBRARY paths in Makefiles, build scripts or
|
||||||
compiler calls.
|
compiler calls. This must be in the form of a dictionary or a mapping.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
django:
|
||||||
|
pip.installed:
|
||||||
|
- name: django_app
|
||||||
|
- env_vars:
|
||||||
|
CUSTOM_PATH: /opt/django_app
|
||||||
|
VERBOSE: True
|
||||||
|
|
||||||
use_vt
|
use_vt
|
||||||
Use VT terminal emulation (see ouptut while installing)
|
Use VT terminal emulation (see ouptut while installing)
|
||||||
|
Loading…
Reference in New Issue
Block a user