summaryrefslogtreecommitdiff
path: root/lang/python/python3-package.mk
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python/python3-package.mk')
-rw-r--r--lang/python/python3-package.mk11
1 files changed, 7 insertions, 4 deletions
diff --git a/lang/python/python3-package.mk b/lang/python/python3-package.mk
index 8477d8c75..f2336b8fc 100644
--- a/lang/python/python3-package.mk
+++ b/lang/python/python3-package.mk
@@ -206,10 +206,13 @@ 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 ; \
+ if [ -d "$(python3_mk_path)host-pip-requirements" ] && \
+ [ -n "$$$$($(FIND) $(python3_mk_path)host-pip-requirements -maxdepth 1 -mindepth 1 -name '*.txt' -print -quit 2>/dev/null)" ]; then \
+ 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 \
fi
endef