MCPcopy Create free account
hub / github.com/StackStorm/st2 / get_sandbox_python_binary_path

Function get_sandbox_python_binary_path

st2common/st2common/util/sandboxing.py:81–96  ·  view source on GitHub ↗

Return path to the Python binary for the provided pack. :param pack: Pack name. :type pack: ``str``

(pack=None)

Source from the content-addressed store, hash-verified

79
80
81def get_sandbox_python_binary_path(pack=None):
82 """
83 Return path to the Python binary for the provided pack.
84 :param pack: Pack name.
85 :type pack: ``str``
86 """
87 system_base_path = cfg.CONF.system.base_path
88 virtualenv_path = os.path.join(system_base_path, "virtualenvs", pack)
89
90 if pack in SYSTEM_PACK_NAMES:
91 # Use system python for "packs" and "core" actions
92 python_path = sys.executable
93 else:
94 python_path = os.path.join(virtualenv_path, "bin/python")
95
96 return python_path
97
98
99def get_sandbox_path(virtualenv_path):

Callers 3

runMethod · 0.90
_spawn_sensor_processMethod · 0.90

Calls

no outgoing calls

Tested by 1