summaryrefslogtreecommitdiff
path: root/lang/python
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2021-08-31 13:27:52 +0300
committerGitHub <noreply@github.com>2021-08-31 13:27:52 +0300
commitc5d49e35f333fe60cbd0f3e6d68125a1de5fcba1 (patch)
tree2dc0bd3ce6e161eb8e0ced4664375b15ad530e75 /lang/python
parentcb8ae4ac1977597746c15d64b223931327de7b9c (diff)
parent9725de1de4426b02062ca7d86b750013af8e0e05 (diff)
Merge pull request #16462 from commodo/python-sync-host-pip-reqs
python3-package.mk: add check for dependencies in host-pip-requirements
Diffstat (limited to 'lang/python')
-rw-r--r--lang/python/host-pip-requirements/Django-1.11.txt2
-rw-r--r--lang/python/python3-package.mk12
2 files changed, 12 insertions, 2 deletions
diff --git a/lang/python/host-pip-requirements/Django-1.11.txt b/lang/python/host-pip-requirements/Django-1.11.txt
deleted file mode 100644
index eeff752f6..000000000
--- a/lang/python/host-pip-requirements/Django-1.11.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Django==1.11.29 --hash=sha256:4200aefb6678019a0acf0005cd14cfce3a5e6b9b90d06145fcdd2e474ad4329c
-pytz==2021.1 --hash=sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da
diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk
index 5673d15bb..96fafe445 100644
--- a/lang/python/python3-package.mk
+++ b/lang/python/python3-package.mk
@@ -204,6 +204,17 @@ define Py3Build/FindStdlibDepends
$(SHELL) $(python3_mk_path)python3-find-stdlib-depends.sh -n "$(PKG_NAME)" "$(PKG_BUILD_DIR)"
endef
+ifneq ($(strip $(PYPI_NAME)),)
+define Py3Build/CheckHostPipVersionMatch
+ if grep -q "$(PYPI_NAME)==" $(python3_mk_path)host-pip-requirements/*.txt ; then \
+ if ! grep -q "$(PYPI_NAME)==$(PKG_VERSION)" $(python3_mk_path)host-pip-requirements/*.txt ; then \
+ printf "\nPlease update version of $(PYPI_NAME) to $(PKG_VERSION) in 'host-pip-requirements'/\n\n" ; \
+ exit 1 ; \
+ fi \
+ fi
+endef
+endif
+
define Py3Build/Compile/Default
$(if $(PYTHON3_PKG_HOST_PIP_INSTALL_ARGS), \
$(call HostPython3/PipInstall,$(PYTHON3_PKG_HOST_PIP_INSTALL_ARGS)) \
@@ -226,5 +237,6 @@ ifeq ($(strip $(PYTHON3_PKG_BUILD)),1)
ifeq ($(PY3),stdlib)
Hooks/Configure/Post+=Py3Build/FindStdlibDepends
endif
+ Hooks/Configure/Post+=Py3Build/CheckHostPipVersionMatch
Build/Compile=$(Py3Build/Compile)
endif