py-mpi4py: fix build with Apple Clang (#41362)

* py-mpi4py: fix build with Apple Clang

* [@spackbot] updating style on behalf of adamjstewart

---------

Co-authored-by: adamjstewart <adamjstewart@users.noreply.github.com>
This commit is contained in:
Adam J. Stewart 2023-12-01 12:33:14 +01:00 committed by GitHub
parent 2794e14870
commit d3aa7a620e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,7 @@ class PyMpi4py(PythonPackage):
git = "https://github.com/mpi4py/mpi4py.git"
version("master", branch="master")
version("3.1.5", sha256="a706e76db9255135c2fb5d1ef54cb4f7b0e4ad9e33cbada7de27626205f2a153")
version("3.1.4", sha256="17858f2ebc623220d0120d1fa8d428d033dde749c4bc35b33d81a66ad7f93480")
version("3.1.3", sha256="f1e9fae1079f43eafdd9f817cdb3fd30d709edc093b5d5dada57a461b2db3008")
version("3.1.2", sha256="40dd546bece8f63e1131c3ceaa7c18f8e8e93191a762cd446a8cfcf7f9cce770")
@ -29,14 +30,11 @@ class PyMpi4py(PythonPackage):
version("1.3.1", sha256="e7bd2044aaac5a6ea87a87b2ecc73b310bb6efe5026031e33067ea3c2efc3507")
depends_on("py-setuptools@40.9:", type="build")
depends_on("py-cython@0.27:2", type="build")
depends_on("mpi")
depends_on("py-cython@0.27.0:", type="build")
# https://github.com/mpi4py/mpi4py/pull/311
conflicts("^py-cython@3:")
def setup_build_environment(self, env):
env.set("MPICC", f"{self.spec['mpi'].mpicc} -shared")
env.set("MPICC", self.spec["mpi"].mpicc)
@run_before("install")
def cythonize(self):