summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJen Herting <jen@herting.cc>2021-02-12 14:34:08 -0500
committerGitHub <noreply@github.com>2021-02-12 13:34:08 -0600
commit4649a251e6e56b3009bf7bbc9780d0d947e19bdd (patch)
tree94b7b8dff21020c9c61a3395bd77df8742b4ff4d /var
parent5a771bc8ad3ddb1b3f550f1685c451cc6cb49e64 (diff)
downloadspack-4649a251e6e56b3009bf7bbc9780d0d947e19bdd.tar.gz
spack-4649a251e6e56b3009bf7bbc9780d0d947e19bdd.tar.bz2
spack-4649a251e6e56b3009bf7bbc9780d0d947e19bdd.tar.xz
spack-4649a251e6e56b3009bf7bbc9780d0d947e19bdd.zip
New package: py-lightgbm (#21649)
* [py-lightgbm] created template * [py-lightgbm] added homepage and description * [py-lightgbm] added dependencies * [py-lightgbm] build requires cmake * [py-lightgbm] added mpi variant * [py-lightgbm] removed fixmes * [py-lightgbm] removed more fixmes
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-lightgbm/package.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-lightgbm/package.py b/var/spack/repos/builtin/packages/py-lightgbm/package.py
new file mode 100644
index 0000000000..5bcef6498c
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-lightgbm/package.py
@@ -0,0 +1,36 @@
+# Copyright 2013-2021 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 PyLightgbm(PythonPackage):
+ """LightGBM is a gradient boosting framework that uses tree
+ based learning algorithms."""
+
+ homepage = "https://github.com/microsoft/LightGBM"
+ pypi = "lightgbm/lightgbm-3.1.1.tar.gz"
+
+ version('3.1.1', sha256='babece2e3613e97748a67ed45387bb0e984bdb1f4126e39f010fbfe7503c7b20')
+
+ variant('mpi', default=False, description="Build with mpi support")
+
+ depends_on('py-setuptools', type='build')
+ depends_on('py-wheel', type=('build', 'run'))
+ depends_on('py-numpy', type=('build', 'run'))
+ depends_on('py-scipy', type=('build', 'run'))
+ depends_on('py-scikit-learn@:0.21.999,0.22.1:', type=('build', 'run'))
+
+ depends_on('cmake@3.8:', type='build')
+
+ depends_on('mpi', when='+mpi')
+
+ def install_args(self, spec, prefix):
+ args = []
+
+ if spec.satisfies('+mpi'):
+ args.append('--mpi')
+
+ return args