From be6a934d9d5cda1cd5a7e94ceea6304795cd6a52 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 30 Jun 2020 04:41:15 +0800 Subject: [PATCH] python-packages: Disable parallel build when host pip is needed This adds PKG_BUILD_PARALLEL:=0 to packages that depend on host Python packages (HOST_PYTHON3_PACKAGE_BUILD_DEPENDS), because installing packages with multiple concurrent pip processes can lead to errors or unexpected results[1]. This also: * Move HOST_PYTHON3_PACKAGE_BUILD_DEPENDS definitions to before python3-package.mk is included * Update Python folder readme to include PKG_BUILD_PARALLEL:=0 [1]: https://github.com/pypa/pip/issues/2361 Signed-off-by: Jeffery To --- lang/python/README.md | 3 +++ lang/python/bcrypt/Makefile | 3 ++- lang/python/numpy/Makefile | 5 +++-- lang/python/python-cryptography/Makefile | 3 ++- lang/python/python-jsonschema/Makefile | 5 +++-- lang/python/python-pluggy/Makefile | 7 ++++--- lang/python/python-py/Makefile | 7 ++++--- lang/python/python-pycparser/Makefile | 3 ++- lang/python/python-pynacl/Makefile | 3 ++- lang/python/python-pytest/Makefile | 3 ++- lang/python/python-zipp/Makefile | 7 ++++--- net/seafile-seahub/Makefile | 4 ++-- 12 files changed, 33 insertions(+), 20 deletions(-) diff --git a/lang/python/README.md b/lang/python/README.md index 4bceb978d7334d..ac3bf51c76bd70 100644 --- a/lang/python/README.md +++ b/lang/python/README.md @@ -332,8 +332,11 @@ These can be installed via pip and ideally they should only be installed like th Which is why [for example] if you need python cffi on the host build, it's easier to just add it via: ``` +PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi==$(PKG_VERSION)" ``` [cffi is one of those packages that needs a host-side package installed]. This works reasonably well in the current OpenWrt build system, as binaries get built for this package and get installed in the staging-dir `$(STAGING_DIR)/usr/lib/pythonX.Y/site-packages`. + +`PKG_BUILD_PARALLEL:=0` is necessary 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 0f56c4d5197e22..3a8bdf7d920592 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:=2 +PKG_RELEASE:=3 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42 @@ -16,6 +16,7 @@ PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=libffi/host +PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.1" include ../pypi.mk diff --git a/lang/python/numpy/Makefile b/lang/python/numpy/Makefile index 9bbf1fb5b11e25..42335ae0747789 100644 --- a/lang/python/numpy/Makefile +++ b/lang/python/numpy/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=numpy PKG_VERSION:=1.18.5 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=$(PKG_NAME) PKG_HASH:=34e96e9dae65c4839bd80012023aadd6ee2ccb73ce7fdf3074c62f301e63120b @@ -20,7 +20,8 @@ PKG_CPE_ID:=cpe:/a:numpy:numpy # yes, zip... sigh PYPI_SOURCE_EXT:=zip -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS="Cython==0.29.19" +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="Cython==0.29.19" include ../pypi.mk include $(INCLUDE_DIR)/package.mk diff --git a/lang/python/python-cryptography/Makefile b/lang/python/python-cryptography/Makefile index a02784303073c9..e5a9a1e03e9e1d 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:=2.9.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=cryptography PKG_HASH:=a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229 @@ -19,6 +19,7 @@ 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>=1.8,!=1.11.3" diff --git a/lang/python/python-jsonschema/Makefile b/lang/python/python-jsonschema/Makefile index 0e3c7b6b680379..efcb76fc6a3458 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:=3 +PKG_RELEASE:=4 PYPI_NAME:=jsonschema PKG_HASH:=c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a @@ -11,7 +11,8 @@ PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS=setuptools_scm +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools_scm include ../pypi.mk include $(INCLUDE_DIR)/package.mk diff --git a/lang/python/python-pluggy/Makefile b/lang/python/python-pluggy/Makefile index 8d79e0e22fc8fe..4ed250eae95475 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:=2 +PKG_RELEASE:=3 PYPI_NAME:=pluggy PKG_HASH:=15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0 @@ -18,12 +18,13 @@ 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 include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm - define Package/python3-pluggy SUBMENU:=Python SECTION:=lang diff --git a/lang/python/python-py/Makefile b/lang/python/python-py/Makefile index 1ed1a09e0c8440..8d7925453a2c1c 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.8.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PYPI_NAME:=py PKG_HASH:=5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa @@ -18,12 +18,13 @@ 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 include $(INCLUDE_DIR)/package.mk include ../python3-package.mk -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=setuptools-scm - define Package/python3-py SUBMENU:=Python SECTION:=lang diff --git a/lang/python/python-pycparser/Makefile b/lang/python/python-pycparser/Makefile index b8f63fc37f98c8..ce19a5ba7aa073 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:=2 +PKG_RELEASE:=3 PYPI_NAME:=pycparser PKG_HASH:=2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0 @@ -18,6 +18,7 @@ PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Jeffery To +PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="ply==3.10" include ../pypi.mk diff --git a/lang/python/python-pynacl/Makefile b/lang/python/python-pynacl/Makefile index fe2c4555dbceaa..69ed754dd4d126 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:=2 +PKG_RELEASE:=3 PYPI_NAME:=PyNaCl PKG_HASH:=54e9a2c849c742006516ad56a88f5c74bf2ce92c9f67435187c3c5953b346505 @@ -12,6 +12,7 @@ PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=libffi/host +PKG_BUILD_PARALLEL:=0 HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="cffi>=1.4.1" diff --git a/lang/python/python-pytest/Makefile b/lang/python/python-pytest/Makefile index df1aa0ade5ead0..8b1dadcb17fa91 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:=5.4.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PYPI_NAME:=pytest PKG_HASH:=eb2b5e935f6a019317e455b6da83dd8650ac9ffd2ee73a7b657a30873d67a698 @@ -18,6 +18,7 @@ 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 19d9e12c1c5efe..fede7f14fb7be6 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:=2 +PKG_RELEASE:=3 PYPI_NAME:=zipp PKG_HASH:=c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96 @@ -11,6 +11,9 @@ PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_PARALLEL:=0 +HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="setuptools_scm[toml] >= 3.4.1" + include ../pypi.mk include $(INCLUDE_DIR)/package.mk include ../python3-package.mk @@ -24,8 +27,6 @@ define Package/python3-zipp DEPENDS:=+python3-light endef -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:="setuptools_scm[toml] >= 3.4.1" - define Package/python3-zipp/description Backport of pathlib-compatible object wrapper for zip files endef diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile index ab1888bf3759b9..28396aaa6014b9 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:=1 +PKG_RELEASE:=2 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:=1 +PKG_BUILD_PARALLEL:=0 PYTHON3_PKG_BUILD:=0 include $(INCLUDE_DIR)/package.mk