summaryrefslogtreecommitdiff
path: root/lang/python/python3-host.mk
diff options
context:
space:
mode:
authorJosef Schlehofer <pepe.schlehofer@gmail.com>2020-08-17 12:46:38 +0200
committerGitHub <noreply@github.com>2020-08-17 12:46:38 +0200
commit2512c8dcd0e5bb89029f41739e4aa2198c5526a9 (patch)
tree53cbadff5b48ebe45766beb2a7f8d514ab8123c3 /lang/python/python3-host.mk
parent3a62950214484bd774d1104e2ea0341f173f72c2 (diff)
parent001cd3c571335c7bef6460895da3757a91234875 (diff)
Merge pull request #13135 from jefferyto/python-host-pip-cache-world-readable
python3: Add config PYTHON3_HOST_PIP_CACHE_WORLD_READABLE
Diffstat (limited to 'lang/python/python3-host.mk')
-rw-r--r--lang/python/python3-host.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/lang/python/python3-host.mk b/lang/python/python3-host.mk
index 80a1bb110..f5016ed57 100644
--- a/lang/python/python3-host.mk
+++ b/lang/python/python3-host.mk
@@ -49,15 +49,21 @@ endef
# Note: I shamelessly copied this from Yousong's logic (from python-packages);
HOST_PYTHON3_PIP:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION)
+HOST_PYTHON3_PIP_CACHE_DIR:=$(DL_DIR)/pip-cache
+
# $(1) => packages to install
define HostPython3/PipInstall
$(HOST_PYTHON3_VARS) \
$(HOST_PYTHON3_PIP) \
--disable-pip-version-check \
- --cache-dir "$(DL_DIR)/pip-cache" \
+ --cache-dir "$(HOST_PYTHON3_PIP_CACHE_DIR)" \
install \
--no-binary :all: \
$(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
endef
# $(1) => build subdir