From 5c6153ce0dabe2989bc1c9b7e8a349cb6ff62fcb Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Wed, 30 Sep 2020 17:24:26 -0700 Subject: timemory: created +python_deps variant (#18472) * Created +python_deps variant - the timemory python bindings can still be imported without these runtime packages and forcing a dependence by default significantly increases the spack install time * Added conflict - added conflicts('+python_deps', when='~python') --- var/spack/repos/builtin/packages/timemory/package.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/timemory/package.py b/var/spack/repos/builtin/packages/timemory/package.py index 96de85cfe9..7add541617 100644 --- a/var/spack/repos/builtin/packages/timemory/package.py +++ b/var/spack/repos/builtin/packages/timemory/package.py @@ -25,6 +25,9 @@ class Timemory(CMakePackage): variant('shared', default=True, description='Build shared libraries') variant('static', default=False, description='Build static libraries') variant('python', default=False, description='Enable Python support') + variant('python_deps', default=False, + description='Install non-critical python dependencies ' + '(may significantly increase spack install time)') variant('mpi', default=False, description='Enable support for MPI aggregation') variant('nccl', default=False, @@ -92,12 +95,12 @@ class Timemory(CMakePackage): extends('python', when='+python') depends_on('python@3:', when='+python', type=('build', 'run')) - depends_on('py-numpy', when='+python', type=('run')) - depends_on('pil', when='+python', type=('run')) - depends_on('py-matplotlib', when='+python', type=('run')) - depends_on('py-mpi4py', when='+python+mpi', type=('run')) depends_on('py-cython', when='+python', type=('build')) - depends_on('py-ipython', when='+python', type=('run')) + depends_on('pil', when='+python+python_deps', type=('run')) + depends_on('py-numpy', when='+python+python_deps', type=('run')) + depends_on('py-matplotlib', when='+python+python_deps', type=('run')) + depends_on('py-ipython', when='+python+python_deps', type=('run')) + depends_on('py-mpi4py', when='+python+mpi+python_deps', type=('run')) depends_on('mpi', when='+mpi') depends_on('nccl', when='+nccl') depends_on('tau', when='+tau') @@ -117,6 +120,7 @@ class Timemory(CMakePackage): conflicts('+python', when='~shared', msg='+python requires building shared libraries') + conflicts('+python_deps', when='~python') conflicts('+cupti', when='~cuda', msg='CUPTI requires CUDA') conflicts('+kokkos_tools', when='~tools', msg='+kokkos_tools requires +tools') -- cgit v1.2.3-70-g09d2