mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
python,python3: Disable user site-packages for host Python
Normally, Python will include the user's site-packages directory (~/.local/lib/python$(PYTHON_VERSION)/site-packages) in it's internal search path for modules. This disables this default inclusion for host Python. This change is applied during Host/Configure instead of as a patch to keep this setting unchanged for target Python. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
@@ -298,6 +298,11 @@ HOST_CONFIGURE_ARGS+= \
|
|||||||
--with-ensurepip=install \
|
--with-ensurepip=install \
|
||||||
CONFIG_SITE=
|
CONFIG_SITE=
|
||||||
|
|
||||||
|
define Host/Configure
|
||||||
|
$(SED) 's/^ENABLE_USER_SITE = None$$$$/ENABLE_USER_SITE = False/' $(HOST_BUILD_DIR)/Lib/site.py
|
||||||
|
$(call Host/Configure/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
define Host/Compile
|
define Host/Compile
|
||||||
$(call Host/Compile/Default,python Parser/pgen sharedmods)
|
$(call Host/Compile/Default,python Parser/pgen sharedmods)
|
||||||
endef
|
endef
|
||||||
|
|||||||
@@ -292,6 +292,11 @@ HOST_CONFIGURE_ARGS+= \
|
|||||||
--with-ensurepip=install \
|
--with-ensurepip=install \
|
||||||
CONFIG_SITE=
|
CONFIG_SITE=
|
||||||
|
|
||||||
|
define Host/Configure
|
||||||
|
$(SED) 's/^ENABLE_USER_SITE = None$$$$/ENABLE_USER_SITE = False/' $(HOST_BUILD_DIR)/Lib/site.py
|
||||||
|
$(call Host/Configure/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
define Host/Compile
|
define Host/Compile
|
||||||
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
|
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
|
||||||
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods
|
+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods
|
||||||
|
|||||||
Reference in New Issue
Block a user