Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Aug 2023 08:31:51 GMT
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6d82be95de6c - main - net/py-mpi4py: add a slave port depending on MPICH
Message-ID:  <202308050831.3758VpKa040311@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6d82be95de6c9dee7264b2b349823bd31a58e943

commit 6d82be95de6c9dee7264b2b349823bd31a58e943
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2023-08-04 21:05:10 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2023-08-05 08:20:45 +0000

    net/py-mpi4py: add a slave port depending on MPICH
    
    Sometimes we need mpi4py packaged against mpich, with Fortran enabled.
    
    Do not create a flavor, because there already exist flavors for Python
    versions, therefore a slave port seems more appropriate.
    
    Once committed, I shall add a line in Mk/Uses/mpi.mk to grab the right
    dependency according to the choice of MPI.
    
    Bump PORTVERSION for people using net/py-mpi4py built from ports with
    the non-default MPICH option.
    
    Also change WWW: the project on bitbucket has been archived.
    
    PR:             272949
    Approved by:    wen@ (maintainer)
---
 net/Makefile                 |  1 +
 net/py-mpi4py-mpich/Makefile | 11 +++++++++++
 net/py-mpi4py/Makefile       | 28 ++++++++++++++++------------
 3 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/net/Makefile b/net/Makefile
index bd43587b6128..fb1d8cb18380 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1080,6 +1080,7 @@
     SUBDIR += py-maxminddb
     SUBDIR += py-miniupnpc
     SUBDIR += py-mpi4py
+    SUBDIR += py-mpi4py-mpich
     SUBDIR += py-msrplib
     SUBDIR += py-ndg-httpsclient
     SUBDIR += py-netaddr
diff --git a/net/py-mpi4py-mpich/Makefile b/net/py-mpi4py-mpich/Makefile
new file mode 100644
index 000000000000..c1761bdc0868
--- /dev/null
+++ b/net/py-mpi4py-mpich/Makefile
@@ -0,0 +1,11 @@
+PORTNAME=	mpi4py
+
+COMMENT=	Python bindings for MPI (MPICH)
+
+PKGNAMESUFFIX=	-mpich
+
+MASTERDIR=	${.CURDIR}/../py-mpi4py
+
+MP=		MPICH
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/py-mpi4py/Makefile b/net/py-mpi4py/Makefile
index 681d48c1ed09..5c26ca7a2360 100644
--- a/net/py-mpi4py/Makefile
+++ b/net/py-mpi4py/Makefile
@@ -1,13 +1,13 @@
 PORTNAME=	mpi4py
 DISTVERSION=	3.1.4
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net parallel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	wen@FreeBSD.org
-COMMENT=	Python bindings for MPI
-WWW=		https://bitbucket.org/mpi4py/mpi4py/
+COMMENT?=	Python bindings for MPI (OpenMPI)
+WWW=		https://github.com/mpi4py/mpi4py
 
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE.rst
@@ -16,16 +16,22 @@ USES=		python
 USE_PYTHON=	distutils cython autoplist concurrent
 LDFLAGS+=	${MPI_LIBS}
 
+SLAVEDIRS=	net/py-mpi4py-mpich
+
 OPTIONS_DEFINE=		DOCS MANPAGES
-OPTIONS_SINGLE=		MP
-OPTIONS_SINGLE_MP=	MPICH OPENMPI
-OPTIONS_DEFAULT=	OPENMPI # the only non-failing MPI implementation
-MP_DESC=		MPI Implementation
 
-MPICH_USES=		fortran mpi:mpich
-MPICH_LDFLAGS=		${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so
+MP?=		OPENMPI
 
-OPENMPI_USES=		mpi:openmpi
+.if ${MP} == "OPENMPI"
+USES+=		mpi:openmpi
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}mpi4py-mpich-3*
+.elif ${MP} == "MPICH"
+USES+=		fortran mpi:mpich
+LDFLAGS+=	${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so
+CONFLICTS_INSTALL=	${PYTHON_PKGNAMEPREFIX}mpi4py-3*
+.else
+BROKEN=		invalid parameter MP
+.endif
 
 PORTDOCS=		*
 
@@ -48,8 +54,6 @@ 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
 
 do-test:
-	# tests fail with MPICH2=on: https://bitbucket.org/mpi4py/mpi4py/issues/110/tests-fail-with-mpich2-on-freebsd-error
-	# tests fail with OPENMPI2=on: https://bitbucket.org/mpi4py/mpi4py/issues/109/tests-fail-with-openmpi2-on-freebsd
 	@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
 
 .include <bsd.port.mk>



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