aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2021-04-09 23:15:37 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2021-05-25 13:55:43 +0000
commit0729af4255a63ee299e0c63a18b6a86520a19e02 (patch)
tree15549679e2da1abfedb505860f7fc7a2ed99a300
parente3a7c4e0f345292232b63f31620626b6cf6c19bf (diff)
downloadports-0729af4255a63ee299e0c63a18b6a86520a19e02.tar.gz
ports-0729af4255a63ee299e0c63a18b6a86520a19e02.zip
Mk: switch PYTHON_REL to 5 digits to support python 3.10.x
PR: 255013 Differential Revision: https://reviews.freebsd.org/D29418 Exp-run by: antoine Approved by: wen@, no objection from python@ or portmgr@
-rw-r--r--CHANGES8
-rw-r--r--Mk/Uses/python.mk20
-rw-r--r--astro/py-metpy/Makefile4
-rw-r--r--databases/py-sqlalchemy14/Makefile2
-rw-r--r--databases/py-sqlite3/Makefile2
-rw-r--r--deskutils/dosage/Makefile2
-rw-r--r--devel/py-Jinja2/Makefile2
-rw-r--r--devel/py-aiortc/Makefile2
-rw-r--r--devel/py-anyio/Makefile2
-rw-r--r--devel/py-argcomplete/Makefile2
-rw-r--r--devel/py-arrow/Makefile2
-rw-r--r--devel/py-astroid/Makefile2
-rw-r--r--devel/py-b2sdk/Makefile2
-rw-r--r--devel/py-black/Makefile4
-rw-r--r--devel/py-build/Makefile2
-rw-r--r--devel/py-catalogue/Makefile2
-rw-r--r--devel/py-cmd2/Makefile2
-rw-r--r--devel/py-dataclasses-json/Makefile2
-rw-r--r--devel/py-flake8/Makefile2
-rw-r--r--devel/py-fsspec/Makefile2
-rw-r--r--devel/py-future-annotations/Makefile2
-rw-r--r--devel/py-graphql-relay/Makefile2
-rw-r--r--devel/py-importlib-metadata/Makefile2
-rw-r--r--devel/py-importlib-resources/Makefile2
-rw-r--r--devel/py-jsonpickle/Makefile2
-rw-r--r--devel/py-libcst/Makefile2
-rw-r--r--devel/py-openstacksdk/Makefile2
-rw-r--r--devel/py-oslo.config/Makefile2
-rw-r--r--devel/py-osprofiler/Makefile2
-rw-r--r--devel/py-pep517/Makefile2
-rw-r--r--devel/py-pint/Makefile4
-rw-r--r--devel/py-pip-run/Makefile2
-rw-r--r--devel/py-pip/Makefile2
-rw-r--r--devel/py-pipx/Makefile2
-rw-r--r--devel/py-pluggy/Makefile2
-rw-r--r--devel/py-poetry-core/Makefile2
-rw-r--r--devel/py-prettytable/Makefile2
-rw-r--r--devel/py-ptpython/Makefile2
-rw-r--r--devel/py-pytest/Makefile2
-rw-r--r--devel/py-pyvisa-py/Makefile2
-rw-r--r--devel/py-pyvisa/Makefile4
-rw-r--r--devel/py-setuptools/Makefile2
-rw-r--r--devel/py-twine/Makefile2
-rw-r--r--devel/py-watermark/Makefile2
-rw-r--r--games/adonthell/Makefile2
-rw-r--r--games/anki/Makefile2
-rw-r--r--graphics/py-python-poppler-qt5/Makefile2
-rw-r--r--math/cadabra2/Makefile2
-rw-r--r--net/irrd/Makefile2
-rw-r--r--net/py-kombu/Makefile2
-rw-r--r--net/py-netaddr/Makefile2
-rw-r--r--net/py-tweepy/Makefile2
-rw-r--r--net/py-wsproto/Makefile2
-rw-r--r--print/py-fonttools3/Makefile2
-rw-r--r--print/py-ufolib2/Makefile2
-rw-r--r--science/py-asdf/Makefile2
-rw-r--r--science/py-h5py/Makefile2
-rw-r--r--security/py-flask-saml/Makefile2
-rw-r--r--security/py-signedjson/Makefile2
-rw-r--r--sysutils/py-python-crontab/Makefile2
-rw-r--r--textproc/py-fingerprints/Makefile2
-rw-r--r--textproc/py-markdown-it-py/Makefile2
-rw-r--r--textproc/py-normality/Makefile2
-rw-r--r--textproc/py-sphinx-inline-tabs/Makefile2
-rw-r--r--www/py-aiohttp/Makefile2
-rw-r--r--www/py-aioquic/Makefile2
-rw-r--r--www/py-cssutils/Makefile2
-rw-r--r--www/py-dj31-django-auth-ldap/Makefile2
-rw-r--r--www/py-django-auth-ldap/Makefile2
-rw-r--r--www/py-django-bootstrap3/Makefile2
-rw-r--r--www/py-django-markdownx/Makefile2
-rw-r--r--www/py-django-treebeard/Makefile2
-rw-r--r--www/py-fqdn/Makefile2
-rw-r--r--www/py-hypercorn/Makefile2
-rw-r--r--www/py-uvicorn/Makefile2
-rw-r--r--www/py-werkzeug/Makefile2
-rw-r--r--www/py-yarl/Makefile2
-rw-r--r--www/qutebrowser/Makefile4
-rw-r--r--x11-toolkits/py-tkinter/Makefile2
-rw-r--r--x11-wm/chamfer/Makefile2
80 files changed, 101 insertions, 93 deletions
diff --git a/CHANGES b/CHANGES
index 664dd8ee0777..873ea6cfe2c3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,14 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
+20210525:
+AUTHOR: amdmi3@FreeBSD.org
+
+ PYTHON_REL has been switched from a 4 digits number to a 5 digits number to
+ handle python 3.10.0. Ports checking for python 3.7.10 should compare
+ PYTHON_REL against 30710 and ports checking for python 3.10.0 should compare
+ PYTHON_REL against 31000.
+
20201120:
AUTHOR: gnome@FreeBSD.org
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index fc650252134c..425ff113a748 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -174,7 +174,7 @@
# PYTHON_PORTSDIR - The port directory of the chosen Python interpreter
#
# PYTHON_REL - The release number of the chosen Python interpreter
-# without dots, e.g. 2706, 3401, ...
+# without dots, e.g. 20706, 30401, ...
#
# PYTHON_SUFFIX - The major-minor release number of the chosen Python
# interpreter without dots, e.g. 27, 36, ...
@@ -449,24 +449,24 @@ PYTHON_PORTSDIR= ${_PYTHON_RELPORTDIR}${PYTHON_SUFFIX}
.if !defined(_PORTS_ENV_CHECK) || exists(${PORTSDIR}/${PYTHON_PORTSDIR})
.include "${PORTSDIR}/${PYTHON_PORTSDIR}/Makefile.version"
.endif
-# 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
+# Create a 5 integer version string, prefixing 0 to the minor and patch
+# tokens 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}
+PYTHON_REL= ${PYTHON_PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/:C/\.([0-9])$/.0\1/:C/\.([0-9]\.[0-9]+)/.0\1/:S/.//g}
# Might be overridden by calling ports
PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION}
.if ${PYTHON_VER} != 2.7
.if exists(${PYTHON_CMD}-config)
PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags
-.elif ${PYTHON_REL} < 3800
+.elif ${PYTHON_REL} < 30800
# Default ABI flags for lang/python3[67] ports
PYTHON_ABIVER= m
.endif
.endif
-.if ${PYTHON_REL} >= 3807
+.if ${PYTHON_REL} >= 30807
PYTHON_EXT_SUFFIX= .cpython-${PYTHON_SUFFIX}
.else
PYTHON_EXT_SUFFIX= # empty
@@ -607,7 +607,7 @@ add-plist-pymod:
${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST}
.else
-.if ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST)
+.if ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST)
# When Python version is 3.2+ we rewrite all the filenames
# of TMPPLIST that end with .py[co], so that they conform
# to PEP 3147 (see https://www.python.org/dev/peps/pep-3147/)
@@ -623,7 +623,7 @@ add-plist-python:
pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="opt-1.pyc" \
${TMPPLIST} > ${TMPPLIST}.pyc_tmp
@${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST}
-.endif # ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST)
+.endif # ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST)
.endif # defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS)
# Fix for programs that build python from a GNU auto* environment
@@ -638,7 +638,7 @@ PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR}
PYNUMPY= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16,1<1.20,1:math/py-numpy@${PY_FLAVOR}
# Common Python modules that can be needed but only for some versions of Python.
-.if ${PYTHON_REL} < 3500
+.if ${PYTHON_REL} < 30500
PY_PYGMENTS= ${PYTHON_PKGNAMEPREFIX}pygments-25>=2.5.1<3:textproc/py-pygments-25@${PY_FLAVOR}
.else
PY_PILLOW= ${PYTHON_PKGNAMEPREFIX}pillow>=7.0.0:graphics/py-pillow@${PY_FLAVOR}
@@ -678,7 +678,7 @@ PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \
PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \
PYTHON_VER=${PYTHON_VER} \
PYTHON_VERSION=${PYTHON_VERSION}
-.if ${PYTHON_REL} < 3000
+.if ${PYTHON_REL} < 30000
PLIST_SUB+= PYTHON2="" PYTHON3="@comment "
.else
PLIST_SUB+= PYTHON2="@comment " PYTHON3=""
diff --git a/astro/py-metpy/Makefile b/astro/py-metpy/Makefile
index 539ea3670074..5a92577595d4 100644
--- a/astro/py-metpy/Makefile
+++ b/astro/py-metpy/Makefile
@@ -31,11 +31,11 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.0.0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
-.if ${PYTHON_REL} < 3900
+.if ${PYTHON_REL} < 30900
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-resources>=1.3.0:devel/py-importlib-resources@${PY_FLAVOR}
.endif
diff --git a/databases/py-sqlalchemy14/Makefile b/databases/py-sqlalchemy14/Makefile
index f75b6a9cec79..b8e23d541e68 100644
--- a/databases/py-sqlalchemy14/Makefile
+++ b/databases/py-sqlalchemy14/Makefile
@@ -37,7 +37,7 @@ SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/databases/py-sqlite3/Makefile b/databases/py-sqlite3/Makefile
index 935562290de3..1941d0609ef4 100644
--- a/databases/py-sqlite3/Makefile
+++ b/databases/py-sqlite3/Makefile
@@ -30,7 +30,7 @@ PYDISTUTILS_INSTALLARGS+= --install-lib ${PYTHON_LIBDIR}/lib-dynload
.include <bsd.port.pre.mk>
post-extract:
-.if ${PYTHON_REL} < 3000
+.if ${PYTHON_REL} < 30000
@${CP} ${FILESDIR}/setup.py ${WRKSRC}
.else
@${CP} ${FILESDIR}/setup3.py ${WRKSRC}/setup.py
diff --git a/deskutils/dosage/Makefile b/deskutils/dosage/Makefile
index c11771d39888..3bb25dbcc350 100644
--- a/deskutils/dosage/Makefile
+++ b/deskutils/dosage/Makefile
@@ -24,7 +24,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cached-property>0:devel/py-cached-property@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-Jinja2/Makefile b/devel/py-Jinja2/Makefile
index 469e40bd4a23..1e8e78bd62aa 100644
--- a/devel/py-Jinja2/Makefile
+++ b/devel/py-Jinja2/Makefile
@@ -62,7 +62,7 @@ do-install:
.if ${PORT_OPTIONS:MEXAMPLES}
PORTEXAMPLES= *
post-build:
-. if ${PYTHON_REL} >= 3000
+. if ${PYTHON_REL} >= 30000
${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/examples
. endif
${PYTHON_CMD} -m compileall ${WRKSRC}/examples ; \
diff --git a/devel/py-aiortc/Makefile b/devel/py-aiortc/Makefile
index 97a7eb2e3504..22e9409fefd7 100644
--- a/devel/py-aiortc/Makefile
+++ b/devel/py-aiortc/Makefile
@@ -28,7 +28,7 @@ USE_PYTHON= autoplist concurrent distutils
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0:devel/py-dataclasses@${PY_FLAVOR}
.endif
diff --git a/devel/py-anyio/Makefile b/devel/py-anyio/Makefile
index b7954dd11438..c935b5c56c09 100644
--- a/devel/py-anyio/Makefile
+++ b/devel/py-anyio/Makefile
@@ -28,7 +28,7 @@ TRIO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}trio>=0.16:net/py-trio@${PY_FLAVOR}
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/devel/py-argcomplete/Makefile b/devel/py-argcomplete/Makefile
index 1115058844cd..4d502e15322a 100644
--- a/devel/py-argcomplete/Makefile
+++ b/devel/py-argcomplete/Makefile
@@ -24,7 +24,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0.23<5:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-arrow/Makefile b/devel/py-arrow/Makefile
index b06f6695fb90..49aeb23afa99 100644
--- a/devel/py-arrow/Makefile
+++ b/devel/py-arrow/Makefile
@@ -20,7 +20,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/devel/py-astroid/Makefile b/devel/py-astroid/Makefile
index c9aa89830487..610ce56e3615 100644
--- a/devel/py-astroid/Makefile
+++ b/devel/py-astroid/Makefile
@@ -21,7 +21,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typed-ast>=1.4.0<1.5:devel/py-typed-ast@${PY_FLAVOR}
.endif
diff --git a/devel/py-b2sdk/Makefile b/devel/py-b2sdk/Makefile
index 1e130676b4bc..18ebeba67ad6 100644
--- a/devel/py-b2sdk/Makefile
+++ b/devel/py-b2sdk/Makefile
@@ -28,7 +28,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-black/Makefile b/devel/py-black/Makefile
index 0e2cd00fbdaa..0e439f1ac3ba 100644
--- a/devel/py-black/Makefile
+++ b/devel/py-black/Makefile
@@ -34,11 +34,11 @@ D_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiohttp>=3.6.0:www/py-aiohttp@${PY_FLAVOR
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0.6:devel/py-dataclasses@${PY_FLAVOR}
.endif
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typed-ast>=1.4.2:devel/py-typed-ast@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.7.4:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/devel/py-build/Makefile b/devel/py-build/Makefile
index bc31398a954a..6665c5bbf0cc 100644
--- a/devel/py-build/Makefile
+++ b/devel/py-build/Makefile
@@ -25,7 +25,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-catalogue/Makefile b/devel/py-catalogue/Makefile
index 8aa62f42ca94..be1d9418125e 100644
--- a/devel/py-catalogue/Makefile
+++ b/devel/py-catalogue/Makefile
@@ -19,7 +19,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.6.4:devel/py-typing-extensions@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}zipp>=0.5:devel/py-zipp@${PY_FLAVOR}
.endif
diff --git a/devel/py-cmd2/Makefile b/devel/py-cmd2/Makefile
index 1bf75670ac01..114f029c0eaf 100644
--- a/devel/py-cmd2/Makefile
+++ b/devel/py-cmd2/Makefile
@@ -25,7 +25,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.6.0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-dataclasses-json/Makefile b/devel/py-dataclasses-json/Makefile
index 8dcb763d7797..a96af7eb4897 100644
--- a/devel/py-dataclasses-json/Makefile
+++ b/devel/py-dataclasses-json/Makefile
@@ -23,7 +23,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0:devel/py-dataclasses@${PY_FLAVOR}
.endif
diff --git a/devel/py-flake8/Makefile b/devel/py-flake8/Makefile
index 02b1db7f2940..f67c156a0d8a 100644
--- a/devel/py-flake8/Makefile
+++ b/devel/py-flake8/Makefile
@@ -26,7 +26,7 @@ TEST_ENV= PYTHONPATH="${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}"
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-fsspec/Makefile b/devel/py-fsspec/Makefile
index 7e48aa10591d..7c21f13a1ee8 100644
--- a/devel/py-fsspec/Makefile
+++ b/devel/py-fsspec/Makefile
@@ -19,7 +19,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-future-annotations/Makefile b/devel/py-future-annotations/Makefile
index 1843311afec1..a4f7d6589940 100644
--- a/devel/py-future-annotations/Makefile
+++ b/devel/py-future-annotations/Makefile
@@ -22,7 +22,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} >= 3700
+.if ${PYTHON_REL} >= 30700
IGNORE= included in python ${PYTHON_VER}
.endif
diff --git a/devel/py-graphql-relay/Makefile b/devel/py-graphql-relay/Makefile
index d069d577de10..46b8ef539093 100644
--- a/devel/py-graphql-relay/Makefile
+++ b/devel/py-graphql-relay/Makefile
@@ -21,7 +21,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.7<4:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/devel/py-importlib-metadata/Makefile b/devel/py-importlib-metadata/Makefile
index ec8716cd25ef..01253255f441 100644
--- a/devel/py-importlib-metadata/Makefile
+++ b/devel/py-importlib-metadata/Makefile
@@ -20,7 +20,7 @@ USE_PYTHON= autoplist distutils
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.6.4:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/devel/py-importlib-resources/Makefile b/devel/py-importlib-resources/Makefile
index df3dbefec6a5..4ee1d296e354 100644
--- a/devel/py-importlib-resources/Makefile
+++ b/devel/py-importlib-resources/Makefile
@@ -19,7 +19,7 @@ USE_PYTHON= autoplist distutils
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}zipp>=0:devel/py-zipp@${PY_FLAVOR}
.endif
diff --git a/devel/py-jsonpickle/Makefile b/devel/py-jsonpickle/Makefile
index 9ffda404e296..6c188e2a450f 100644
--- a/devel/py-jsonpickle/Makefile
+++ b/devel/py-jsonpickle/Makefile
@@ -18,7 +18,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-libcst/Makefile b/devel/py-libcst/Makefile
index 367ae95ea3c4..da95aede23cb 100644
--- a/devel/py-libcst/Makefile
+++ b/devel/py-libcst/Makefile
@@ -23,7 +23,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0.6.0:devel/py-dataclasses@${PY_FLAVOR}
.endif
diff --git a/devel/py-openstacksdk/Makefile b/devel/py-openstacksdk/Makefile
index 8015f582eaad..c090b206d8c3 100644
--- a/devel/py-openstacksdk/Makefile
+++ b/devel/py-openstacksdk/Makefile
@@ -37,7 +37,7 @@ SHEBANG_GLOB= *.sh
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.7.0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-oslo.config/Makefile b/devel/py-oslo.config/Makefile
index 36c99b23c244..84380f7f5d14 100644
--- a/devel/py-oslo.config/Makefile
+++ b/devel/py-oslo.config/Makefile
@@ -27,7 +27,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.7.0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-osprofiler/Makefile b/devel/py-osprofiler/Makefile
index e0a8a25895aa..df0d1b0ad2f1 100644
--- a/devel/py-osprofiler/Makefile
+++ b/devel/py-osprofiler/Makefile
@@ -30,7 +30,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.7.0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-pep517/Makefile b/devel/py-pep517/Makefile
index f9567daa7d96..6a1518b917f4 100644
--- a/devel/py-pep517/Makefile
+++ b/devel/py-pep517/Makefile
@@ -21,7 +21,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}zipp>=0:devel/py-zipp@${PY_FLAVOR}
.endif
diff --git a/devel/py-pint/Makefile b/devel/py-pint/Makefile
index 2164e5f69b2a..a96732b59a6c 100644
--- a/devel/py-pint/Makefile
+++ b/devel/py-pint/Makefile
@@ -25,11 +25,11 @@ SHEBANG_FILES= pint/pint-convert
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-resources>=0:devel/py-importlib-resources@${PY_FLAVOR}
.endif
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-pip-run/Makefile b/devel/py-pip-run/Makefile
index 8d7c9a46e449..b8adc7c18c1e 100644
--- a/devel/py-pip-run/Makefile
+++ b/devel/py-pip-run/Makefile
@@ -25,7 +25,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-pip/Makefile b/devel/py-pip/Makefile
index 025de2f06240..374100bcf4fd 100644
--- a/devel/py-pip/Makefile
+++ b/devel/py-pip/Makefile
@@ -61,7 +61,7 @@ DOCS_VARS= PYDISTUTILS_BUILD_TARGET=build_sphinx \
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700 && ${PORT_OPTIONS:MDOCS}
+.if ${PYTHON_REL} < 30700 && ${PORT_OPTIONS:MDOCS}
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}future-annotations>=0:devel/py-future-annotations@${PY_FLAVOR}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-python36
.endif
diff --git a/devel/py-pipx/Makefile b/devel/py-pipx/Makefile
index f20b23b8f8bc..f3c0b13f02f6 100644
--- a/devel/py-pipx/Makefile
+++ b/devel/py-pipx/Makefile
@@ -24,7 +24,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=3.3.0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-pluggy/Makefile b/devel/py-pluggy/Makefile
index fd73bbdbfcf9..cbbe52d5b534 100644
--- a/devel/py-pluggy/Makefile
+++ b/devel/py-pluggy/Makefile
@@ -22,7 +22,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0.12:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-poetry-core/Makefile b/devel/py-poetry-core/Makefile
index 8a511d40d572..6c6ca251ee00 100644
--- a/devel/py-poetry-core/Makefile
+++ b/devel/py-poetry-core/Makefile
@@ -19,7 +19,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.7.0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-prettytable/Makefile b/devel/py-prettytable/Makefile
index d614651be6c2..d8714bf5afe7 100644
--- a/devel/py-prettytable/Makefile
+++ b/devel/py-prettytable/Makefile
@@ -22,7 +22,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-ptpython/Makefile b/devel/py-ptpython/Makefile
index fce6a820f668..090e89cc9964 100644
--- a/devel/py-ptpython/Makefile
+++ b/devel/py-ptpython/Makefile
@@ -30,7 +30,7 @@ PTIPYTHON_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ipython>=0:devel/ipython@${PY_FLAV
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-pytest/Makefile b/devel/py-pytest/Makefile
index e24f362f74aa..2f87d8b80937 100644
--- a/devel/py-pytest/Makefile
+++ b/devel/py-pytest/Makefile
@@ -42,7 +42,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0.12:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-pyvisa-py/Makefile b/devel/py-pyvisa-py/Makefile
index 5eb58179fd16..c65828ac6273 100644
--- a/devel/py-pyvisa-py/Makefile
+++ b/devel/py-pyvisa-py/Makefile
@@ -29,7 +29,7 @@ USB_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyusb>=0:devel/py-pyusb@${PY_FLAVOR}
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-pyvisa/Makefile b/devel/py-pyvisa/Makefile
index a7f132d3c750..af2570b88900 100644
--- a/devel/py-pyvisa/Makefile
+++ b/devel/py-pyvisa/Makefile
@@ -22,11 +22,11 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0:devel/py-dataclasses@${PY_FLAVOR}
.endif
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-setuptools/Makefile b/devel/py-setuptools/Makefile
index ec9b524298bf..759dbdc8cd6e 100644
--- a/devel/py-setuptools/Makefile
+++ b/devel/py-setuptools/Makefile
@@ -34,7 +34,7 @@ SUB_LIST+= PYTHON_VER=${PYTHON_VER}
# These create dependency loops in redports/poudriere, because setuptools
# is currently an explicit BUILD & RUN dependency in Uses/python.mk.
#TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
-#.if ${PYTHON_REL} < 3300
+#.if ${PYTHON_REL} < 30300
#TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}
#.endif
# pkg install -y py36-pytest py36-mock py36-pytest-fixture-config py36-pytest-virtualenv py36-paver
diff --git a/devel/py-twine/Makefile b/devel/py-twine/Makefile
index 9ec35608cce0..28824b93d613 100644
--- a/devel/py-twine/Makefile
+++ b/devel/py-twine/Makefile
@@ -29,7 +29,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/devel/py-watermark/Makefile b/devel/py-watermark/Makefile
index 9444a6faf870..06a5c9ebb660 100644
--- a/devel/py-watermark/Makefile
+++ b/devel/py-watermark/Makefile
@@ -21,7 +21,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/games/adonthell/Makefile b/games/adonthell/Makefile
index 123f6373d849..837d8ac637e4 100644
--- a/games/adonthell/Makefile
+++ b/games/adonthell/Makefile
@@ -38,7 +38,7 @@ PLIST_FILES= bin/adonthell \
# C extensions are no longer linked to libpython since Python 3.8 and onwards.
#
# See also https://bugs.python.org/issue36721 for reference.
-.if ${PYTHON_REL} >= 3800
+.if ${PYTHON_REL} >= 30800
_PY_EMBED= --embed
.endif
diff --git a/games/anki/Makefile b/games/anki/Makefile
index 0203317d0c15..70e4932cf5a1 100644
--- a/games/anki/Makefile
+++ b/games/anki/Makefile
@@ -359,7 +359,7 @@ _MY_BUILDHASH= 84dcaa86
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
_PY_SONAME= .cpython-${PYTHON_SUFFIX}m
.else
_PY_SONAME= ${PYTHON_EXT_SUFFIX}
diff --git a/graphics/py-python-poppler-qt5/Makefile b/graphics/py-python-poppler-qt5/Makefile
index d78821adfa2c..3460e58409d4 100644
--- a/graphics/py-python-poppler-qt5/Makefile
+++ b/graphics/py-python-poppler-qt5/Makefile
@@ -25,7 +25,7 @@ PLIST_SUB= _PY_SONAME=${_PY_SONAME}
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
_PY_SONAME= .cpython-${PYTHON_SUFFIX}m
.else
_PY_SONAME= ${PYTHON_EXT_SUFFIX}
diff --git a/math/cadabra2/Makefile b/math/cadabra2/Makefile
index 6307fc6209f8..19fad4bba10e 100644
--- a/math/cadabra2/Makefile
+++ b/math/cadabra2/Makefile
@@ -43,7 +43,7 @@ GUI_VARS= INSTALLS_ICONS=yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
_PY_SONAME= .cpython-${PYTHON_SUFFIX}m
.else
_PY_SONAME= ${PYTHON_EXT_SUFFIX}
diff --git a/net/irrd/Makefile b/net/irrd/Makefile
index f8225e89c3cc..451af0b06c80 100644
--- a/net/irrd/Makefile
+++ b/net/irrd/Makefile
@@ -58,7 +58,7 @@ SUB_LIST= PYTHON_CMD="${PYTHON_CMD}" \
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0.6:devel/py-dataclasses@${PY_FLAVOR}
.endif
diff --git a/net/py-kombu/Makefile b/net/py-kombu/Makefile
index 7ee19f167157..c58f8b3c6984 100644
--- a/net/py-kombu/Makefile
+++ b/net/py-kombu/Makefile
@@ -35,7 +35,7 @@ ZMQ_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyzmq>=13.1.0:net/py-pyzmq@${PY_FLAVOR}
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0.18:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/net/py-netaddr/Makefile b/net/py-netaddr/Makefile
index 1b8ce6ad4051..a71918f04646 100644
--- a/net/py-netaddr/Makefile
+++ b/net/py-netaddr/Makefile
@@ -25,7 +25,7 @@ OPTIONS_DEFINE= DOCS
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-resources>0:devel/py-importlib-resources@${PY_FLAVOR}
.endif
diff --git a/net/py-tweepy/Makefile b/net/py-tweepy/Makefile
index 87ae5ecbd00e..78c006f4441c 100644
--- a/net/py-tweepy/Makefile
+++ b/net/py-tweepy/Makefile
@@ -29,7 +29,7 @@ TEST_ENV= USE_REPLAY=1
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3000
+.if ${PYTHON_REL} < 30000
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}unittest2>0:devel/py-unittest2@${PY_FLAVOR}
.endif
diff --git a/net/py-wsproto/Makefile b/net/py-wsproto/Makefile
index e9176c4a2743..df222608d6c1 100644
--- a/net/py-wsproto/Makefile
+++ b/net/py-wsproto/Makefile
@@ -21,7 +21,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>0:devel/py-dataclasses@${PY_FLAVOR}
.endif
diff --git a/print/py-fonttools3/Makefile b/print/py-fonttools3/Makefile
index 26081764f6ce..fd76345f1af7 100644
--- a/print/py-fonttools3/Makefile
+++ b/print/py-fonttools3/Makefile
@@ -46,7 +46,7 @@ WOFF_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}brotli>=1.0.1:archivers/py-brotli@${PY_
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MUNICODE}
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}unicodedata2>=12.0.0:devel/py-unicodedata2@${PY_FLAVOR}
.endif
.endif
diff --git a/print/py-ufolib2/Makefile b/print/py-ufolib2/Makefile
index 3dfdaa4c5a90..5e99d77aebb2 100644
--- a/print/py-ufolib2/Makefile
+++ b/print/py-ufolib2/Makefile
@@ -30,7 +30,7 @@ LXML_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}lxml>=0:devel/py-lxml@${PY_FLAVOR}
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/science/py-asdf/Makefile b/science/py-asdf/Makefile
index 86000a55ef90..6c556675f783 100644
--- a/science/py-asdf/Makefile
+++ b/science/py-asdf/Makefile
@@ -31,7 +31,7 @@ SHEBANG_FILES= asdf/extern/RangeHTTPServer.py \
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3900
+.if ${PYTHON_REL} < 30900
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-resources>=3:devel/py-importlib-resources@${PY_FLAVOR}
.endif
diff --git a/science/py-h5py/Makefile b/science/py-h5py/Makefile
index 6ece7685ff87..b67a5e994a08 100644
--- a/science/py-h5py/Makefile
+++ b/science/py-h5py/Makefile
@@ -26,7 +26,7 @@ OPTIONS_DEFINE= DOCS EXAMPLES
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cached-property>=0:devel/py-cached-property@${PY_FLAVOR}
.endif
diff --git a/security/py-flask-saml/Makefile b/security/py-flask-saml/Makefile
index 52ffe8185ead..06139297c507 100644
--- a/security/py-flask-saml/Makefile
+++ b/security/py-flask-saml/Makefile
@@ -19,7 +19,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3900
+.if ${PYTHON_REL} < 30900
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pysaml24>=4.0.0<5:security/py-pysaml24@${PY_FLAVOR}
.else
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pysaml2>=5.1.0<6.20:security/py-pysaml2@${PY_FLAVOR}
diff --git a/security/py-signedjson/Makefile b/security/py-signedjson/Makefile
index c106b01e7c1e..9d93f25a0a48 100644
--- a/security/py-signedjson/Makefile
+++ b/security/py-signedjson/Makefile
@@ -27,7 +27,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/sysutils/py-python-crontab/Makefile b/sysutils/py-python-crontab/Makefile
index b7463544b587..b740eda4650a 100644
--- a/sysutils/py-python-crontab/Makefile
+++ b/sysutils/py-python-crontab/Makefile
@@ -26,7 +26,7 @@ GL_COMMIT= ba23056ddf1a00ecfd14b0a31c2e0cdad132f8d0
.include <bsd.port.pre.mk>
# The UTF-8 mode is enabled by default when the locale is C since Python 3.7.
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
TEST_ENV+= LC_ALL=C.UTF-8
.endif
diff --git a/textproc/py-fingerprints/Makefile b/textproc/py-fingerprints/Makefile
index b5fbce6631b3..a86d600fe4bf 100644
--- a/textproc/py-fingerprints/Makefile
+++ b/textproc/py-fingerprints/Makefile
@@ -22,7 +22,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
# Set a locale to avoid build/configure errors. The UTF-8 mode is enabled by
# default when the locale is C since Python 3.7.
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
USE_LOCALE= en_US.UTF-8
.endif
diff --git a/textproc/py-markdown-it-py/Makefile b/textproc/py-markdown-it-py/Makefile
index dcf0de4b597e..00a7977a44d7 100644
--- a/textproc/py-markdown-it-py/Makefile
+++ b/textproc/py-markdown-it-py/Makefile
@@ -22,7 +22,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.7.4:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/textproc/py-normality/Makefile b/textproc/py-normality/Makefile
index fcd073d6d3ac..ba2501660589 100644
--- a/textproc/py-normality/Makefile
+++ b/textproc/py-normality/Makefile
@@ -29,7 +29,7 @@ ICU_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyicu>=1.9.3:devel/py-pyicu@${PY_FLAVOR}
.include <bsd.port.pre.mk>
# Set a locale to avoid build/configure errors. The UTF-8 mode is enabled by
# default when the locale is C since Python 3.7.
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
USE_LOCALE= en_US.UTF-8
.endif
diff --git a/textproc/py-sphinx-inline-tabs/Makefile b/textproc/py-sphinx-inline-tabs/Makefile
index a23c6d7a3aae..fc1a72b3e796 100644
--- a/textproc/py-sphinx-inline-tabs/Makefile
+++ b/textproc/py-sphinx-inline-tabs/Makefile
@@ -23,7 +23,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/www/py-aiohttp/Makefile b/www/py-aiohttp/Makefile
index 4dab563fdec7..57cffc5e946d 100644
--- a/www/py-aiohttp/Makefile
+++ b/www/py-aiohttp/Makefile
@@ -36,7 +36,7 @@ USE_PYTHON= autoplist distutils cython
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}idna_ssl>=1.0:dns/py-idna_ssl@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.6.5:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/www/py-aioquic/Makefile b/www/py-aioquic/Makefile
index 6dab02342227..0ea40aa93b64 100644
--- a/www/py-aioquic/Makefile
+++ b/www/py-aioquic/Makefile
@@ -21,7 +21,7 @@ USE_PYTHON= autoplist concurrent distutils
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0:devel/py-dataclasses@${PY_FLAVOR}
.endif
diff --git a/www/py-cssutils/Makefile b/www/py-cssutils/Makefile
index c8f3de2b280f..4f5a718ce96b 100644
--- a/www/py-cssutils/Makefile
+++ b/www/py-cssutils/Makefile
@@ -28,7 +28,7 @@ OPTIONS_DEFINE= EXAMPLES
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/www/py-dj31-django-auth-ldap/Makefile b/www/py-dj31-django-auth-ldap/Makefile
index 75c78e02e9e8..89f95ffdf63a 100644
--- a/www/py-dj31-django-auth-ldap/Makefile
+++ b/www/py-dj31-django-auth-ldap/Makefile
@@ -32,7 +32,7 @@ DOCS_VARS= PYDISTUTILS_BUILD_TARGET+="build_sphinx -a -E"
# Set a locale to avoid build/configure errors. The UTF-8 mode is enabled by
# default when the locale is C since Python 3.7.
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
USE_LOCALE= en_US.UTF-8
.endif
diff --git a/www/py-django-auth-ldap/Makefile b/www/py-django-auth-ldap/Makefile
index 9238e1306d2b..b5298ec86374 100644
--- a/www/py-django-auth-ldap/Makefile
+++ b/www/py-django-auth-ldap/Makefile
@@ -32,7 +32,7 @@ DOCS_VARS= PYDISTUTILS_BUILD_TARGET+="build_sphinx -a -E"
# Set a locale to avoid build/configure errors. The UTF-8 mode is enabled by
# default when the locale is C since Python 3.7.
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
USE_LOCALE= en_US.UTF-8
.endif
diff --git a/www/py-django-bootstrap3/Makefile b/www/py-django-bootstrap3/Makefile
index 446765905a97..324fd5393ade 100644
--- a/www/py-django-bootstrap3/Makefile
+++ b/www/py-django-bootstrap3/Makefile
@@ -19,7 +19,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.5.0:devel/py-importlib-metadata@${PY_FLAVOR}
.endif
diff --git a/www/py-django-markdownx/Makefile b/www/py-django-markdownx/Makefile
index 157e4ce4c38a..ef2b5aceb7d4 100644
--- a/www/py-django-markdownx/Makefile
+++ b/www/py-django-markdownx/Makefile
@@ -23,7 +23,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
# Force an UTF-8 environment to avoid failures in the configuration phase for
# Python versions <= 3.6. Since Python 3.7 the UTF-8 mode is enabled by
# default when the locale is C.
diff --git a/www/py-django-treebeard/Makefile b/www/py-django-treebeard/Makefile
index a1d4ef0f533b..1a9605c1495f 100644
--- a/www/py-django-treebeard/Makefile
+++ b/www/py-django-treebeard/Makefile
@@ -28,7 +28,7 @@ DOCS_VARS= PYDISTUTILS_BUILD_TARGET+="build_sphinx -a -E"
.include <bsd.port.pre.mk>
# Set a locale to avoid build/configure errors. The UTF-8 mode is enabled by
# default when the locale is C since Python 3.7.
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
USE_LOCALE= en_US.UTF-8
.endif
diff --git a/www/py-fqdn/Makefile b/www/py-fqdn/Makefile
index ed5786fd6627..91c535519b31 100644
--- a/www/py-fqdn/Makefile
+++ b/www/py-fqdn/Makefile
@@ -15,7 +15,7 @@ NO_ARCH= yes
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cached-property>=1.3.0:devel/py-cached-property@${PY_FLAVOR}
.endif
diff --git a/www/py-hypercorn/Makefile b/www/py-hypercorn/Makefile
index f3d58c350d70..df7cdf7b7a38 100644
--- a/www/py-hypercorn/Makefile
+++ b/www/py-hypercorn/Makefile
@@ -42,7 +42,7 @@ UVLOOP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}uvloop>=0:devel/py-uvloop@${PY_FLAVOR
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/www/py-uvicorn/Makefile b/www/py-uvicorn/Makefile
index d05122870e0f..4fd77da47e93 100644
--- a/www/py-uvicorn/Makefile
+++ b/www/py-uvicorn/Makefile
@@ -33,7 +33,7 @@ WATCHGODRELOAD_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}watchgod>=0.6:devel/py-watchg
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/www/py-werkzeug/Makefile b/www/py-werkzeug/Makefile
index aa5d05ede3a0..f963798fac94 100644
--- a/www/py-werkzeug/Makefile
+++ b/www/py-werkzeug/Makefile
@@ -27,7 +27,7 @@ WATCHDOG_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}watchdog>=0:devel/py-watchdog@${PY_
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0:devel/py-dataclasses@${PY_FLAVOR}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>=0:devel/py-dataclasses@${PY_FLAVOR}
.endif
diff --git a/www/py-yarl/Makefile b/www/py-yarl/Makefile
index ee0aa6b3b137..f26876204499 100644
--- a/www/py-yarl/Makefile
+++ b/www/py-yarl/Makefile
@@ -33,7 +33,7 @@ do-test:
.include <bsd.port.pre.mk>
-.if ${PYTHON_REL} < 3800
+.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR}
.endif
diff --git a/www/qutebrowser/Makefile b/www/qutebrowser/Makefile
index 42eb57b60921..21435809c94b 100644
--- a/www/qutebrowser/Makefile
+++ b/www/qutebrowser/Makefile
@@ -48,11 +48,11 @@ DEPRECATED= Uses EOL Python 2.7 via www/qt5-webengine
EXPIRATION_DATE=2021-06-23
.endif
-.if ${PYTHON_REL} < 3700
+.if ${PYTHON_REL} < 30700
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dataclasses>0:devel/py-dataclasses@${PY_FLAVOR}
.endif
-.if ${PYTHON_REL} < 3900
+.if ${PYTHON_REL} < 30900
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-resources>0:devel/py-importlib-resources@${PY_FLAVOR}
.endif
diff --git a/x11-toolkits/py-tkinter/Makefile b/x11-toolkits/py-tkinter/Makefile
index 80acab7a4b73..7be65a54bfbb 100644
--- a/x11-toolkits/py-tkinter/Makefile
+++ b/x11-toolkits/py-tkinter/Makefile
@@ -27,7 +27,7 @@ PYDISTUTILS_INSTALLARGS+= --install-lib ${PYTHON_LIBDIR}/lib-dynload
.include <bsd.port.pre.mk>
post-extract:
-.if ${PYTHON_REL} < 3000
+.if ${PYTHON_REL} < 30000
@${SED} -e "s|%%TK_VER%%|${TK_VER}|" ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
.else
@${SED} -e "s|%%TK_VER%%|${TK_VER}|" ${FILESDIR}/setup3.py > ${WRKSRC}/setup.py
diff --git a/x11-wm/chamfer/Makefile b/x11-wm/chamfer/Makefile
index b10fbee9560c..b5bccd7f5c52 100644
--- a/x11-wm/chamfer/Makefile
+++ b/x11-wm/chamfer/Makefile
@@ -39,7 +39,7 @@ post-patch:
# XXX https://github.com/mesonbuild/meson/issues/4788
@${REINPLACE_CMD} -e '/boost/!s/python3/python-${PYTHON_VER}/' \
-e '/boost/s/python3/python${PYTHON_SUFFIX}/' \
- `if [ ${PYTHON_REL} -lt 3800 ]; then \
+ `if [ ${PYTHON_REL} -lt 30800 ]; then \
printf "%s %s" -e '/python.*embed/d'; \
fi` \
${WRKSRC}/meson.build