mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +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):
|
def install_package(package):
|
||||||
"""Install a package on PyPi. Accepts pip compatible package strings.
|
"""Install a package on PyPi. Accepts pip compatible package strings.
|
||||||
Return boolean if install successfull."""
|
Return boolean if install successfull."""
|
||||||
args = ['python3', '-m', 'pip', 'install', '--disable-pip-version-check',
|
args = ['python3', '-m', 'pip', 'install', '--quiet', package]
|
||||||
'--quiet', package]
|
|
||||||
if sys.base_prefix == sys.prefix:
|
if sys.base_prefix == sys.prefix:
|
||||||
args.append('--user')
|
args.append('--user')
|
||||||
return not subprocess.call(args)
|
return not subprocess.call(args)
|
||||||
@ -31,6 +30,7 @@ def install_package(package):
|
|||||||
|
|
||||||
def validate_dependencies():
|
def validate_dependencies():
|
||||||
""" Validate all dependencies that HA uses. """
|
""" Validate all dependencies that HA uses. """
|
||||||
|
print("Validating dependencies...")
|
||||||
import_fail = False
|
import_fail = False
|
||||||
|
|
||||||
for requirement in DEPENDENCIES:
|
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.
|
"""Install a package on PyPi. Accepts pip compatible package strings.
|
||||||
Return boolean if install successfull."""
|
Return boolean if install successfull."""
|
||||||
# Not using 'import pip; pip.main([])' because it breaks the logger
|
# Not using 'import pip; pip.main([])' because it breaks the logger
|
||||||
args = ['python3', '-m', 'pip', 'install', '--disable-pip-version-check',
|
args = ['python3', '-m', 'pip', 'install', '--quiet', package]
|
||||||
'--quiet', package]
|
|
||||||
if upgrade:
|
if upgrade:
|
||||||
args.append('--upgrade')
|
args.append('--upgrade')
|
||||||
if user:
|
if user:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user