New package: py-pymumps (#19526)
* New package: py-pymumps Python bindings for MUMPS, a parallel sparse direct solver * py-pymumps: fixing flake issues * py-pymumps: fix dependency types Following suggestion of @adamjstewart * Update var/spack/repos/builtin/packages/py-pymumps/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-pymumps/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-pymumps/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-pymumps/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-pymumps/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/py-pymumps/package.py Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
448ac2c68d
commit
0c0fa26b4c
46
var/spack/repos/builtin/packages/py-pymumps/package.py
Normal file
46
var/spack/repos/builtin/packages/py-pymumps/package.py
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
|
class PyPymumps(PythonPackage):
|
||||||
|
"""Python bindings for MUMPS, a parallel sparse direct solver"""
|
||||||
|
|
||||||
|
homepage = "http://github.com/pymumps/pymumps"
|
||||||
|
pypi = "PyMUMPS/PyMUMPS-0.3.2.tar.gz"
|
||||||
|
git = "https://github.com/PyMumps/pymumps.git"
|
||||||
|
|
||||||
|
# Add a list of GitHub accounts to notify when the
|
||||||
|
# package is updated
|
||||||
|
maintainers = ['payerle']
|
||||||
|
|
||||||
|
version('0.3.2', sha256='f290ec4850098f108fb91cb9e7fa07302ebf5076e4329f8e6ea4924de8ba35df')
|
||||||
|
|
||||||
|
depends_on('py-cython', type='build')
|
||||||
|
depends_on('py-setuptools', type='build')
|
||||||
|
depends_on('mumps', type='link')
|
||||||
|
depends_on('py-mpi4py', type=('build', 'run'))
|
||||||
|
|
||||||
|
# Patch to add libmumps_common.so to library dependencies
|
||||||
|
# See https://github.com/PyMumps/pymumps/issues/13
|
||||||
|
patch('py-pymumps.setup.patch')
|
||||||
|
|
||||||
|
phases = ['build_ext', 'install']
|
||||||
|
|
||||||
|
def build_ext_args(self, spec, prefix):
|
||||||
|
# Requires --library-dirs,
|
||||||
|
# '--libraries', spec['mumps'].prefix.libs, does not cut it
|
||||||
|
args = ['--include-dirs',
|
||||||
|
spec['mumps'].prefix.include,
|
||||||
|
'--library-dirs',
|
||||||
|
spec['mumps'].libs.directories[0],
|
||||||
|
'--rpath',
|
||||||
|
spec['mumps'].libs.directories[0],
|
||||||
|
'-l', 'dmumps',
|
||||||
|
'-l', 'mumps_common',
|
||||||
|
'-l', 'pord',
|
||||||
|
]
|
||||||
|
return args
|
@ -0,0 +1,15 @@
|
|||||||
|
# Add mumps_common to library list
|
||||||
|
# This is solution proposed in
|
||||||
|
# https://github.com/PyMumps/pymumps/issues/13
|
||||||
|
diff -Naur spack-src/setup.py spack-src.patched/setup.py
|
||||||
|
--- spack-src/setup.py 2018-11-05 16:57:21.000000000 -0500
|
||||||
|
+++ spack-src.patched/setup.py 2020-10-26 11:23:41.363767947 -0400
|
||||||
|
@@ -35,7 +35,7 @@
|
||||||
|
Extension(
|
||||||
|
'mumps._dmumps',
|
||||||
|
sources=['mumps/_dmumps.pyx'],
|
||||||
|
- libraries=['dmumps'],
|
||||||
|
+ libraries=['dmumps', 'mumps_common'],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
install_requires=['mpi4py'],
|
Loading…
Reference in New Issue
Block a user