mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
New port: net/py-mpi4py: Python bindings for MPI
PR: 211768 Submitted by: Michael Danilov <mike.d.ft402@gmail.com>
This commit is contained in:
parent
cb67b8ce97
commit
3d517de43c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=480224
@ -1075,6 +1075,7 @@
|
||||
SUBDIR += py-matrix-synapse-ldap3
|
||||
SUBDIR += py-maxminddb
|
||||
SUBDIR += py-miniupnpc
|
||||
SUBDIR += py-mpi4py
|
||||
SUBDIR += py-msrplib
|
||||
SUBDIR += py-ndg_httpsclient
|
||||
SUBDIR += py-netaddr
|
||||
|
61
net/py-mpi4py/Makefile
Normal file
61
net/py-mpi4py/Makefile
Normal file
@ -0,0 +1,61 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= mpi4py
|
||||
DISTVERSION= 3.0.0
|
||||
CATEGORIES= net parallel python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= mike.d.ft402@gmail.com
|
||||
COMMENT= Python bindings for MPI
|
||||
|
||||
LICENSE= BSD2CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.rst
|
||||
|
||||
USES= python
|
||||
USE_PYTHON= distutils cython autoplist concurrent
|
||||
|
||||
OPTIONS_DEFINE= DOCS MANPAGES
|
||||
OPTIONS_SINGLE= MP
|
||||
OPTIONS_SINGLE_MP= MPICH2 OPENMPI OPENMPI2
|
||||
OPTIONS_DEFAULT= OPENMPI # the only non-failing MPI implementation
|
||||
MP_DESC= MPI Implementation
|
||||
|
||||
MPICH2_USES= fortran
|
||||
MPICH2_LIB_DEPENDS= libmpich.so:net/mpich2
|
||||
MPICH2_LDFLAGS= ${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so
|
||||
|
||||
OPENMPI_LIB_DEPENDS= libmpi.so:net/openmpi
|
||||
|
||||
OPENMPI2_DESC= ${OPENMPI_DESC} 2.x
|
||||
OPENMPI2_LIB_DEPENDS= libmpi.so:net/openmpi2
|
||||
|
||||
PORTDOCS= *
|
||||
|
||||
do-patch-OPENMPI-on:
|
||||
@${CP} ${FILESDIR}/mpi.cfg ${WRKSRC}/
|
||||
@${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/mpi.cfg
|
||||
|
||||
do-patch-OPENMPI2-on:
|
||||
@${CP} ${FILESDIR}/mpi2.cfg ${WRKSRC}/mpi.cfg
|
||||
@${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/mpi.cfg
|
||||
|
||||
do-install-DOCS-on:
|
||||
@${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}/man/man1
|
||||
@${ECHO} man/man1/mpi4py.1.gz >> ${TMPPLIST}
|
||||
|
||||
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>
|
3
net/py-mpi4py/distinfo
Normal file
3
net/py-mpi4py/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1537487949
|
||||
SHA256 (mpi4py-3.0.0.tar.gz) = b457b02d85bdd9a4775a097fac5234a20397b43e073f14d9e29b6cd78c68efd7
|
||||
SIZE (mpi4py-3.0.0.tar.gz) = 1426843
|
6
net/py-mpi4py/files/mpi.cfg
Normal file
6
net/py-mpi4py/files/mpi.cfg
Normal file
@ -0,0 +1,6 @@
|
||||
[mpi]
|
||||
mpi_dir = %%LOCALBASE%%/mpi/openmpi
|
||||
mpicc = %(mpi_dir)s/bin/mpicc
|
||||
mpicxx = %(mpi_dir)s/bin/mpicxx
|
||||
library_dirs = %(mpi_dir)s/lib
|
||||
runtime_library_dirs = %(library_dirs)s
|
6
net/py-mpi4py/files/mpi2.cfg
Normal file
6
net/py-mpi4py/files/mpi2.cfg
Normal file
@ -0,0 +1,6 @@
|
||||
[mpi]
|
||||
mpi_dir = %%LOCALBASE%%/mpi/openmpi2
|
||||
mpicc = %(mpi_dir)s/bin/mpicc
|
||||
mpicxx = %(mpi_dir)s/bin/mpicxx
|
||||
library_dirs = %(mpi_dir)s/lib
|
||||
runtime_library_dirs = %(library_dirs)s
|
25
net/py-mpi4py/files/patch-setup.py
Normal file
25
net/py-mpi4py/files/patch-setup.py
Normal file
@ -0,0 +1,25 @@
|
||||
--- 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 = []
|
5
net/py-mpi4py/pkg-descr
Normal file
5
net/py-mpi4py/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
This package provides Python bindings for the Message Passing Interface (MPI)
|
||||
standard. It is implemented on top of the MPI-1/MPI-2 specification and
|
||||
exposes an API which grounds on the standard MPI-2 C++ bindings
|
||||
|
||||
WWW: https://bitbucket.org/mpi4py/mpi4py/
|
Loading…
Reference in New Issue
Block a user