mirror of
https://github.com/openwrt/packages.git
synced 2025-12-23 02:51:22 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user