git: 907f3f00bc41 - main - net/py-mpi4py: Update 3.1.6 → 4.0.0

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Sun, 01 Sep 2024 15:58:11 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=907f3f00bc41d3cc836425afc8eba4bc5510da65

commit 907f3f00bc41d3cc836425afc8eba4bc5510da65
Author:     Laurent Chardon <laurent.chardon@gmail.com>
AuthorDate: 2024-09-01 15:48:07 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-09-01 15:57:59 +0000

    net/py-mpi4py: Update 3.1.6 → 4.0.0
    
    Backward-incompatible changes:
      * Python 2 is no longer supported, Python 3.6+ is required, but
        typing stubs are supported for Python 3.8+.
      * The Intracomm.Create_group() method is no longer defined in the
        base Comm class.
      * Group.Compare() and Comm.Compare() are no longer class methods
        but instance methods. Existing codes using the former class
        methods are expected to continue working.
      * Group.Translate_ranks() is no longer a class method but an
        instance method. Existing codes using the former class method are
        expected to continue working.
      * The LB and UB datatypes are no longer available, use
        Datatype.Create_resized() instead.
      * The HOST predefined attribute key is no longer available.
      * The MPI.memory class has been renamed to MPI.buffer. The old
        name is still available as an alias to the new name.
      * The mpi4py.dl module is no longer available.
      * The mpi4py.get_config function returns an empty dictionary.
    
    Changelog:
    https://github.com/mpi4py/mpi4py/releases/tag/4.0.0
    
    Exp-run looks fine.
    
    Take maintainership.
    
    PR:     280883
---
 net/py-mpi4py/Makefile             | 51 ++++++++++++++++++--------------------
 net/py-mpi4py/distinfo             |  6 ++---
 net/py-mpi4py/files/patch-setup.py | 25 -------------------
 3 files changed, 27 insertions(+), 55 deletions(-)

diff --git a/net/py-mpi4py/Makefile b/net/py-mpi4py/Makefile
index 91f02956cc62..19428fa21cee 100644
--- a/net/py-mpi4py/Makefile
+++ b/net/py-mpi4py/Makefile
@@ -1,38 +1,40 @@
 PORTNAME=	mpi4py
-DISTVERSION=	3.1.6
+DISTVERSION=	4.0.0
 CATEGORIES=	net parallel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	laurent.chardon@gmail.com
 COMMENT?=	Python bindings for MPI (OpenMPI)
 WWW=		https://github.com/mpi4py/mpi4py
 
-LICENSE=	BSD2CLAUSE
+LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE.rst
 
-USES=		python
-USE_PYTHON=	distutils cython autoplist concurrent
-LDFLAGS+=	${MPI_LIBS}
-
-SLAVEDIRS=	net/py-mpi4py-mpich
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cython3>3.0.0:lang/cython3@${PY_FLAVOR}
 
-OPTIONS_DEFINE=		DOCS MANPAGES
-
-MP?=		OPENMPI
+USES=		pkgconfig python
+USE_PYTHON=	autoplist concurrent distutils
 
+MP?=			OPENMPI
 .if ${MP} == "OPENMPI"
-USES+=		mpi:openmpi
-CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}mpi4py-mpich-3*
+USES+=			mpi:openmpi
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}mpi4py-mpich-4*
 .elif ${MP} == "MPICH"
-USES+=		fortran mpi:mpich
-LDFLAGS+=	${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so
-CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}mpi4py-3*
+USES+=			fortran mpi:mpich
+LDFLAGS+=		${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}mpi4py-4*
 .else
-BROKEN=		invalid parameter MP
+BROKEN=			invalid parameter MP
 .endif
 
-PORTDOCS=		*
+LDFLAGS+=	${MPI_LIBS}
+
+#SLAVEDIRS=	net/py-mpi4py-mpich
+
+OPTIONS_DEFINE=	DOCS
+
+PORTDOCS=	*
 
 pre-configure:
 	${CP} ${FILESDIR}/mpi.cfg ${WRKSRC}/
@@ -40,19 +42,14 @@ pre-configure:
 		${WRKSRC}/mpi.cfg
 
 do-install-DOCS-on:
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README.rst ${STAGEDIR}${DOCSDIR}
-	cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
-	@${RM} ${STAGEDIR}${DOCSDIR}/${PORTNAME}.1
-
-do-install-MANPAGES-on:
-	${INSTALL_MAN} ${WRKSRC}/docs/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/share/man/man1
-	@${ECHO} share/man/man1/mpi4py.1.gz >> ${TMPPLIST}
+	(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
 
 post-install:
-	@cd ${STAGEDIR}${PYTHON_SITELIBDIR}/mpi4py && ${STRIP_CMD} dl*.so MPI*.so lib-pmpi/libvt-hyb*.so lib-pmpi/libvt*.so lib-pmpi/libvt-mpi*.so lib-pmpi/libmpe*.so
+	(cd ${STAGEDIR}${PYTHON_SITELIBDIR}/mpi4py && ${STRIP_CMD} *.so)
 
 do-test:
-	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
+	(cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test)
 
 .include <bsd.port.mk>
diff --git a/net/py-mpi4py/distinfo b/net/py-mpi4py/distinfo
index 31efbbe75c85..0c619ca2d207 100644
--- a/net/py-mpi4py/distinfo
+++ b/net/py-mpi4py/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1715064619
-SHA256 (mpi4py-3.1.6.tar.gz) = c8fa625e0f92b082ef955bfb52f19fa6691d29273d7d71135d295aa143dee6cb
-SIZE (mpi4py-3.1.6.tar.gz) = 2365468
+TIMESTAMP = 1723400617
+SHA256 (mpi4py-4.0.0.tar.gz) = 820d31ae184d69c17d9b5d55b1d524d56be47d2e6cb318ea4f3e7007feff2ccc
+SIZE (mpi4py-4.0.0.tar.gz) = 464833
diff --git a/net/py-mpi4py/files/patch-setup.py b/net/py-mpi4py/files/patch-setup.py
deleted file mode 100644
index 8eecac4eec0a..000000000000
--- a/net/py-mpi4py/files/patch-setup.py
+++ /dev/null
@@ -1,25 +0,0 @@
---- setup.py.orig	2017-11-25 07:11:10 UTC
-+++ setup.py
-@@ -174,10 +174,10 @@ def configure_dl(ext, config_cmd):
-     log.info("checking for dlopen() availability ...")
-     ok = config_cmd.check_header('dlfcn.h')
-     if ok : ext.define_macros += [('HAVE_DLFCN_H', 1)]
--    ok = config_cmd.check_library('dl')
--    if ok: ext.libraries += ['dl']
-+    #ok = config_cmd.check_library('dl')
-+    #if ok: ext.libraries += ['dl']
-     ok = config_cmd.check_function('dlopen',
--                                   libraries=['dl'],
-+                                   #libraries=['dl'],
-                                    decl=1, call=1)
-     if ok: ext.define_macros += [('HAVE_DLOPEN', 1)]
- 
-@@ -287,7 +287,7 @@ def configure_libvt(lib, config_cmd):
-         log_lib = 'vt.ompi'
-     else:
-         log_lib = 'vt.mpi'
--    dep_libs = ('dl', 'z', 'otf',)
-+    dep_libs = ('z', 'otf',)
-     ok = config_cmd.check_library(log_lib, lib.library_dirs)
-     if not ok: return
-     libraries = []