Browse Source

Merge pull request #9114 from jefferyto/python-host-setuptools-pip-installed-pkg-release

python,python3: Record PKG_RELEASE for host setuptools/pip
lilik-openwrt-22.03
Hannu Nyman 6 years ago
committed by GitHub
parent
commit
1e39f3189b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 12 deletions
  1. +20
    -6
      lang/python/python/Makefile
  2. +20
    -6
      lang/python/python3/Makefile

+ 20
- 6
lang/python/python/Makefile View File

@ -316,18 +316,32 @@ define Host/Compile
endef endef
define Host/Install define Host/Install
$(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)),,
rm -rf \
$(HOST_PYTHON_PKG_DIR)/easy_install.py \
$(HOST_PYTHON_PKG_DIR)/pkg_resources \
$(HOST_PYTHON_PKG_DIR)/setuptools \
$(HOST_PYTHON_PKG_DIR)/setuptools-* \
$(HOST_PYTHON_PKG_DIR)/.setuptools-patched* \
$(HOST_PYTHON_PKG_DIR)/.setuptools_installed_*
)
$(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)),,
rm -rf \
$(HOST_PYTHON_PKG_DIR)/pip \
$(HOST_PYTHON_PKG_DIR)/pip-* \
$(HOST_PYTHON_PKG_DIR)/.pip-patched* \
$(HOST_PYTHON_PKG_DIR)/.pip_installed_*
)
$(MAKE) -C $(HOST_BUILD_DIR) install $(MAKE) -C $(HOST_BUILD_DIR) install
$(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/ $(INSTALL_DIR) $(HOST_PYTHON_DIR)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON_DIR)/bin/pgen2 $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON_DIR)/bin/pgen2
$(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.setuptools-patched-$(PYTHON_SETUPTOOLS_VERSION)),,
$(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)),,
$(call HostPatchDir,$(HOST_PYTHON_PKG_DIR),./patches-setuptools,) $(call HostPatchDir,$(HOST_PYTHON_PKG_DIR),./patches-setuptools,)
rm -f $(HOST_PYTHON_PKG_DIR)/.setuptools-patched-*
touch $(HOST_PYTHON_PKG_DIR)/.setuptools-patched-$(PYTHON_SETUPTOOLS_VERSION)
touch $(HOST_PYTHON_PKG_DIR)/.setuptools_installed_$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)
) )
$(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.pip-patched-$(PYTHON_PIP_VERSION)),,
$(if $(wildcard $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)),,
$(call HostPatchDir,$(HOST_PYTHON_PKG_DIR),./patches-pip,) $(call HostPatchDir,$(HOST_PYTHON_PKG_DIR),./patches-pip,)
rm -f $(HOST_PYTHON_PKG_DIR)/.pip-patched-*
touch $(HOST_PYTHON_PKG_DIR)/.pip-patched-$(PYTHON_PIP_VERSION)
touch $(HOST_PYTHON_PKG_DIR)/.pip_installed_$(PYTHON_PIP_VERSION)-$(PYTHON_PIP_PKG_RELEASE)
) )
endef endef


+ 20
- 6
lang/python/python3/Makefile View File

@ -311,18 +311,32 @@ define Host/Compile
endef endef
define Host/Install 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 $(MAKE) -C $(HOST_BUILD_DIR) install
$(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/ $(INSTALL_DIR) $(HOST_PYTHON3_DIR)/bin/
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(HOST_PYTHON3_DIR)/bin/pgen3 $(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,) $(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,) $(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 endef


Loading…
Cancel
Save