mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Fix pip 1.5.4 compatibility
This commit is contained in:
parent
33e983a5c3
commit
2b23eec0f7
@ -22,8 +22,7 @@ def validate_python():
|
||||
def install_package(package):
|
||||
"""Install a package on PyPi. Accepts pip compatible package strings.
|
||||
Return boolean if install successfull."""
|
||||
args = ['python3', '-m', 'pip', 'install', '--disable-pip-version-check',
|
||||
'--quiet', package]
|
||||
args = ['python3', '-m', 'pip', 'install', '--quiet', package]
|
||||
if sys.base_prefix == sys.prefix:
|
||||
args.append('--user')
|
||||
return not subprocess.call(args)
|
||||
@ -31,6 +30,7 @@ def install_package(package):
|
||||
|
||||
def validate_dependencies():
|
||||
""" Validate all dependencies that HA uses. """
|
||||
print("Validating dependencies...")
|
||||
import_fail = False
|
||||
|
||||
for requirement in DEPENDENCIES:
|
||||
|
@ -11,8 +11,7 @@ def install_package(package, upgrade=False, user=INSTALL_USER):
|
||||
"""Install a package on PyPi. Accepts pip compatible package strings.
|
||||
Return boolean if install successfull."""
|
||||
# Not using 'import pip; pip.main([])' because it breaks the logger
|
||||
args = ['python3', '-m', 'pip', 'install', '--disable-pip-version-check',
|
||||
'--quiet', package]
|
||||
args = ['python3', '-m', 'pip', 'install', '--quiet', package]
|
||||
if upgrade:
|
||||
args.append('--upgrade')
|
||||
if user:
|
||||
|
Loading…
x
Reference in New Issue
Block a user