diff options
Diffstat (limited to 'lang/python/python3-host.mk')
| -rw-r--r-- | lang/python/python3-host.mk | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/lang/python/python3-host.mk b/lang/python/python3-host.mk index 9dd5e13c4..9366b78d9 100644 --- a/lang/python/python3-host.mk +++ b/lang/python/python3-host.mk @@ -51,20 +51,24 @@ HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION) HOST_PYTHON3_PIP_CACHE_DIR:=$(DL_DIR)/pip-cache +# Multiple concurrent pip processes can lead to errors or unexpected results: https://github.com/pypa/pip/issues/2361 # $(1) => packages to install define HostPython3/PipInstall - $(HOST_PYTHON3_VARS) \ - $(HOST_PYTHON3_PIP) \ - --cache-dir "$(HOST_PYTHON3_PIP_CACHE_DIR)" \ - --disable-pip-version-check \ - install \ - --no-binary :all: \ - --require-hashes \ - $(1) - ifdef CONFIG_PYTHON3_HOST_PIP_CACHE_WORLD_READABLE - $(FIND) $(HOST_PYTHON3_PIP_CACHE_DIR) -not -type d -exec chmod go+r '{}' \; - $(FIND) $(HOST_PYTHON3_PIP_CACHE_DIR) -type d -exec chmod go+rx '{}' \; - endif + $(call locked, \ + $(HOST_PYTHON3_VARS) \ + $(HOST_PYTHON3_PIP) \ + --cache-dir "$(HOST_PYTHON3_PIP_CACHE_DIR)" \ + --disable-pip-version-check \ + install \ + --no-binary :all: \ + --require-hashes \ + $(1) \ + $(if $(CONFIG_PYTHON3_HOST_PIP_CACHE_WORLD_READABLE), \ + && $(FIND) $(HOST_PYTHON3_PIP_CACHE_DIR) -not -type d -exec chmod go+r '{}' \; \ + && $(FIND) $(HOST_PYTHON3_PIP_CACHE_DIR) -type d -exec chmod go+rx '{}' \; \ + ), \ + pip \ + ) endef # $(1) => build subdir |
