@@ -0,0 +1,2216 @@
+# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other%0A# Spack Project Developers. See the top-level COPYRIGHT file for details.%0A#%0A# SPDX-License-Identifier: (Apache-2.0 OR MIT)%0A#%0A# ----------------------------------------------------------------------------%0A%0Afrom spack import *%0A%0A%0Aclass PyPykokkosBase(CMakePackage, PythonPackage):%0A    '''Minimal set of bindings for Kokkos interoperability with Python%0A    (initialize, finalize, View, DynRankView, Kokkos-tools)'''%0A%0A    homepage = 'https://github.com/kokkos/pykokkos-base.git'%0A    git = 'https://github.com/kokkos/pykokkos-base.git'%0A    maintainers = %5B'jrmadsen'%5D%0A%0A    version('main', branch='main', submodules=False)%0A    version('0.0.5', commit='45f6e892c007ab124fabb3a545f4744537eafb55', submodules=False)%0A    version('0.0.4', commit='2efe1220d0128d3f2d371c9ed5234c4978d73a77', submodules=False)%0A    version('0.0.3', commit='4fe4421ac624ba2efe1eee265153e690622a18a5', submodules=False)%0A%0A    variant(%0A        'layouts',%0A        default=True,%0A        description='Build Kokkos View/DynRankView with layout variants',%0A    )%0A    variant(%0A        'memory_traits',%0A        default=True,%0A        description='Build Kokkos View/DynRankView with memory trait variants',%0A    )%0A    variant(%0A        'view_ranks',%0A        default='4',%0A        description='Max Kokkos View dimensions',%0A        values=('1', '2', '3', '4', '5', '6', '7'),%0A        multi=False,%0A    )%0A%0A    extends('python')%0A    depends_on('cmake@3.16:', type='build')%0A    depends_on('py-pybind11', type='build')%0A    depends_on('kokkos@3.4.00:', type=('build', 'run'))%0A    depends_on('python@3:', type=('build', 'run'))%0A%0A    def cmake_args(self):%0A        spec = self.spec%0A%0A        args = %5B%0A            self.define('ENABLE_INTERNAL_KOKKOS', False),%0A            self.define('ENABLE_INTERNAL_PYBIND11', False),%0A            self.define('PYTHON_EXECUTABLE', spec%5B'python'%5D.command.path),%0A            self.define('Python3_EXECUTABLE', spec%5B'python'%5D.command.path),%0A            self.define_from_variant('ENABLE_VIEW_RANKS', 'view_ranks'),%0A        %5D%0A%0A        for dep in ('layouts', 'memory_traits'):%0A            args.append(self.define_from_variant('ENABLE_' + dep.upper(), dep))%0A%0A        return args%0A

Create pykokkos-base package (#24054)