summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/cnpy/package.py
blob: b49556c659718e87224019236cf1717bd5b0e49e (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
# 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)

import sys

from spack.package import *


class Cnpy(CMakePackage):
    """cnpy: library to read/write .npy and .npz files in C/C++."""

    homepage = "https://github.com/rogersce/cnpy"
    git = "https://github.com/rogersce/cnpy.git"

    license("MIT")

    version("master", branch="master")

    depends_on("zlib-api", type="link")

    def cmake_args(self):
        args = []
        if sys.platform == "darwin":
            args.extend(["-DCMAKE_MACOSX_RPATH=ON"])

        return args