summaryrefslogtreecommitdiff
path: root/lang/python/python3/Makefile
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2019-06-03 17:02:44 +0300
committerGitHub <noreply@github.com>2019-06-03 17:02:44 +0300
commit1e39f3189b945334f001a8cbe8dbebaf66da78ec (patch)
treeb180550ead36bf841316e8f7b4933aa02426062b /lang/python/python3/Makefile
parent15a06064034478ab65f0c19dad3e043578226a45 (diff)
parent1f1eacc48419f3beed244091ae827e3f7ce8b6d7 (diff)
Merge pull request #9114 from jefferyto/python-host-setuptools-pip-installed-pkg-release
python,python3: Record PKG_RELEASE for host setuptools/pip
Diffstat (limited to 'lang/python/python3/Makefile')
-rw-r--r--lang/python/python3/Makefile26
1 files changed, 20 insertions, 6 deletions
diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile
index 02300bae0..2ade6df9c 100644
--- a/lang/python/python3/Makefile
+++ b/lang/python/python3/Makefile
@@ -311,18 +311,32 @@ define Host/Compile
endef
define Host/Install
+ $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
+ rm -rf \
+ $(HOST_PYTHON3_PKG_DIR)/easy_install.py \
+ $(HOST_PYTHON3_PKG_DIR)/pkg_resources \
+ $(HOST_PYTHON3_PKG_DIR)/setuptools \
+ $(HOST_PYTHON3_PKG_DIR)/setuptools-* \
+ $(HOST_PYTHON3_PKG_DIR)/.setuptools-patched* \
+ $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_*
+ )
+ $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)),,
+ rm -rf \
+ $(HOST_PYTHON3_PKG_DIR)/pip \
+ $(HOST_PYTHON3_PKG_DIR)/pip-* \
+ $(HOST_PYTHON3_PKG_DIR)/.pip-patched* \
+ $(HOST_PYTHON3_PKG_DIR)/.pip_installed_*
+ )
$(MAKE) -C $(HOST_BUILD_DIR) install
$(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON3_DIR)/bin/pgen3
- $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools-patched-$(PYTHON3_SETUPTOOLS_VERSION)),,
+ $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)),,
$(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-setuptools,)
- rm -f $(HOST_PYTHON3_PKG_DIR)/.setuptools-patched-*
- touch $(HOST_PYTHON3_PKG_DIR)/.setuptools-patched-$(PYTHON3_SETUPTOOLS_VERSION)
+ touch $(HOST_PYTHON3_PKG_DIR)/.setuptools_installed_$(PYTHON3_SETUPTOOLS_VERSION)-$(PYTHON3_SETUPTOOLS_PKG_RELEASE)
)
- $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip-patched-$(PYTHON3_PIP_VERSION)),,
+ $(if $(wildcard $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)),,
$(call HostPatchDir,$(HOST_PYTHON3_PKG_DIR),./patches-pip,)
- rm -f $(HOST_PYTHON3_PKG_DIR)/.pip-patched-*
- touch $(HOST_PYTHON3_PKG_DIR)/.pip-patched-$(PYTHON3_PIP_VERSION)
+ touch $(HOST_PYTHON3_PKG_DIR)/.pip_installed_$(PYTHON3_PIP_VERSION)-$(PYTHON3_PIP_PKG_RELEASE)
)
endef