git: 1c6078ca0dc6 - main - math/py-rpy2-rinterface: Add py-rpy2-rinterface 3.6.7

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 29 Sep 2026 19:27:27 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1c6078ca0dc6fea48e1f376119937f4f2c4c23d2

commit 1c6078ca0dc6fea48e1f376119937f4f2c4c23d2
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2026-09-29 18:55:01 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2026-09-29 19:17:28 +0000

    math/py-rpy2-rinterface: Add py-rpy2-rinterface 3.6.7
    
    The rpy2 package is a namespace package. This is the part of that package that
    covers the "low-level" interface to R used in rpy2. This provides mappings to
    access R's C-API and utilities to do so safely. It is otherwise relatively
    easily to crash (segfault) a process by calling R's C-API.
    
    This "low-level" is used by the higher-level (more Pythonic) interface
    rpy2.robjects and the extentions for ipython and jupyter notebooks in
    rpy2.ipython. It can also be used to implement alternative higher level
    interfaces, and with care be used in situation where a minimal interface or
    maximum performance is wanted.
---
 math/Makefile                                      |  1 +
 math/py-rpy2-rinterface/Makefile                   | 36 ++++++++++++++++++++++
 math/py-rpy2-rinterface/distinfo                   |  3 ++
 math/py-rpy2-rinterface/files/patch-pyproject.toml | 11 +++++++
 math/py-rpy2-rinterface/pkg-descr                  | 10 ++++++
 5 files changed, 61 insertions(+)

diff --git a/math/Makefile b/math/Makefile
index b0b7c4831175..073a74d34af3 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -1149,6 +1149,7 @@
     SUBDIR += py-resample
     SUBDIR += py-roman
     SUBDIR += py-rpy2
+    SUBDIR += py-rpy2-rinterface
     SUBDIR += py-rustworkx
     SUBDIR += py-rvlib
     SUBDIR += py-scikit-datasets
diff --git a/math/py-rpy2-rinterface/Makefile b/math/py-rpy2-rinterface/Makefile
new file mode 100644
index 000000000000..7d555223acec
--- /dev/null
+++ b/math/py-rpy2-rinterface/Makefile
@@ -0,0 +1,36 @@
+PORTNAME=	rpy2-rinterface
+PORTVERSION=	3.6.7
+CATEGORIES=	math python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	rpy2_rinterface-${PORTVERSION}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Low-level interface from Python to the R
+WWW=		https://rpy2.github.io/ \
+		https://github.com/rpy2/rpy2/tree/master/rpy2-rinterface \
+		https://github.com/rpy2/rpy2
+
+LICENSE=	GPLv2+
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.15.0:devel/py-cffi@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=61.0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+LIB_DEPENDS=	libR.so:math/R
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.15.0:devel/py-cffi@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+MAKE_ENV=	RPY2_CFFI_MODE=ANY
+
+OPTIONS_DEFINE=	NUMPY
+OPTIONS_DEFAULT=NUMPY
+NUMPY__DESC=	Numpy support
+
+NUMPY_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR}
+
+post-install:
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
+
+.include <bsd.port.mk>
diff --git a/math/py-rpy2-rinterface/distinfo b/math/py-rpy2-rinterface/distinfo
new file mode 100644
index 000000000000..c4767e808908
--- /dev/null
+++ b/math/py-rpy2-rinterface/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1790435628
+SHA256 (rpy2_rinterface-3.6.7.tar.gz) = 3aee0b44b9204d96c2eb2503b2f9b03f6d9c9e525f9a2d1a2e194b3a789856c1
+SIZE (rpy2_rinterface-3.6.7.tar.gz) = 82089
diff --git a/math/py-rpy2-rinterface/files/patch-pyproject.toml b/math/py-rpy2-rinterface/files/patch-pyproject.toml
new file mode 100644
index 000000000000..2b6f8cf3280d
--- /dev/null
+++ b/math/py-rpy2-rinterface/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+--- pyproject.toml.orig	2026-09-19 15:14:03 UTC
++++ pyproject.toml
+@@ -1,7 +1,6 @@ requires = [
+ [build-system]
+ requires = [
+-    "setuptools >= 75;python_version=='3.8'",
+-    "setuptools >= 77;python_version>'3.8'",
++    "setuptools >= 61",
+     "wheel",
+     "cffi>=1.15.0",
+     "packaging;platform_system=='Windows'",
diff --git a/math/py-rpy2-rinterface/pkg-descr b/math/py-rpy2-rinterface/pkg-descr
new file mode 100644
index 000000000000..e0c0450671c5
--- /dev/null
+++ b/math/py-rpy2-rinterface/pkg-descr
@@ -0,0 +1,10 @@
+The rpy2 package is a namespace package. This is the part of that package that
+covers the "low-level" interface to R used in rpy2. This provides mappings to
+access R's C-API and utilities to do so safely. It is otherwise relatively
+easily to crash (segfault) a process by calling R's C-API.
+
+This "low-level" is used by the higher-level (more Pythonic) interface
+rpy2.robjects and the extentions for ipython and jupyter notebooks in
+rpy2.ipython. It can also be used to implement alternative higher level
+interfaces, and with care be used in situation where a minimal interface or
+maximum performance is wanted.