python: Use locked for host pip
authorJeffery To <jeffery.to@gmail.com>
Sun, 30 Aug 2020 22:29:44 +0000 (06:29 +0800)
committerRosen Penev <rosenp@gmail.com>
Mon, 31 Aug 2020 10:48:47 +0000 (03:48 -0700)
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>
19 files changed:
lang/python/README.md
lang/python/bcrypt/Makefile
lang/python/numpy/Makefile
lang/python/python-apipkg/Makefile
lang/python/python-cryptography/Makefile
lang/python/python-execnet/Makefile
lang/python/python-iniconfig/Makefile
lang/python/python-jsonschema/Makefile
lang/python/python-pluggy/Makefile
lang/python/python-psutil/Makefile
lang/python/python-py/Makefile
lang/python/python-pycparser/Makefile
lang/python/python-pynacl/Makefile
lang/python/python-pytest-forked/Makefile
lang/python/python-pytest-xdist/Makefile
lang/python/python-pytest/Makefile
lang/python/python-zipp/Makefile
lang/python/python3-host.mk
net/seafile-seahub/Makefile

index f5b07c01cf132053bc93a5001777bc4e365f994a..5681cb5d35d027bd6d6a34aba7ac292233435d36 100644 (file)
@@ -365,10 +365,7 @@ Set `HOST_PYTHON3_PACKAGE_BUILD_DEPENDS` to the names of one or more requirement
 For example:
 
 ```
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 ```
 
 The Python package will be installed in `$(STAGING_DIR_HOSTPKG)/lib/pythonX.Y/site-packages`.
-
-Parallel builds need to be disabled because installing packages with multiple concurrent pip processes can lead to [errors or unexpected results](https://github.com/pypa/pip/issues/2361).
index f480112152e579d8c82270795395099f86b1a2ea..62312343f84fce77ae1e74df5d981eca848d2008 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bcrypt
 PKG_VERSION:=3.1.7
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42
@@ -16,7 +16,6 @@ PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=libffi/host
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi  # cffi>=1.1
 
 include ../pypi.mk
index 7cf6f72c04c7ccc9eb87db44eeebb48b983cc3a3..6ea6790e0c3dcdf3f9752d5825b375358d0c9948 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=numpy
 # Note: make sure to periodically update the Cython version in HOST_PYTHON3_PACKAGE_BUILD_DEPENDS
 PKG_VERSION:=1.19.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=$(PKG_NAME)
 PKG_HASH:=b8456987b637232602ceb4d663cb34106f7eb780e247d51a260b84760fd8f491
@@ -21,7 +21,6 @@ PKG_CPE_ID:=cpe:/a:numpy:numpy
 
 # yes, zip... sigh
 PYPI_SOURCE_EXT:=zip
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython  # Cython>=0.29.21
 
 include ../pypi.mk
index 37aa0c17167d55b0ac0a3774c96d8cb040abb190..ee2e05d9d20e825f450b3c0c2d77703955c736ce 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-apipkg
 PKG_VERSION:=1.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=apipkg
 PKG_HASH:=37228cda29411948b422fae072f57e31d3396d2ee1c9783775980ee9c9990af6
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index 52515cff39990d296bcf0c3dc5e9bc76a8e38ac1..fed41ae3d7a89a5c4a1148e093d15dc649f8daec 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-cryptography
 PKG_VERSION:=3.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=cryptography
 PKG_HASH:=26409a473cc6278e4c90f782cd5968ebad04d3911ed1c402fc86908c17633e08
@@ -19,7 +19,6 @@ PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
 
 PKG_BUILD_DEPENDS:=libffi/host
-PKG_BUILD_PARALLEL:=0
 
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi  # cffi>=1.8,!=1.11.3
 
index d5f3225060d4fedd754bb6a5b366af072083b7e6..77d88ef60a11fcbfa47dafe23d6a31eb2e98764d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-execnet
 PKG_VERSION:=1.7.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=execnet
 PKG_HASH:=cacb9df31c9680ec5f95553976c4da484d407e85e41c83cb812aa014f0eddc50
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index b95cf3da3116fdec43f832830f9f7c5789959460..14891e706b095439d5e64713f1444be63bbf350d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-iniconfig
 PKG_VERSION:=1.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=iniconfig
 PKG_HASH:=e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index be38dd1247ac50029912ff22f76de8163a5bb668..57611f59206f20a9a5dbfc9ccb93af47d1c14482 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-jsonschema
 PKG_VERSION:=3.2.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PYPI_NAME:=jsonschema
 PKG_HASH:=c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a
@@ -11,7 +11,6 @@ PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index 4ed250eae954757c8659122fccf24fa9b245f54f..ca9fea4a741f7f6e5ffb3b195c65c819223f7bdd 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pluggy
 PKG_VERSION:=0.13.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PYPI_NAME:=pluggy
 PKG_HASH:=15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index 43e5b60d4b2bce4d880c72289c71c81dd3d21f92..ab9edc504b782103cae088e6249713fe60cada0b 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-psutil
 PKG_VERSION:=5.7.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=psutil
 PKG_HASH:=90990af1c3c67195c44c9a889184f84f5b2320dce3ee3acbd054e3ba0b4a7beb
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=BSD 3-Clause
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index dbe70d3b0ae9d5d7a816ce15a54b7e92004a2f99..cba2707f2e3f585f67a5d545c7a7fad487e3e4fa 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-py
 PKG_VERSION:=1.9.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=py
 PKG_HASH:=9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index 99cb104ace0fcff2e3f2780f2350da63e4af2214..29d81c9cb757b7b19fc746cee828b4add21dc605 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pycparser
 PKG_VERSION:=2.20
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PYPI_NAME:=pycparser
 PKG_HASH:=2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0
@@ -18,7 +18,6 @@ PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=ply  # ply==3.10
 
 include ../pypi.mk
index a879a99546a66df8926fa859933631e7a16680ec..fe637bb253ab2e2b0e2223ff12efad463ddd2976 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pynacl
 PKG_VERSION:=1.4.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PYPI_NAME:=PyNaCl
 PKG_HASH:=54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505
@@ -12,7 +12,6 @@ PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_BUILD_DEPENDS:=libffi/host
-PKG_BUILD_PARALLEL:=0
 
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi  # cffi>=1.4.1
 
index bb50042f76015de0e9f395c20591e8863575f482..60b162e8fa693b276ad84690c173714a6dfec169 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest-forked
 PKG_VERSION:=1.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pytest-forked
 PKG_HASH:=6aa9ac7e00ad1a539c41bec6d21011332de671e938c7637378ec9710204e37ca
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index eb2f38fc43f0567fbd908891b9058d08b4a51a77..0968fb58288dc7a4fb1376e0fc0ff3ca289bc2e9 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest-xdist
 PKG_VERSION:=2.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pytest-xdist
 PKG_HASH:=3217b1f40290570bf27b1f82714fc4ed44c3260ba9b2f6cde0372378fc707ad3
@@ -19,7 +19,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index 1841f84a79326d2adb10806a281a957dbecc68e4..93681713f289cae49719c7594869feb903e6bdd1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pytest
 PKG_VERSION:=6.0.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PYPI_NAME:=pytest
 PKG_HASH:=85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4
@@ -18,7 +18,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm
 
 include ../pypi.mk
index 0044a0cf824fdbf30f757708eea2376a9b6d5d66..2031c1781f547a0c42c691057745500c006ea09f 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-zipp
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PYPI_NAME:=zipp
 PKG_HASH:=c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96
@@ -11,7 +11,6 @@ PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
 
-PKG_BUILD_PARALLEL:=0
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm toml  # setuptools_scm[toml] >= 3.4.1
 
 include ../pypi.mk
index 9dd5e13c438ebdf89cfe980b72470b3af0fcbf80..9366b78d9e92a6cd84644846bb97f14418df3913 100644 (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
index a6705b37cda52d3e68cf45b16d1d5787aa692dbd..8ccc0255df477a65142811a98917242171fc3e04 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=seafile-seahub
 PKG_VERSION:=7.1.4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)-server?
@@ -23,7 +23,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server
 
 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Django-1.11
 
-PKG_BUILD_PARALLEL:=0
+PKG_BUILD_PARALLEL:=1
 PYTHON3_PKG_BUILD:=0
 
 include $(INCLUDE_DIR)/package.mk