From: Jeffery To Date: Sun, 30 Aug 2020 22:29:44 +0000 (+0800) Subject: python: Use locked for host pip X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c0340f631c6da75c9e19a6a2132777b55b58b777;p=feed%2Fpackages.git 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 --- diff --git a/lang/python/README.md b/lang/python/README.md index f5b07c01cf..5681cb5d35 100644 --- a/lang/python/README.md +++ b/lang/python/README.md @@ -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). diff --git a/lang/python/bcrypt/Makefile b/lang/python/bcrypt/Makefile index f480112152..62312343f8 100644 --- a/lang/python/bcrypt/Makefile +++ b/lang/python/bcrypt/Makefile @@ -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 diff --git a/lang/python/numpy/Makefile b/lang/python/numpy/Makefile index 7cf6f72c04..6ea6790e0c 100644 --- a/lang/python/numpy/Makefile +++ b/lang/python/numpy/Makefile @@ -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 diff --git a/lang/python/python-apipkg/Makefile b/lang/python/python-apipkg/Makefile index 37aa0c1716..ee2e05d9d2 100644 --- a/lang/python/python-apipkg/Makefile +++ b/lang/python/python-apipkg/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-cryptography/Makefile b/lang/python/python-cryptography/Makefile index 52515cff39..fed41ae3d7 100644 --- a/lang/python/python-cryptography/Makefile +++ b/lang/python/python-cryptography/Makefile @@ -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 , Alexandru Ardelean PKG_BUILD_DEPENDS:=libffi/host -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=cffi # cffi>=1.8,!=1.11.3 diff --git a/lang/python/python-execnet/Makefile b/lang/python/python-execnet/Makefile index d5f3225060..77d88ef60a 100644 --- a/lang/python/python-execnet/Makefile +++ b/lang/python/python-execnet/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-iniconfig/Makefile b/lang/python/python-iniconfig/Makefile index b95cf3da31..14891e706b 100644 --- a/lang/python/python-iniconfig/Makefile +++ b/lang/python/python-iniconfig/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-jsonschema/Makefile b/lang/python/python-jsonschema/Makefile index be38dd1247..57611f5920 100644 --- a/lang/python/python-jsonschema/Makefile +++ b/lang/python/python-jsonschema/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-pluggy/Makefile b/lang/python/python-pluggy/Makefile index 4ed250eae9..ca9fea4a74 100644 --- a/lang/python/python-pluggy/Makefile +++ b/lang/python/python-pluggy/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-psutil/Makefile b/lang/python/python-psutil/Makefile index 43e5b60d4b..ab9edc504b 100644 --- a/lang/python/python-psutil/Makefile +++ b/lang/python/python-psutil/Makefile @@ -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 PKG_LICENSE:=BSD 3-Clause PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-py/Makefile b/lang/python/python-py/Makefile index dbe70d3b0a..cba2707f2e 100644 --- a/lang/python/python-py/Makefile +++ b/lang/python/python-py/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-pycparser/Makefile b/lang/python/python-pycparser/Makefile index 99cb104ace..29d81c9cb7 100644 --- a/lang/python/python-pycparser/Makefile +++ b/lang/python/python-pycparser/Makefile @@ -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 -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=ply # ply==3.10 include ../pypi.mk diff --git a/lang/python/python-pynacl/Makefile b/lang/python/python-pynacl/Makefile index a879a99546..fe637bb253 100644 --- a/lang/python/python-pynacl/Makefile +++ b/lang/python/python-pynacl/Makefile @@ -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 diff --git a/lang/python/python-pytest-forked/Makefile b/lang/python/python-pytest-forked/Makefile index bb50042f76..60b162e8fa 100644 --- a/lang/python/python-pytest-forked/Makefile +++ b/lang/python/python-pytest-forked/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-pytest-xdist/Makefile b/lang/python/python-pytest-xdist/Makefile index eb2f38fc43..0968fb5828 100644 --- a/lang/python/python-pytest-xdist/Makefile +++ b/lang/python/python-pytest-xdist/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-pytest/Makefile b/lang/python/python-pytest/Makefile index 1841f84a79..93681713f2 100644 --- a/lang/python/python-pytest/Makefile +++ b/lang/python/python-pytest/Makefile @@ -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 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm include ../pypi.mk diff --git a/lang/python/python-zipp/Makefile b/lang/python/python-zipp/Makefile index 0044a0cf82..2031c1781f 100644 --- a/lang/python/python-zipp/Makefile +++ b/lang/python/python-zipp/Makefile @@ -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 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 diff --git a/lang/python/python3-host.mk b/lang/python/python3-host.mk index 9dd5e13c43..9366b78d9e 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 diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile index a6705b37cd..8ccc0255df 100644 --- a/net/seafile-seahub/Makefile +++ b/net/seafile-seahub/Makefile @@ -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