Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2023 23:50:56 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: f272d12c8ebc - main - devel/py-overrides: Add py-overrides 7.3.1
Message-ID:  <202305272350.34RNou9Z052409@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=f272d12c8ebc92f75a1f64829b5deee144554991

commit f272d12c8ebc92f75a1f64829b5deee144554991
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-05-27 23:18:16 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-05-27 23:43:35 +0000

    devel/py-overrides: Add py-overrides 7.3.1
    
    A decorator @override that verifies that a method that should override an
    inherited method actually does it.
    
    Copies the docstring of the inherited method to the overridden method.
    
    Since signature validation and docstring inheritance are performed on class
    creation and not on class instantiation, this library significantly improves the
    safety and experience of creating class hierarchies in Python without
    significantly impacting performance. See https://stackoverflow.com/q/1167617 for
    the initial inspiration for this library.
---
 devel/Makefile               |  1 +
 devel/py-overrides/Makefile  | 19 +++++++++++++++++++
 devel/py-overrides/distinfo  |  3 +++
 devel/py-overrides/pkg-descr | 10 ++++++++++
 4 files changed, 33 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index c4395d264c29..6a60af3bf0bc 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5048,6 +5048,7 @@
     SUBDIR += py-oslotest
     SUBDIR += py-osprofiler
     SUBDIR += py-outcome
+    SUBDIR += py-overrides
     SUBDIR += py-ovs
     SUBDIR += py-ovsdbapp
     SUBDIR += py-p4python
diff --git a/devel/py-overrides/Makefile b/devel/py-overrides/Makefile
new file mode 100644
index 000000000000..4df40682743c
--- /dev/null
+++ b/devel/py-overrides/Makefile
@@ -0,0 +1,19 @@
+PORTNAME=	overrides
+PORTVERSION=	7.3.1
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Decorator to automatically detect mismatch when overriding a method
+WWW=		https://github.com/mkorpela/overrides
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-overrides/distinfo b/devel/py-overrides/distinfo
new file mode 100644
index 000000000000..2fa05aeafaa2
--- /dev/null
+++ b/devel/py-overrides/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1685162014
+SHA256 (overrides-7.3.1.tar.gz) = 8b97c6c1e1681b78cbc9424b138d880f0803c2254c5ebaabdde57bb6c62093f2
+SIZE (overrides-7.3.1.tar.gz) = 24766
diff --git a/devel/py-overrides/pkg-descr b/devel/py-overrides/pkg-descr
new file mode 100644
index 000000000000..cc067b6f1783
--- /dev/null
+++ b/devel/py-overrides/pkg-descr
@@ -0,0 +1,10 @@
+A decorator @override that verifies that a method that should override an
+inherited method actually does it.
+
+Copies the docstring of the inherited method to the overridden method.
+
+Since signature validation and docstring inheritance are performed on class
+creation and not on class instantiation, this library significantly improves the
+safety and experience of creating class hierarchies in Python without
+significantly impacting performance. See https://stackoverflow.com/q/1167617 for
+the initial inspiration for this library.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305272350.34RNou9Z052409>