Skip to content
Snippets Groups Projects

update branch

Merged Eleni Mathioulaki requested to merge master into test-spacktests-workaround
13 files
+ 282
8
Compare changes
  • Side-by-side
  • Inline
Files
13
+ 33
7
@@ -30,17 +30,43 @@ class Apbs(CMakePackage):
version('3.4.0', sha256='572ff606974119430020ec948c78e171d8525fb0e67a56dad937a897cac67461')
# Dependencies.
depends_on('cmake@3.19', type='build')
depends_on('python@3.8:3.10', type=('build', 'run'))
depends_on('blas', type=('build', 'run'))
depends_on('suite-sparse', type=('build', 'run'))
depends_on('maloc', type=('build', 'run'))
depends_on('cmake@3.19', type=('build'))
depends_on('bison', type=('build'))
depends_on('flex', type=('build'))
depends_on('swig', type=('build'))
depends_on('readline', type=('build', 'run'))
depends_on('eigen', type=('build', 'run'))
depends_on('boost', type=('build', 'run'))
depends_on('blas', type=('build', 'run'))
depends_on('arpack-ng', type=('build', 'run'))
depends_on('suite-sparse+tbb', type=('build', 'run'))
depends_on('maloc', type=('build', 'run'))
depends_on('python@3.8:3.10', type=('build', 'run'))
def cmake_args(self):
# Min and max Python versions need to be set as variables to pass tests.
# See tests/CMakeLists.txt lines 6-14.
python_version = str(self.spec['python'].version)
args = [
'-DPYTHON_MIN_VERSION=3.8',
'-DPYTHON_MAX_VERSION=3.10',
'-DPYTHON_MIN_VERSION='+python_version,
'-DPYTHON_MAX_VERSION='+python_version
]
return args
def setup_build_environment(self, env):
# add suite-sparse libs to path because tests can't find them
env.prepend_path("LD_LIBRARY_PATH", self.spec['suite-sparse'].prefix.lib)
@run_after('install')
@on_package_attributes(run_tests=True)
def install_test(self):
with working_dir(self.build_directory):
# for testing, apbs needs to be in the path
import os
os.environ['PATH'] = self.prefix.bin + ':' + os.environ['PATH']
ctest = which("ctest")
ctest("-C", "Release", "--output-on-failure")
def check(self):
# this would run "make test" before installation, so we override this and define install_test() instead
pass