mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 04:05:20 +01:00
Do not use the cache dir for PIP installs (#24233)
This commit is contained in:
committed by
Pascal Vizeli
parent
b90636f640
commit
276ab191b5
@@ -44,12 +44,15 @@ async def async_process_requirements(hass: HomeAssistant, name: str,
|
||||
|
||||
def pip_kwargs(config_dir: Optional[str]) -> Dict[str, Any]:
|
||||
"""Return keyword arguments for PIP install."""
|
||||
is_docker = pkg_util.is_docker_env()
|
||||
kwargs = {
|
||||
'constraints': os.path.join(os.path.dirname(__file__), CONSTRAINT_FILE)
|
||||
'constraints': os.path.join(os.path.dirname(__file__),
|
||||
CONSTRAINT_FILE),
|
||||
'no_cache_dir': is_docker,
|
||||
}
|
||||
if 'WHEELS_LINKS' in os.environ:
|
||||
kwargs['find_links'] = os.environ['WHEELS_LINKS']
|
||||
if not (config_dir is None or pkg_util.is_virtual_env()) and \
|
||||
not pkg_util.is_docker_env():
|
||||
not is_docker:
|
||||
kwargs['target'] = os.path.join(config_dir, 'deps')
|
||||
return kwargs
|
||||
|
||||
Reference in New Issue
Block a user