Index: head/Mk/Uses/python.mk =================================================================== --- head/Mk/Uses/python.mk +++ head/Mk/Uses/python.mk @@ -383,7 +383,11 @@ PYTHON_ABIVER= # empty PYTHON_PORTSDIR= ${_PYTHON_RELPORTDIR}${PYTHON_SUFFIX} PYTHON_PORTVERSION!= ${MAKE} -V PORTVERSION -C ${PYTHON_PORTSDIR} -PYTHON_REL= ${PYTHON_PORTVERSION:C/\.([0-9]+)$/.0\1/:C/\.0?([0-9][0-9])$/.\1/:S/.//g} +# Create a 4 integer version string, prefixing 0 to the last token if +# it's a single character. Only use the the first 3 tokens of +# PORTVERSION to support pre-release versions (rc3, alpha4, etc) of +# any Python port (lang/pythonXY) +PYTHON_REL= ${PYTHON_PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/:C/\.([0-9]+)$/.0\1/:C/\.0?([0-9][0-9])$/.\1/:S/.//g} # Might be overridden by calling ports PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION}