git: 989a4b109689 - main - devel/py-exceptiongroup: Add py-exceptiongroup 1.0.0rc8

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 16 Jun 2022 19:38:56 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=989a4b1096890f1759c8032b1e43fe6bac94ec61

commit 989a4b1096890f1759c8032b1e43fe6bac94ec61
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-06-16 19:30:52 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-06-16 19:30:52 +0000

    devel/py-exceptiongroup: Add py-exceptiongroup 1.0.0rc8
    
    This is a backport of the BaseExceptionGroup and ExceptionGroup classes from
    Python 3.11.
    
    It contains the following:
    - The exceptiongroup.BaseExceptionGroup and exceptiongroup.ExceptionGroup
      classes
    - A utility function (exceptiongroup.catch()) for catching exceptions possibly
      nested in an exception group
    - Patches to the TracebackException class that properly formats exception groups
      (installed on import)
    - An exception hook that handles formatting of exception groups through
      TracebackException (installed on import)
    
    If this package is imported on Python 3.11 or later, the built-in
    implementations of the exception group classes are used instead,
    TracebackException is not monkey patched and the exception hook won't be
    installed.
    
    WWW: https://github.com/agronholm/exceptiongroup
---
 devel/Makefile                         |  1 +
 devel/py-exceptiongroup/Makefile       | 23 +++++++++++++++++++++++
 devel/py-exceptiongroup/distinfo       |  3 +++
 devel/py-exceptiongroup/files/setup.py | 29 +++++++++++++++++++++++++++++
 devel/py-exceptiongroup/pkg-descr      | 19 +++++++++++++++++++
 5 files changed, 75 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 64422a8a4ffc..bccd4c6c1003 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4534,6 +4534,7 @@
     SUBDIR += py-eventlib
     SUBDIR += py-ewmh
     SUBDIR += py-exam
+    SUBDIR += py-exceptiongroup
     SUBDIR += py-executing
     SUBDIR += py-expiringdict
     SUBDIR += py-extras
diff --git a/devel/py-exceptiongroup/Makefile b/devel/py-exceptiongroup/Makefile
new file mode 100644
index 000000000000..f9c20d4e2164
--- /dev/null
+++ b/devel/py-exceptiongroup/Makefile
@@ -0,0 +1,23 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	exceptiongroup
+PORTVERSION=	1.0.0rc8
+CATEGORIES=	devel python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Backport of PEP 654 (exception groups)
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+post-patch:
+	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
+
+.include <bsd.port.mk>
diff --git a/devel/py-exceptiongroup/distinfo b/devel/py-exceptiongroup/distinfo
new file mode 100644
index 000000000000..cd29667b2f2b
--- /dev/null
+++ b/devel/py-exceptiongroup/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1655398642
+SHA256 (exceptiongroup-1.0.0rc8.tar.gz) = 6990c24f06b8d33c8065cfe43e5e8a4bfa384e0358be036af9cc60b6321bd11a
+SIZE (exceptiongroup-1.0.0rc8.tar.gz) = 11299
diff --git a/devel/py-exceptiongroup/files/setup.py b/devel/py-exceptiongroup/files/setup.py
new file mode 100644
index 000000000000..00fe7e9866ad
--- /dev/null
+++ b/devel/py-exceptiongroup/files/setup.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+# setup.py generated by flit for tools that don't yet use PEP 517
+
+from distutils.core import setup
+
+packages = \
+['exceptiongroup']
+
+package_data = \
+{'': ['*']}
+
+package_dir = \
+{'': 'src'}
+
+extras_require = \
+{'test': ['pytest >= 6']}
+
+setup(name='exceptiongroup',
+      version='%%PORTVERSION%%',
+      description='Backport of PEP 654 (exception groups)',
+      author=None,
+      author_email='Alex Grönholm <alex.gronholm@nextday.fi>',
+      url=None,
+      packages=packages,
+      package_data=package_data,
+      package_dir=package_dir,
+      extras_require=extras_require,
+      python_requires='>=3.7',
+     )
diff --git a/devel/py-exceptiongroup/pkg-descr b/devel/py-exceptiongroup/pkg-descr
new file mode 100644
index 000000000000..78040b7ee13c
--- /dev/null
+++ b/devel/py-exceptiongroup/pkg-descr
@@ -0,0 +1,19 @@
+This is a backport of the BaseExceptionGroup and ExceptionGroup classes from
+Python 3.11.
+
+It contains the following:
+- The exceptiongroup.BaseExceptionGroup and exceptiongroup.ExceptionGroup
+  classes
+- A utility function (exceptiongroup.catch()) for catching exceptions possibly
+  nested in an exception group
+- Patches to the TracebackException class that properly formats exception groups
+  (installed on import)
+- An exception hook that handles formatting of exception groups through
+  TracebackException (installed on import)
+
+If this package is imported on Python 3.11 or later, the built-in
+implementations of the exception group classes are used instead,
+TracebackException is not monkey patched and the exception hook won't be
+installed.
+
+WWW: https://github.com/agronholm/exceptiongroup