aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.python.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/Mk/bsd.python.mk b/Mk/bsd.python.mk
index f065310bde2..d94abd1c509 100644
--- a/Mk/bsd.python.mk
+++ b/Mk/bsd.python.mk
@@ -359,8 +359,10 @@ DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION}
# should point to some other version we have installed, according to the port USE_PYTHON
# specification
.if !defined(PYTHON_DEFAULT_PORTVERSION) || (${PYTHON_VERSION} != ${PYTHON_DEFAULT_VERSION})
+.if exists(${PYTHON_CMD})
_PYTHON_PORTVERSION!= (${PYTHON_CMD} -c 'import sys; \
print(sys.version.split()[0].replace("b",".b"))' 2> /dev/null) | ${TAIL} -1
+.endif
.if !defined(PYTHON_NO_DEPENDS) && !empty(_PYTHON_PORTVERSION)
PYTHON_PORTVERSION= ${_PYTHON_PORTVERSION}
.endif