aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2020-08-31 06:29:44 +0800
committerRosen Penev <rosenp@gmail.com>2020-08-31 03:48:47 -0700
commitc0340f631c6da75c9e19a6a2132777b55b58b777 (patch)
treef4254f1457666638a7d690ee3f918d99e74e47c0 /lang
parentecfe85ab28aca4d7e891770166e1c8c11ed385a2 (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')
-rw-r--r--lang/python/README.md3
-rw-r--r--lang/python/bcrypt/Makefile3
-rw-r--r--lang/python/numpy/Makefile3
-rw-r--r--lang/python/python-apipkg/Makefile3
-rw-r--r--lang/python/python-cryptography/Makefile3
-rw-r--r--lang/python/python-execnet/Makefile3
-rw-r--r--lang/python/python-iniconfig/Makefile3
-rw-r--r--lang/python/python-jsonschema/Makefile3
-rw-r--r--lang/python/python-pluggy/Makefile3
-rw-r--r--lang/python/python-psutil/Makefile3
-rw-r--r--lang/python/python-py/Makefile3
-rw-r--r--lang/python/python-pycparser/Makefile3
-rw-r--r--lang/python/python-pynacl/Makefile3
-rw-r--r--lang/python/python-pytest-forked/Makefile3
-rw-r--r--lang/python/python-pytest-xdist/Makefile3
-rw-r--r--lang/python/python-pytest/Makefile3
-rw-r--r--lang/python/python-zipp/Makefile3
-rw-r--r--lang/python/python3-host.mk28
18 files changed, 32 insertions, 47 deletions
diff --git a/lang/python/README.md b/lang/python/README.md
index f5b07c01c..5681cb5d3 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 f48011215..62312343f 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 7cf6f72c0..6ea6790e0 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 37aa0c171..ee2e05d9d 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 <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
diff --git a/lang/python/python-cryptography/Makefile b/lang/python/python-cryptography/Makefile
index 52515cff3..fed41ae3d 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 <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
diff --git a/lang/python/python-execnet/Makefile b/lang/python/python-execnet/Makefile
index d5f322506..77d88ef60 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 <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
diff --git a/lang/python/python-iniconfig/Makefile b/lang/python/python-iniconfig/Makefile
index b95cf3da3..14891e706 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 <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
diff --git a/lang/python/python-jsonschema/Makefile b/lang/python/python-jsonschema/Makefile
index be38dd124..57611f592 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 <javier@marcet.info>
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 4ed250eae..ca9fea4a7 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 <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
diff --git a/lang/python/python-psutil/Makefile b/lang/python/python-psutil/Makefile
index 43e5b60d4..ab9edc504 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 <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
diff --git a/lang/python/python-py/Makefile b/lang/python/python-py/Makefile
index dbe70d3b0..cba2707f2 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 <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
diff --git a/lang/python/python-pycparser/Makefile b/lang/python/python-pycparser/Makefile
index 99cb104ac..29d81c9cb 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 <jeffery.to@gmail.com>
-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 a879a9954..fe637bb25 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 bb50042f7..60b162e8f 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 <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
diff --git a/lang/python/python-pytest-xdist/Makefile b/lang/python/python-pytest-xdist/Makefile
index eb2f38fc4..0968fb582 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 <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
diff --git a/lang/python/python-pytest/Makefile b/lang/python/python-pytest/Makefile
index 1841f84a7..93681713f 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 <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
diff --git a/lang/python/python-zipp/Makefile b/lang/python/python-zipp/Makefile
index 0044a0cf8..2031c1781 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 <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
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