python: Use locked for host pip

This also removes PKG_BUILD_PARALLEL:=0 that was added for packages that
use HOST_PYTHON3_PACKAGE_BUILD_DEPENDS.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To
2020-08-31 06:29:44 +08:00
committed by Rosen Penev
parent ecfe85ab28
commit c0340f631c
19 changed files with 34 additions and 49 deletions

View File

@@ -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