Date: Mon, 8 Apr 2024 12:42:21 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 0a4260b3a1a5 - main - Mk/Uses/python.mk: Introduce PY_EXCEPTIONGROUP Message-ID: <202404081242.438CgLG3049033@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=0a4260b3a1a599e94eca7a85d38f97214fb4606e commit 0a4260b3a1a599e94eca7a85d38f97214fb4606e Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-04-08 12:37:28 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-04-08 12:37:28 +0000 Mk/Uses/python.mk: Introduce PY_EXCEPTIONGROUP The minimal version is set to 1.1.1 because it is required by devel/py-cattrs. Convert ports to use PY_EXCEPTIONGROUP to simplify Makefile. With hat: python --- Mk/Uses/python.mk | 4 ++++ devel/ipython/Makefile | 5 +---- devel/py-anndata/Makefile | 9 ++------- devel/py-anyio/Makefile | 6 +++--- devel/py-anyio3/Makefile | 11 +++-------- devel/py-cattrs/Makefile | 6 +++--- devel/py-hypothesis/Makefile | 5 +---- devel/py-pytest/Makefile | 6 +++--- devel/py-scikit-build-core/Makefile | 14 ++++---------- net/py-trio-websocket/Makefile | 11 +++-------- net/py-trio/Makefile | 10 ++-------- 11 files changed, 29 insertions(+), 58 deletions(-) diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 229ad7bbda66..feb46eb9b70b 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -833,6 +833,10 @@ PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAV . endif # Common Python modules that can be needed but only for some versions of Python. +. if ${PYTHON_REL} < 31100 +PY_EXCEPTIONGROUP= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=1.1.1:devel/py-exceptiongroup@${PY_FLAVOR} +. endif + . if ${PYTHON_REL} >= 30000 PY_PILLOW= ${PYTHON_PKGNAMEPREFIX}pillow>=7.0.0:graphics/py-pillow@${PY_FLAVOR} . endif diff --git a/devel/ipython/Makefile b/devel/ipython/Makefile index ba8cef5680f9..a2000ea23c1c 100644 --- a/devel/ipython/Makefile +++ b/devel/ipython/Makefile @@ -17,6 +17,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING.rst BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=51.0.0:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}decorator>=0:devel/py-decorator@${PY_FLAVOR} \ + ${PY_EXCEPTIONGROUP} \ ${PYTHON_PKGNAMEPREFIX}jedi>=0.16:devel/py-jedi@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pexpect>=4.3:misc/py-pexpect@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}prompt-toolkit>=3.0.41<3.1.0:devel/py-prompt-toolkit@${PY_FLAVOR} \ @@ -43,10 +44,6 @@ OPTIONS_DEFINE= EXAMPLES RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR} .endif -.if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=0:devel/py-exceptiongroup@${PY_FLAVOR} -.endif - post-install-EXAMPLES-on: cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} diff --git a/devel/py-anndata/Makefile b/devel/py-anndata/Makefile index 59bd0cfeaa2c..55a20d23ff28 100644 --- a/devel/py-anndata/Makefile +++ b/devel/py-anndata/Makefile @@ -15,6 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0:devel/py-hatch-vcs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}array-api-compat>=1.4:devel/py-array-api-compat@${PY_FLAVOR} \ + ${PY_EXCEPTIONGROUP} \ ${PYTHON_PKGNAMEPREFIX}h5py>=3.1:science/py-h5py@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}natsort>=0:devel/py-natsort@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}numpy>=1.23,1:math/py-numpy@${PY_FLAVOR} \ @@ -27,10 +28,4 @@ USE_PYTHON= autoplist concurrent pep517 NO_ARCH= yes -.include <bsd.port.pre.mk> - -.if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=0:devel/py-exceptiongroup@${PY_FLAVOR} -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/devel/py-anyio/Makefile b/devel/py-anyio/Makefile index cabd7262c54c..1a4a5c557fa9 100644 --- a/devel/py-anyio/Makefile +++ b/devel/py-anyio/Makefile @@ -14,7 +14,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=61:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=6.4:devel/py-setuptools-scm@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}idna>=2.8:dns/py-idna@${PY_FLAVOR} \ +RUN_DEPENDS= ${PY_EXCEPTIONGROUP} \ + ${PYTHON_PKGNAMEPREFIX}idna>=2.8:dns/py-idna@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sniffio>=1.1:devel/py-sniffio@${PY_FLAVOR} USES= python @@ -30,8 +31,7 @@ TRIO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}trio>=0.23:net/py-trio@${PY_FLAVOR} .include <bsd.port.pre.mk> .if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=1.0.2:devel/py-exceptiongroup@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.1:devel/py-typing-extensions@${PY_FLAVOR} +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.1:devel/py-typing-extensions@${PY_FLAVOR} .endif .include <bsd.port.post.mk> diff --git a/devel/py-anyio3/Makefile b/devel/py-anyio3/Makefile index 97a68cd36c15..00c2ce3bc48b 100644 --- a/devel/py-anyio3/Makefile +++ b/devel/py-anyio3/Makefile @@ -15,7 +15,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=61:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=6.4:devel/py-setuptools-scm@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}idna>=2.8:dns/py-idna@${PY_FLAVOR} \ +RUN_DEPENDS= ${PY_EXCEPTIONGROUP} \ + ${PYTHON_PKGNAMEPREFIX}idna>=2.8:dns/py-idna@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sniffio>=1.1:devel/py-sniffio@${PY_FLAVOR} USES= python @@ -30,10 +31,4 @@ TRIO_DESC= Use trio as backend TRIO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}trio>=0.22:net/py-trio@${PY_FLAVOR} -.include <bsd.port.pre.mk> - -.if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=0:devel/py-exceptiongroup@${PY_FLAVOR} -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/devel/py-cattrs/Makefile b/devel/py-cattrs/Makefile index adb9acc7f865..7921745a355b 100644 --- a/devel/py-cattrs/Makefile +++ b/devel/py-cattrs/Makefile @@ -14,7 +14,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0:devel/py-hatch-vcs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>=23.1.0:devel/py-attrs@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>=23.1.0:devel/py-attrs@${PY_FLAVOR} \ + ${PY_EXCEPTIONGROUP} USES= python USE_PYTHON= autoplist concurrent pep517 @@ -24,8 +25,7 @@ NO_ARCH= yes .include <bsd.port.pre.mk> .if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=1.1.1:devel/py-exceptiongroup@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.1.0:devel/py-typing-extensions@${PY_FLAVOR} +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.1.0:devel/py-typing-extensions@${PY_FLAVOR} .endif .include <bsd.port.post.mk> diff --git a/devel/py-hypothesis/Makefile b/devel/py-hypothesis/Makefile index 73faa6384321..a532b77a11ae 100644 --- a/devel/py-hypothesis/Makefile +++ b/devel/py-hypothesis/Makefile @@ -16,6 +16,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>=22.2.0:devel/py-attrs@${PY_FLAVOR} \ + ${PY_EXCEPTIONGROUP} \ ${PYTHON_PKGNAMEPREFIX}rich>=9.0.0:textproc/py-rich@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sortedcontainers>=2.1.0<3.0.0:devel/py-sortedcontainers@${PY_FLAVOR} @@ -61,8 +62,4 @@ REDIS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}redis>=3.0.0:databases/py-redis@${PY_F RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}backports.zoneinfo>=0.2.1:devel/py-backports.zoneinfo@${PY_FLAVOR} .endif -.if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=1.0.0:devel/py-exceptiongroup@${PY_FLAVOR} -.endif - .include <bsd.port.post.mk> diff --git a/devel/py-pytest/Makefile b/devel/py-pytest/Makefile index 7ba24cbcc645..d354cc7e3ef1 100644 --- a/devel/py-pytest/Makefile +++ b/devel/py-pytest/Makefile @@ -15,7 +15,8 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=45.0:devel/py-setuptools@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=6.2.3:devel/py-setuptools-scm@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}iniconfig>=0:devel/py-iniconfig@${PY_FLAVOR} \ +RUN_DEPENDS= ${PY_EXCEPTIONGROUP} \ + ${PYTHON_PKGNAMEPREFIX}iniconfig>=0:devel/py-iniconfig@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pluggy>=0.12<2.0:devel/py-pluggy@${PY_FLAVOR} TEST_DEPENDS= bash:shells/bash \ @@ -46,8 +47,7 @@ CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}pytest4 .include <bsd.port.pre.mk> .if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=1.0.0:textproc/py-tomli@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=0:devel/py-exceptiongroup@${PY_FLAVOR} +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=1.0.0:textproc/py-tomli@${PY_FLAVOR} .endif # XXX: test_pdb_custom_cls_with_set_trace fails diff --git a/devel/py-scikit-build-core/Makefile b/devel/py-scikit-build-core/Makefile index 4d74f7875d35..85f5b1bd5f54 100644 --- a/devel/py-scikit-build-core/Makefile +++ b/devel/py-scikit-build-core/Makefile @@ -18,20 +18,15 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatch-fancy-pypi-readme>=0:devel/py-hatch- ${PYNUMPY} \ ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=20.9:devel/py-packaging@${PY_FLAVOR} -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pathspec>=0.10.1:devel/py-pathspec@${PY_FLAVOR} +RUN_DEPENDS= ${PY_EXCEPTIONGROUP} \ + ${PYTHON_PKGNAMEPREFIX}packaging>=20.9:devel/py-packaging@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pathspec>=0.10.1:devel/py-pathspec@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}build>=0.1:devel/py-build@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}cattrs>=22.2.0:devel/py-cattrs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pybind11>=0:devel/py-pybind11@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyproject-metadata>=0.5:devel/py-pyproject-metadata@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest-subprocess>=1.5:devel/py-pytest-subprocess@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} -py39_RUN_DEPENDS= \ - ${PYTHON_PKGNAMEPREFIX}exceptiongroup>0:devel/py-exceptiongroup@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}tomli>=1.1:textproc/py-tomli@${PY_FLAVOR} -py310_RUN_DEPENDS= \ - ${PYTHON_PKGNAMEPREFIX}exceptiongroup>0:devel/py-exceptiongroup@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}tomli>=1.1:textproc/py-tomli@${PY_FLAVOR} USES= python:3.9+ USE_PYTHON= pep517 autoplist pytest @@ -49,8 +44,7 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-resources>=1.3:devel/py-importlib .endif .if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>0:devel/py-exceptiongroup@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}tomli>=1.1:textproc/py-tomli@${PY_FLAVOR} +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=1.1:textproc/py-tomli@${PY_FLAVOR} .endif .include <bsd.port.post.mk> diff --git a/net/py-trio-websocket/Makefile b/net/py-trio-websocket/Makefile index 281a5e911f6a..078e4d24e575 100644 --- a/net/py-trio-websocket/Makefile +++ b/net/py-trio-websocket/Makefile @@ -11,7 +11,8 @@ WWW= https://github.com/python-trio/trio-websocket LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}trio>=0.11:net/py-trio@${PY_FLAVOR} \ +RUN_DEPENDS= ${PY_EXCEPTIONGROUP} \ + ${PYTHON_PKGNAMEPREFIX}trio>=0.11:net/py-trio@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wsproto>=0.14:net/py-wsproto@${PY_FLAVOR} USES= python @@ -19,10 +20,4 @@ USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes -.include <bsd.port.pre.mk> - -.if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=0:devel/py-exceptiongroup@${PY_FLAVOR} -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/net/py-trio/Makefile b/net/py-trio/Makefile index 1bb941134f41..cbe20f04f5a8 100644 --- a/net/py-trio/Makefile +++ b/net/py-trio/Makefile @@ -18,6 +18,7 @@ BUILD_DEPENDS= ${PY_SETUPTOOLS} \ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}async_generator>0:devel/py-async_generator@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}attrs>=19.2.0:devel/py-attrs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}cffi>=1.14:devel/py-cffi@${PY_FLAVOR} \ + ${PY_EXCEPTIONGROUP} \ ${PYTHON_PKGNAMEPREFIX}idna>0:dns/py-idna@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}outcome>0:devel/py-outcome@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sniffio>0:devel/py-sniffio@${PY_FLAVOR} \ @@ -35,14 +36,7 @@ USE_PYTHON= autoplist pep517 NO_ARCH= yes -.include <bsd.port.pre.mk> - -.if ${PYTHON_REL} < 31100 -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=1.0.0rc9:devel/py-exceptiongroup@${PY_FLAVOR} -TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=1.0.0rc9:devel/py-exceptiongroup@${PY_FLAVOR} -.endif - do-test: @cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -.include <bsd.port.post.mk> +.include <bsd.port.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404081242.438CgLG3049033>