def get_distribution_path(venv, distribution):
 _verify_safe_py_code(distribution)
 bin_path = _verify_virtualenv(venv)
 ret = __salt__['cmd.exec_code_all'](bin_path, "import pkg_resources; print(pkg_resources.get_distribution('{0}').location)".format(distribution))
 if (ret['retcode'] != 0):
  raise CommandExecutionError('{stdout}\n{stderr}'.format(**ret))
 return ret['stdout']

def get_distribution_path ( venv , distribution ) : _verify_safe_py_code ( distribution ) bin_path = _verify_virtualenv ( venv ) ret = __salt__ [ 'cmd.exec_code_all' ] ( bin_path , "import pkg_resources; print(pkg_resources.get_distribution('{0}').location)" . format ( distribution ) ) if ( ret [ 'retcode' ] != 0 ) : raise CommandExecutionError ( '{stdout}\n{stderr}' . format ( ** ret ) ) return ret [ 'stdout' ]
return the path to a distribution installed inside a virtualenv .