@@ -0,0 +1,1446 @@
+# Copyright 2013-2020 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%0Aclass PyTfdlpack(CMakePackage):%0A    %22%22%22Tensorflow plugin for DLPack.%22%22%22%0A%0A    homepage = %22https://github.com/VoVAllen/tf-dlpack%22%0A    git      = %22https://github.com/VoVAllen/tf-dlpack.git%22%0A%0A    maintainers = %5B'adamjstewart'%5D%0A%0A    version('master', branch='master', submodules=True)%0A    version('0.1.1', tag='v0.1.1', submodules=True)%0A%0A    variant('cuda', default=True, description='Build with CUDA support')%0A%0A    depends_on('cmake@3.5:', type='build')%0A    depends_on('cuda', when='+cuda')%0A%0A    # Python dependencies%0A    extends('python')%0A    depends_on('py-setuptools', type='build')%0A    depends_on('py-tensorflow', type=('build', 'run'))%0A%0A    def cmake_args(self):%0A        args = %5B'-DPYTHON_EXECUTABLE=' + self.spec%5B'python'%5D.command.path%5D%0A%0A        if '+cuda' in self.spec:%0A            args.append('-DUSE_CUDA=ON')%0A        else:%0A            args.append('-DUSE_CUDA=OFF')%0A%0A        return args%0A%0A    def install(self, spec, prefix):%0A        with working_dir('python'):%0A            setup_py('install', '--prefix=' + prefix,%0A                     '--single-version-externally-managed', '--root=/')%0A%0A    def setup_run_environment(self, env):%0A        # Prevent TensorFlow from taking over the whole GPU%0A        env.set('TF_FORCE_GPU_ALLOW_GROWTH', 'true')%0A

add new package (#15583)