Merge pull request #9100 from jefferyto/isolate-host-python
authorRosen Penev <rosenp@gmail.com>
Mon, 3 Jun 2019 09:11:20 +0000 (02:11 -0700)
committerGitHub <noreply@github.com>
Mon, 3 Jun 2019 09:11:20 +0000 (02:11 -0700)
python,python3: Better isolate host Python

1  2 
lang/python/python-package.mk
lang/python/python/Makefile
lang/python/python3-package.mk
lang/python/python3/Makefile

Simple merge
index fcfca44af4dfa01fe75dea230e59c8546e2cca53,c59e6a940c6ec184728fdad785934b5f0e7f1c45..9782dabd6d97fc4c807b598c0facc2c0e9bc19ae
@@@ -303,9 -295,14 +303,14 @@@ HOST_CONFIGURE_ARGS+= 
        --prefix=$(HOST_PYTHON_DIR) \
        --exec-prefix=$(HOST_PYTHON_DIR) \
        --with-system-expat=$(STAGING_DIR_HOSTPKG) \
 -      --with-ensurepip=install \
 +      --with-ensurepip=upgrade \
        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
        $(call Host/Compile/Default,python Parser/pgen sharedmods)
  endef
Simple merge
index 9ada7c2cfc31cf293b7501aed746d3a5f86c457f,d2aea17f64a576b81736c1937288737432daf39f..02300bae0a6f076642a1c9d261a36695be590434
@@@ -297,9 -289,14 +297,14 @@@ HOST_CONFIGURE_ARGS+= 
        --prefix=$(HOST_PYTHON3_DIR) \
        --exec-prefix=$(HOST_PYTHON3_DIR) \
        --with-system-expat=$(STAGING_DIR_HOSTPKG) \
 -      --with-ensurepip=install \
 +      --with-ensurepip=upgrade \
        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
        +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) python Parser/pgen
        +$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) sharedmods