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@
This commit is contained in:
Dmitry Marakasov 2021-04-10 02:15:37 +03:00
parent e3a7c4e0f3
commit 0729af4255
80 changed files with 101 additions and 93 deletions

View File

@ -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

View File

@ -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=""

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 ; \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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