diff options
author | Sinan <sbulutw@gmail.com> | 2019-10-29 11:11:31 -0700 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-10-29 13:11:31 -0500 |
commit | 944ef2f6906beac587a08f2ef1d822dd6b13dffe (patch) | |
tree | d311653898ff4f2118073c7497c36e8533972dc0 | |
parent | 0a5c184a5dc76f0a85650e9f42cce94251d9791a (diff) | |
download | spack-944ef2f6906beac587a08f2ef1d822dd6b13dffe.tar.gz spack-944ef2f6906beac587a08f2ef1d822dd6b13dffe.tar.bz2 spack-944ef2f6906beac587a08f2ef1d822dd6b13dffe.tar.xz spack-944ef2f6906beac587a08f2ef1d822dd6b13dffe.zip |
new package: py-scs (#13477)
* new package: py-scs
* rename
* flake8
* Update var/spack/repos/builtin/packages/py-scs/package.py
Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>
-rw-r--r-- | var/spack/repos/builtin/packages/py-scs/package.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-scs/package.py b/var/spack/repos/builtin/packages/py-scs/package.py new file mode 100644 index 0000000000..88f251bd7d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-scs/package.py @@ -0,0 +1,43 @@ +# Copyright 2013-2019 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 import * + + +class PyScs(PythonPackage): + """SCS: splitting conic solver""" + + homepage = "https://github.com/cvxgrp/scs" + url = "https://www.pypi.io/packages/source/s/scs/scs-2.1.1-2.tar.gz" + + version('2.1.1-2', sha256='f816cfe3d4b4cff3ac2b8b96588c5960ddd2a3dc946bda6b09db04e7bc6577f2') + + variant('cuda', default=False, description="Also compile the GPU CUDA version of SCS") + variant('float32', default=False, description="Use 32 bit (single precision) floats, default is 64 bit") + variant('extra_verbose', default=False, description="Extra verbose SCS (for debugging)") + variant('int32', default=False, description="Use 32 bit ints") + variant('blas64', default=False, description="Use 64 bit ints for the blas/lapack libs") + + depends_on('py-setuptools', type='build') + depends_on('py-numpy@1.7:', type=('build', 'run')) + depends_on('py-scipy@0.13.2:', type=('build', 'run')) + + def build_args(self, spec, prefix): + args = [] + if '+cuda' in spec or '+float32' in spec or '+int32' in spec or\ + '+extra_verbose' in spec or '+blas64' in spec: + args = ['--scs'] + if '+cuda' in spec: + args.append('--gpu') + if '+float32' in spec: + args.append('--float') + if '+extra_verbose' in spec: + args.append('--extraverbose') + if '+int32' in spec: + args.append('--int') + if '+blas64' in spec: + args.append('--blas64') + return args |