diff options
| author | Jeffery To <jeffery.to@gmail.com> | 2020-08-31 06:29:44 +0800 |
|---|---|---|
| committer | Rosen Penev <rosenp@gmail.com> | 2020-08-31 03:48:47 -0700 |
| commit | c0340f631c6da75c9e19a6a2132777b55b58b777 (patch) | |
| tree | f4254f1457666638a7d690ee3f918d99e74e47c0 /lang/python/python3-host.mk | |
| parent | ecfe85ab28aca4d7e891770166e1c8c11ed385a2 (diff) | |
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>
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 |
