mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Allow --install-only
to gather the required information
This commit is contained in:
parent
eed7d68ab8
commit
ba8d0feb5c
1 changed files with 5 additions and 3 deletions
|
@ -59,7 +59,8 @@ def _get_session_python_version_info(session):
|
|||
'python', '-c'
|
||||
'import sys; sys.stdout.write("{}.{}.{}".format(*sys.version_info))',
|
||||
silent=True,
|
||||
log=False
|
||||
log=False,
|
||||
bypass_install_only=True
|
||||
)
|
||||
version_info = tuple(int(part) for part in session_py_version.split('.') if part.isdigit())
|
||||
session._runner._real_python_version_info = version_info
|
||||
|
@ -74,7 +75,8 @@ def _get_session_python_site_packages_dir(session):
|
|||
'python', '-c'
|
||||
'import sys; from distutils.sysconfig import get_python_lib; sys.stdout.write(get_python_lib())',
|
||||
silent=True,
|
||||
log=False
|
||||
log=False,
|
||||
bypass_install_only=True
|
||||
)
|
||||
session._runner._site_packages_dir = site_packages_dir
|
||||
return site_packages_dir
|
||||
|
@ -93,7 +95,7 @@ def _get_distro_info(session):
|
|||
except AttributeError:
|
||||
# The distro package doesn't output anything for Windows
|
||||
session.install('--progress-bar=off', 'distro', silent=PIP_INSTALL_SILENT)
|
||||
output = session.run('distro', '-j', silent=True)
|
||||
output = session.run('distro', '-j', silent=True, bypass_install_only=True)
|
||||
distro = json.loads(output.strip())
|
||||
session.log('Distro information:\n%s', pprint.pformat(distro))
|
||||
session._runner._distro = distro
|
||||
|
|
Loading…
Add table
Reference in a new issue