-WARNING+= "PYTHON_DEFAULT must be a version present in PYTHON2_DEFAULT or PYTHON3_DEFAULT, if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf"
+.if ${PYTHON3_DEFAULT} != ${PYTHON_DEFAULT}
+WARNING+= "PYTHON_DEFAULT must be a version present in PYTHON3_DEFAULT, if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf"
.endif
-.if ${_PYTHON_ARGS} == 2.7
-DEV_WARNING+= "lang/python27 reached End of Life and will be removed on 2020-12-31, consider converting to a modern version of python"
-.elif ${_PYTHON_ARGS} == 2
-DEV_ERROR+= "USES=python:2 is no longer supported, use USES=python:2.7"
-.elif ${_PYTHON_ARGS} == 3
+.if ${_PYTHON_ARGS} == 3
DEV_ERROR+= "USES=python:3 is no longer supported, use USES=python:3.6+ or an appropriate version range"
-.endif # ${_PYTHON_ARGS} == 2.7
+.endif
_PYTHON_VERSION:= ${PYTHON_DEFAULT}
@@ -358,7 +348,7 @@
# If we have an unsupported version of Python, try another.
.if defined(_PYTHON_VERSION_NONSUPPORTED)
.undef _PYTHON_VERSION
-.for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS}
+.for ver in ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS}