git: 0da102b1c770 - main - net-p2p/py-pulsar-client: Apache Pulsar Python client library

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 04 Oct 2024 04:24:58 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0da102b1c77045930fca322f81d972ad43d7b66c

commit 0da102b1c77045930fca322f81d972ad43d7b66c
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-10-04 04:21:50 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-10-04 04:24:51 +0000

    net-p2p/py-pulsar-client: Apache Pulsar Python client library
---
 net-p2p/Makefile                   |  1 +
 net-p2p/py-pulsar-client/Makefile  | 41 ++++++++++++++++++++++++++++++++++++++
 net-p2p/py-pulsar-client/distinfo  |  3 +++
 net-p2p/py-pulsar-client/pkg-descr |  4 ++++
 4 files changed, 49 insertions(+)

diff --git a/net-p2p/Makefile b/net-p2p/Makefile
index 820986f6fb2d..aa2a5e1198c4 100644
--- a/net-p2p/Makefile
+++ b/net-p2p/Makefile
@@ -76,6 +76,7 @@
     SUBDIR += py-ed2k-tools
     SUBDIR += py-libtorrent-rasterbar
     SUBDIR += py-nicotine-plus
+    SUBDIR += py-pulsar-client
     SUBDIR += py-transmission-rpc
     SUBDIR += py-tremc
     SUBDIR += pyln-bolt7
diff --git a/net-p2p/py-pulsar-client/Makefile b/net-p2p/py-pulsar-client/Makefile
new file mode 100644
index 000000000000..e77f1cd0815a
--- /dev/null
+++ b/net-p2p/py-pulsar-client/Makefile
@@ -0,0 +1,41 @@
+PORTNAME=	pulsar-client
+DISTVERSIONPREFIX=	v
+DISTVERSION=	3.5.0
+CATEGORIES=	net-p2p python # machine-learning
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Apache Pulsar Python client library
+WWW=		https://pulsar.apache.org/
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	pybind11>0:devel/pybind11 \
+		gmake:devel/gmake
+LIB_DEPENDS=	libpulsar.so:net-p2p/pulsar-client-cpp
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}certifi>0:security/py-certifi@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}fastavro>=1.9.2:textproc/py-fastavro@${PY_FLAVOR}
+
+USES=		cmake:indirect python
+USE_PYTHON=	flavors
+USE_PYTHON=	distutils autoplist pytest
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	apache
+GH_PROJECT=	pulsar-client-python
+
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+pre-build: # build lib_pulse.so using cmake/gmake
+	@cd ${CONFIGURE_WRKSRC} && \
+		${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} && \
+		${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GMAKE}
+
+post-install: # strip binary
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_pulsar${PYTHON_EXT_SUFFIX}.so
+
+# tests: many tests fail with Pulsar error: TimeOut, Connection refused because Pulsar needs to be running
+# tests: 107 failed, 52 passed, 1 warning in 2947.08s (0:49:07)
+
+.include <bsd.port.mk>
diff --git a/net-p2p/py-pulsar-client/distinfo b/net-p2p/py-pulsar-client/distinfo
new file mode 100644
index 000000000000..37563e70678b
--- /dev/null
+++ b/net-p2p/py-pulsar-client/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1728006662
+SHA256 (apache-pulsar-client-python-v3.5.0_GH0.tar.gz) = 72126355be58eb53701f7a0e4652ea0a04386df449b6b34686f001bcbde04f65
+SIZE (apache-pulsar-client-python-v3.5.0_GH0.tar.gz) = 105327
diff --git a/net-p2p/py-pulsar-client/pkg-descr b/net-p2p/py-pulsar-client/pkg-descr
new file mode 100644
index 000000000000..8c1ee24b5d93
--- /dev/null
+++ b/net-p2p/py-pulsar-client/pkg-descr
@@ -0,0 +1,4 @@
+py-pulsar-client is a Pulsar Python client library.
+
+Pulsar Python clients support a variety of Pulsar features to enable building
+applications connecting to your Pulsar cluster.