spack/var/spack/repos/builtin/packages/py-dask-glm/package.py
a-saitoh-fj 9c91aeffa8
py-dask-glm: Added document build (#22293)
* py-dask-glm: Push again for testing with git.

* py-dask-glm: Fixed the pointed out OSS dependency setting to type=build.

* py-dask-glm: Set depends_on to type=build in the OSS to be built when building the document.

* py-dask-glm: Fix type of depends_on (py-scikit-learn)

Co-authored-by: miura <miura@fx7-pg01.cm.cluster>
2021-03-25 00:32:29 +00:00

48 lines
2.1 KiB
Python

# 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 PyDaskGlm(PythonPackage):
"""Dask-glm is a library for fitting Generalized Linear Models on
large datasets."""
homepage = "https://dask-glm.readthedocs.io/en/latest/"
pypi = "dask-glm/dask-glm-0.2.0.tar.gz"
version('0.2.0', sha256='58b86cebf04fe5b9e58092e1c467e32e60d01e11b71fdc628baaa9fc6d1adee5')
variant('docs', default=False, description='Build HTML documentation')
depends_on('py-setuptools', type='build')
depends_on('py-setuptools-scm', type='build')
depends_on('py-cloudpickle@0.2.2:', type=('build', 'run'))
depends_on('py-dask+array', type=('build', 'run'))
depends_on('py-multipledispatch@0.4.9:', type=('build', 'run'))
depends_on('py-scipy@0.18.1:', type=('build', 'run'))
depends_on('py-scikit-learn@0.18:', type=('build', 'run'), when='~docs')
depends_on('py-scikit-learn@0.18:0.21.999', type=('build', 'run'), when='+docs')
depends_on('py-jupyter', type='build', when='+docs')
depends_on('py-nbsphinx', type='build', when='+docs')
depends_on('py-notebook', type='build', when='+docs')
depends_on('py-numpydoc', type='build', when='+docs')
depends_on('py-sphinx', type='build', when='+docs')
depends_on('py-sphinx-rtd-theme', type='build', when='+docs')
depends_on('pandoc', type='build', when='+docs')
depends_on('py-pip', type='build', when='+docs')
depends_on('py-s3fs', type='build', when='+docs')
depends_on('py-matplotlib', type='build', when='+docs')
depends_on('llvm@:10.0.1~flang', type='build', when='+docs')
depends_on('cairo+X+ft+fc+pdf+gobject', type='build', when='+docs')
depends_on('harfbuzz+graphite2', type='build', when='+docs')
@run_after('install')
def install_docs(self):
if '+docs' in self.spec:
with working_dir('docs'):
make('html')
install_tree('docs', self.prefix.docs)