Add two critical fixes and update for version 1.0.4 (#30507)

This commit is contained in:
Jim Galarowicz 2022-05-05 17:37:52 -07:00 committed by GitHub
parent 202214d855
commit 3137e7c61b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,7 @@ class Survey(CMakePackage):
maintainers = ['jgalarowicz']
version('master', branch='master')
version('1.0.4', branch='1.0.4')
version('1.0.3', tag='1.0.3')
version('1.0.2', tag='1.0.2')
version('1.0.1.1', tag='1.0.1.1')
@ -42,7 +43,7 @@ class Survey(CMakePackage):
variant('mpi', default=False,
description="Enable mpi, build MPI data collector")
variant('tls_model', default='implicit',
variant('tls_model', default='explicit',
description='The TLS model to build with',
values=('implicit', 'explicit'))
@ -61,7 +62,7 @@ class Survey(CMakePackage):
# MPI Installation
depends_on("mpi", when="+mpi")
depends_on("python@3:", type=('build', 'link', 'run'))
depends_on("python@3:", type=('build', 'run'))
depends_on("py-setuptools", type='build')
depends_on("py-pip", type='build')
depends_on("py-pandas", type=('build', 'run'))
@ -71,6 +72,7 @@ class Survey(CMakePackage):
depends_on("py-seaborn", type=('build', 'run'), when='@1.0.3:')
depends_on("py-jinja2", type=('build', 'run'), when='@1.0.3:')
depends_on("py-matplotlib", type=('build', 'run'), when='@1.0.3:')
depends_on("py-more-itertools", type=('build', 'run'), when='@1.0.4:')
extends('python')
@ -103,8 +105,10 @@ def cmake_args(self):
]
# Add any MPI implementations coming from variant settings
mpi_options = self.get_mpi_cmake_options(spec)
cmake_args.extend(mpi_options)
if '+mpi' in spec:
mpi_options = self.get_mpi_cmake_options(spec)
cmake_args.extend(mpi_options)
return cmake_args
def setup_run_environment(self, env):
@ -112,6 +116,8 @@ def setup_run_environment(self, env):
# Set SURVEY_MPI_IMPLEMENTATON to the appropriate mpi implementation
# This is needed by survey to deploy the correct mpi runtimes.
env.set('SURVEY_MPI_IMPLEMENTATION', self.spec['mpi'].name.lower())
if '+mpi' in self.spec:
env.set('SURVEY_MPI_IMPLEMENTATION', self.spec['mpi'].name.lower())
# For compatibility reasons we need
env.prepend_path('PATH', self.spec['python'].prefix.bin)