summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-pyopencl/package.py
blob: 48cf56912e1001923221f87ad2356fcc6f7c6836 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


from spack.package import *


class PyPyopencl(PythonPackage):
    """Python wrapper for OpenCL."""

    homepage = "https://documen.tician.de/pyopencl/"
    pypi = "pyopencl/pyopencl-2020.2.2.tar.gz"

    maintainers("matthiasdiener")

    license("MIT")

    version("2020.2.2", sha256="31fcc79fb6862998e98d91a624c0bd4f0ab4c5d418d199912d4d312c64e437ec")

    depends_on("ocl-icd", type=("build", "link", "run"))
    depends_on("opencl", type=("build", "link", "run"))
    depends_on("python@3.6:", type=("build", "run"))
    depends_on("py-appdirs@1.4.0:", type=("build", "run"))
    depends_on("py-decorator@3.2.0:", type=("build", "run"))
    depends_on("py-mako@0.3.6:", type=("build", "run"))
    depends_on("py-numpy", type=("build", "run"))
    depends_on("py-pybind11@2.5.0:", type="build")
    depends_on("py-pytools@2017.6:", type=("build", "run"))
    depends_on("py-setuptools", type="build")
    depends_on("py-six", type=("build", "run"))

    @run_before("install")
    def prepare(self):
        cl_prefix = self.spec["ocl-icd"].prefix
        python(
            "configure.py", "--cl-inc-dir=" + cl_prefix.include, "--cl-lib-dir=" + cl_prefix.lib
        )