diff options
author | Ashwin Kumar <46030335+iamashwin99@users.noreply.github.com> | 2022-11-04 06:59:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 14:59:45 +0100 |
commit | bde4d1e38c3ee196d79fbd014d3f928f1c87cc13 (patch) | |
tree | f15b7f1efd4bc984795c0abfe589ca133032ddfb /var | |
parent | 49d7aa21fdd1c843a543e9972cde5b0d055c6d0b (diff) | |
download | spack-bde4d1e38c3ee196d79fbd014d3f928f1c87cc13.tar.gz spack-bde4d1e38c3ee196d79fbd014d3f928f1c87cc13.tar.bz2 spack-bde4d1e38c3ee196d79fbd014d3f928f1c87cc13.tar.xz spack-bde4d1e38c3ee196d79fbd014d3f928f1c87cc13.zip |
Octopus: refactor AutotoolsPackage (#33526)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/octopus/package.py | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/octopus/package.py b/var/spack/repos/builtin/packages/octopus/package.py index 3139eac3b5..7ff01e8633 100644 --- a/var/spack/repos/builtin/packages/octopus/package.py +++ b/var/spack/repos/builtin/packages/octopus/package.py @@ -5,12 +5,13 @@ import os +import llnl.util.filesystem as fs import llnl.util.tty as tty from spack.package import * -class Octopus(Package, CudaPackage): +class Octopus(AutotoolsPackage, CudaPackage): """A real-space finite-difference (time-dependent) density-functional theory code.""" @@ -55,10 +56,10 @@ class Octopus(Package, CudaPackage): variant("nlopt", default=False, description="Compile with nlopt") variant("debug", default=False, description="Compile with debug flags") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + depends_on("autoconf", type="build", when="@develop") + depends_on("automake", type="build", when="@develop") + depends_on("libtool", type="build", when="@develop") + depends_on("m4", type="build", when="@develop") depends_on("blas") depends_on("gsl@1.9:") @@ -90,7 +91,8 @@ class Octopus(Package, CudaPackage): # TODO: etsf-io, sparskit, # feast, libfm, pfft, isf, pnfft, poke - def install(self, spec, prefix): + def configure_args(self): + spec = self.spec lapack = spec["lapack"].libs blas = spec["blas"].libs args = [] @@ -211,12 +213,7 @@ class Octopus(Package, CudaPackage): args.append(fcflags) args.append(fflags) - autoreconf("-i") - configure(*args) - make() - # short tests take forever... - # make('check-short') - make("install") + return args @run_after("install") @on_package_attributes(run_tests=True) @@ -279,7 +276,7 @@ class Octopus(Package, CudaPackage): purpose = "Run Octopus recipe example" with working_dir("example-recipe", create=True): print("Current working directory (in example-recipe)") - copy(join_path(os.path.dirname(__file__), "test", "recipe.inp"), "inp") + fs.copy(join_path(os.path.dirname(__file__), "test", "recipe.inp"), "inp") self.run_test( exe, options=options, @@ -305,7 +302,7 @@ class Octopus(Package, CudaPackage): purpose = "Run tiny calculation for He" with working_dir("example-he", create=True): print("Current working directory (in example-he)") - copy(join_path(os.path.dirname(__file__), "test", "he.inp"), "inp") + fs.copy(join_path(os.path.dirname(__file__), "test", "he.inp"), "inp") self.run_test( exe, options=options, |