Merge pull request #13135 from jefferyto/python-host-pip-cache-world-readable
python3: Add config PYTHON3_HOST_PIP_CACHE_WORLD_READABLE
This commit is contained in:
commit
2512c8dcd0
2 changed files with 11 additions and 1 deletions
|
@ -49,15 +49,21 @@ endef
|
||||||
# Note: I shamelessly copied this from Yousong's logic (from python-packages);
|
# 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:=$(STAGING_DIR_HOSTPKG)/bin/pip$(PYTHON3_VERSION)
|
||||||
|
|
||||||
|
HOST_PYTHON3_PIP_CACHE_DIR:=$(DL_DIR)/pip-cache
|
||||||
|
|
||||||
# $(1) => packages to install
|
# $(1) => packages to install
|
||||||
define HostPython3/PipInstall
|
define HostPython3/PipInstall
|
||||||
$(HOST_PYTHON3_VARS) \
|
$(HOST_PYTHON3_VARS) \
|
||||||
$(HOST_PYTHON3_PIP) \
|
$(HOST_PYTHON3_PIP) \
|
||||||
--disable-pip-version-check \
|
--disable-pip-version-check \
|
||||||
--cache-dir "$(DL_DIR)/pip-cache" \
|
--cache-dir "$(HOST_PYTHON3_PIP_CACHE_DIR)" \
|
||||||
install \
|
install \
|
||||||
--no-binary :all: \
|
--no-binary :all: \
|
||||||
$(1)
|
$(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
|
endef
|
||||||
|
|
||||||
# $(1) => build subdir
|
# $(1) => build subdir
|
||||||
|
|
|
@ -4,4 +4,8 @@ config PYTHON3_BLUETOOTH_SUPPORT
|
||||||
bool "Enable Bluetooth support"
|
bool "Enable Bluetooth support"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config PYTHON3_HOST_PIP_CACHE_WORLD_READABLE
|
||||||
|
bool "Ensure host pip cache is world-readable"
|
||||||
|
default n
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
Loading…
Reference in a new issue