From eac6c53afb50b7f8a778d75831ae7fc040c92a7c Mon Sep 17 00:00:00 2001 From: iarspider Date: Wed, 19 Feb 2020 19:59:03 +0100 Subject: [PATCH] Add extra version of py-dask; add new variant and dependencies (#14973) * Add extra version of py-dask * Update package.py * Add extra dependencies for py-dask+distributed * Update package.py * Update var/spack/repos/builtin/packages/py-heapdict/package.py Co-Authored-By: Adam J. Stewart * Update var/spack/repos/builtin/packages/py-heapdict/package.py Co-Authored-By: Adam J. Stewart * Update var/spack/repos/builtin/packages/py-distributed/package.py Co-Authored-By: Adam J. Stewart * Update var/spack/repos/builtin/packages/py-distributed/package.py Co-Authored-By: Adam J. Stewart * Update package.py * Update package.py * Update package.py * Update package.py * Update var/spack/repos/builtin/packages/py-distributed/package.py Co-Authored-By: Adam J. Stewart * Update var/spack/repos/builtin/packages/py-distributed/package.py Co-Authored-By: Adam J. Stewart * Update package.py * Update var/spack/repos/builtin/packages/py-distributed/package.py Co-Authored-By: Adam J. Stewart * Update package.py * Flake-8 * Add patch step for py-distributed Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/py-dask/package.py | 11 ++++++ .../packages/py-distributed/package.py | 37 +++++++++++++++++++ .../builtin/packages/py-heapdict/package.py | 18 +++++++++ .../repos/builtin/packages/py-zict/package.py | 18 +++++++++ 4 files changed, 84 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-distributed/package.py create mode 100644 var/spack/repos/builtin/packages/py-heapdict/package.py create mode 100644 var/spack/repos/builtin/packages/py-zict/package.py diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index 6b44f935af..4967306f63 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -12,6 +12,7 @@ class PyDask(PythonPackage): homepage = "https://github.com/dask/dask/" url = "https://pypi.io/packages/source/d/dask/dask-1.1.0.tar.gz" + version('1.2.2', sha256='5e7876bae2a01b355d1969b73aeafa23310febd8c353163910b73e93dc7e492c') version('1.1.2', sha256='93b355b9a9c9a3ddbb39fab99d5759aad5cfd346f4520b87788970e80cf97256') version('1.1.0', sha256='e76088e8931b326c05a92d2658e07b94a6852b42c13a7560505a8b2354871454') version('0.17.4', sha256='c111475a3d1f8cba41c8094e1fb1831c65015390dcef0308042a11a9606a2f6d') @@ -21,13 +22,18 @@ class PyDask(PythonPackage): variant('bag', default=True, description='Install requirements for dask.bag') variant('dataframe', default=True, description='Install requirements for dask.dataframe') variant('delayed', default=True, description='Install requirements for dask.delayed') + variant('distributed', default=True, description='Install requirements for dask.distributed') + + conflicts('+distributed', when='@:1.2.1') # Only present in 1.2.2+ depends_on('py-setuptools', type='build') depends_on('py-pytest@3.1.0:', type='test') depends_on('py-requests', type='test') + depends_on('py-pytest-runner', type='test') # Requirements for dask.array depends_on('py-numpy@1.11.0:', type=('build', 'run'), when='+array') + depends_on('py-numpy@1.13.0:', type=('build', 'run'), when='@1.2.2: +array') depends_on('py-toolz@0.7.3:', type=('build', 'run'), when='+array') # Requirements for dask.bag @@ -37,7 +43,9 @@ class PyDask(PythonPackage): # Requirements for dask.dataframe depends_on('py-numpy@1.11.0:', type=('build', 'run'), when='+dataframe') + depends_on('py-numpy@1.13.0:', type=('build', 'run'), when='@1.2.2: +dataframe') depends_on('py-pandas@0.19.0:', type=('build', 'run'), when='+dataframe') + depends_on('py-pandas@0.21.0:', type=('build', 'run'), when='@1.2.2: +dataframe') depends_on('py-toolz@0.7.3:', type=('build', 'run'), when='+dataframe') depends_on('py-partd@0.3.8:', type=('build', 'run'), when='+dataframe') depends_on('py-cloudpickle@0.2.1:', type=('build', 'run'), when='+dataframe') @@ -45,6 +53,9 @@ class PyDask(PythonPackage): # Requirements for dask.delayed depends_on('py-toolz@0.7.3:', type=('build', 'run'), when='+delayed') + # Requirements for dask.distributed + depends_on('py-distributed@1.22:', type=('build', 'run'), when='+distributed') + @property def import_modules(self): modules = [ diff --git a/var/spack/repos/builtin/packages/py-distributed/package.py b/var/spack/repos/builtin/packages/py-distributed/package.py new file mode 100644 index 0000000000..be4fb3b1c6 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-distributed/package.py @@ -0,0 +1,37 @@ +# Copyright 2013-2020 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 PyDistributed(PythonPackage): + """Distributed scheduler for Dask""" + + homepage = "https://distributed.dask.org/" + url = "https://pypi.io/packages/source/d/distributed/distributed-2.10.0.tar.gz" + + version('2.10.0', sha256='2f8cca741a20f776929cbad3545f2df64cf60207fb21f774ef24aad6f6589e8b') + version('1.28.1', sha256='3bd83f8b7eb5938af5f2be91ccff8984630713f36f8f66097e531a63f141c48a') + + depends_on('python@2.7:2.8,3.5:', when='@:1', type=('build', 'run')) + depends_on('python@3.6:', when='@2:', type=('build', 'run')) + depends_on('py-setuptools', type=('build', 'run')) + + depends_on('py-click@6.6:', type=('build', 'run')) + depends_on('py-cloudpickle@0.2.2:', type=('build', 'run')) + depends_on('py-msgpack', type=('build', 'run')) + depends_on('py-psutil@5.0:', type=('build', 'run')) + depends_on('py-six', type=('build', 'run'), when='@:1') + depends_on('py-sortedcontainers@:1.999,2.0.2:', type=('build', 'run')) + depends_on('py-tblib', type=('build', 'run')) + depends_on('py-toolz@0.7.4:', type=('build', 'run')) + depends_on('py-tornado@5:', type=('build', 'run')) + depends_on('py-zict@0.1.3:', type=('build', 'run')) + depends_on('py-pyyaml', type=('build', 'run')) + depends_on('py-futures', when='@:1 ^python@2.7:2.8', type=('build', 'run')) + depends_on('py-singledispatch', when='@:1 ^python@2.7:2.8', type=('build', 'run')) + + def patch(self): + filter_file('^dask .*', '', 'requirements.txt') diff --git a/var/spack/repos/builtin/packages/py-heapdict/package.py b/var/spack/repos/builtin/packages/py-heapdict/package.py new file mode 100644 index 0000000000..7333f24c7a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-heapdict/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2020 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 PyHeapdict(PythonPackage): + """A heap with decrease-key and increase-key operations""" + + homepage = "http://stutzbachenterprises.com/" + url = "https://pypi.io/packages/source/H/HeapDict/HeapDict-1.0.1.tar.gz" + + version('1.0.1', sha256='8495f57b3e03d8e46d5f1b2cc62ca881aca392fd5cc048dc0aa2e1a6d23ecdb6') + + depends_on('python@2.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-zict/package.py b/var/spack/repos/builtin/packages/py-zict/package.py new file mode 100644 index 0000000000..5830be23cf --- /dev/null +++ b/var/spack/repos/builtin/packages/py-zict/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2020 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 PyZict(PythonPackage): + """Mutable mapping tools""" + + homepage = "http://zict.readthedocs.io/en/latest/" + url = "https://pypi.io/packages/source/z/zict/zict-1.0.0.tar.gz" + + version('1.0.0', sha256='e34dd25ea97def518fb4c77f2c27078f3a7d6c965b0a3ac8fe5bdb0a8011a310') + + depends_on('py-setuptools', type='build') + depends_on('py-heapdict', type=('build', 'run'))