aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-07-10 04:56:24 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-07-10 04:56:24 +0000
commit7c9c12e559e10f61ce54d437c9c8a2a0e33ac3f1 (patch)
treea066422a7e04bff076a38efb5f1d814f92949749
parenta37bfd5bd7d3fd5d4895250ffc7f11936e5b56ad (diff)
devel/py-multimethod: Add py-multimethod 1.12
Multimethod provides a decorator for adding multiple argument dispatching to functions. The decorator creates a multimethod object as needed, and registers the function with its annotations. There are several multiple dispatch libraries on PyPI. This one aims for simplicity and speed. With caching of argument types, it should be the fastest pure Python implementation possible.
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-multimethod/Makefile22
-rw-r--r--devel/py-multimethod/distinfo3
-rw-r--r--devel/py-multimethod/files/patch-pyproject.toml10
-rw-r--r--devel/py-multimethod/pkg-descr7
5 files changed, 43 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index fa0e63e43c94..0299ae5ecd70 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5135,6 +5135,7 @@
SUBDIR += py-msgspec
SUBDIR += py-mulpyplexer
SUBDIR += py-multi_key_dict
+ SUBDIR += py-multimethod
SUBDIR += py-multipart
SUBDIR += py-multipledispatch
SUBDIR += py-multiprocess
diff --git a/devel/py-multimethod/Makefile b/devel/py-multimethod/Makefile
new file mode 100644
index 000000000000..93771e0c78c5
--- /dev/null
+++ b/devel/py-multimethod/Makefile
@@ -0,0 +1,22 @@
+PORTNAME= multimethod
+PORTVERSION= 1.12
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Multiple argument dispatching
+WWW= https://coady.github.io/multimethod/ \
+ https://github.com/coady/multimethod
+
+LICENSE= APACHE20
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-multimethod/distinfo b/devel/py-multimethod/distinfo
new file mode 100644
index 000000000000..a4e800a3544e
--- /dev/null
+++ b/devel/py-multimethod/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1720536464
+SHA256 (multimethod-1.12.tar.gz) = 8db8ef2a8d2a247e3570cc23317680892fdf903d84c8c1053667c8e8f7671a67
+SIZE (multimethod-1.12.tar.gz) = 17423
diff --git a/devel/py-multimethod/files/patch-pyproject.toml b/devel/py-multimethod/files/patch-pyproject.toml
new file mode 100644
index 000000000000..8fdd51a494e5
--- /dev/null
+++ b/devel/py-multimethod/files/patch-pyproject.toml
@@ -0,0 +1,10 @@
+--- pyproject.toml.orig 2024-07-04 16:09:30 UTC
++++ pyproject.toml
+@@ -1,3 +1,7 @@
++[build-system]
++requires = ["setuptools"]
++build-backend = "setuptools.build_meta"
++
+ [project]
+ name = "multimethod"
+ version = "1.12"
diff --git a/devel/py-multimethod/pkg-descr b/devel/py-multimethod/pkg-descr
new file mode 100644
index 000000000000..fd98808fc003
--- /dev/null
+++ b/devel/py-multimethod/pkg-descr
@@ -0,0 +1,7 @@
+Multimethod provides a decorator for adding multiple argument dispatching to
+functions. The decorator creates a multimethod object as needed, and registers
+the function with its annotations.
+
+There are several multiple dispatch libraries on PyPI. This one aims for
+simplicity and speed. With caching of argument types, it should be the fastest
+pure Python implementation possible.