Return path to the Python binary for the provided pack. :param pack: Pack name. :type pack: ``str``
(pack=None)
| 79 | |
| 80 | |
| 81 | def 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 | |
| 99 | def get_sandbox_path(virtualenv_path): |
no outgoing calls