2022-01-13 03:21:41 +08:00
|
|
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2017-08-08 02:41:13 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2018-02-01 01:38:53 +08:00
|
|
|
import sys
|
|
|
|
|
2021-07-09 06:12:30 +08:00
|
|
|
from spack import *
|
|
|
|
|
2017-08-08 02:41:13 +08:00
|
|
|
|
|
|
|
class Cnpy(CMakePackage):
|
|
|
|
"""cnpy: library to read/write .npy and .npz files in C/C++."""
|
|
|
|
|
|
|
|
homepage = "https://github.com/rogersce/cnpy"
|
2018-07-23 15:00:15 +08:00
|
|
|
git = "https://github.com/rogersce/cnpy.git"
|
2017-08-08 02:41:13 +08:00
|
|
|
|
2018-07-23 15:00:15 +08:00
|
|
|
version('master', branch='master')
|
2018-02-01 01:38:53 +08:00
|
|
|
|
2019-10-03 01:54:31 +08:00
|
|
|
depends_on('zlib', type='link')
|
|
|
|
|
2018-02-01 01:38:53 +08:00
|
|
|
def cmake_args(self):
|
|
|
|
args = []
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
args.extend(['-DCMAKE_MACOSX_RPATH=ON'])
|
|
|
|
|
|
|
|
return args
|