From 48420d0c24bb20c18c3ac61d74f61799e4bf61ce Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Fri, 22 Nov 2019 18:34:43 -0800 Subject: New package: py-wub, with supporting fixes (#13773) * Add py-wub, with supporting fixes - add py-wub - add py-pycmd because py-wub needs it - update py-statsmodels, which needs at least v0.9.0 to work with python3.7 because cython. * Update based on Adam's comments * Fix dependency types for py-six in py-wub * statsmodels tests fail, update comment w/ Issue # The statsmodels tests weren't run in the previous version of the package. If I enable them, the fail. Update the package comment with the statsmodels issue I opened to track the problem: https://github.com/statsmodels/statsmodels/issues/6263 * Update dependency types in py-wub/package.py * flake8 cleanups * Make statsmodels tests work - need to use patsy@0.5.1: - need to run the tests from within the build/lib* dir --- .../repos/builtin/packages/py-patsy/package.py | 2 ++ .../repos/builtin/packages/py-pycmd/package.py | 19 ++++++++++++ .../builtin/packages/py-statsmodels/package.py | 36 ++++++++++++++++------ var/spack/repos/builtin/packages/py-wub/package.py | 31 +++++++++++++++++++ 4 files changed, 79 insertions(+), 9 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-pycmd/package.py create mode 100644 var/spack/repos/builtin/packages/py-wub/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-patsy/package.py b/var/spack/repos/builtin/packages/py-patsy/package.py index d5e744d1d0..0e037ae40e 100644 --- a/var/spack/repos/builtin/packages/py-patsy/package.py +++ b/var/spack/repos/builtin/packages/py-patsy/package.py @@ -11,6 +11,8 @@ class PyPatsy(PythonPackage): homepage = "https://github.com/pydata/patsy" url = "https://pypi.io/packages/source/p/patsy/patsy-0.4.1.zip" + version('0.5.1', sha256='f115cec4201e1465cd58b9866b0b0e7b941caafec129869057405bfe5b5e3991', + url="https://pypi.io/packages/source/p/patsy/patsy-0.5.1.tar.gz") version('0.4.1', sha256='dc1cc280045b0e6e50c04706fd1e26d2a00ea400aa112f88e8142f88b0b7d3d4') variant('splines', default=False, description="Offers spline related functions") diff --git a/var/spack/repos/builtin/packages/py-pycmd/package.py b/var/spack/repos/builtin/packages/py-pycmd/package.py new file mode 100644 index 0000000000..a496a6e47c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pycmd/package.py @@ -0,0 +1,19 @@ +# 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 PyPycmd(PythonPackage): + """pycmd is a collection of command line tools for helping with Python + development.""" + + homepage = "https://pypi.org/project/pycmd/" + url = "https://pypi.io/packages/source/p/pycmd/pycmd-1.2.tar.gz" + + version('1.2', sha256='adc1976c0106919e9338db20102b91009256dcfec924a66928d7297026f72477') + + depends_on('py-py@1.4.9:', type=('build', 'run')) + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-statsmodels/package.py b/var/spack/repos/builtin/packages/py-statsmodels/package.py index 79f3ae49be..514aa63a7f 100644 --- a/var/spack/repos/builtin/packages/py-statsmodels/package.py +++ b/var/spack/repos/builtin/packages/py-statsmodels/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import glob class PyStatsmodels(PythonPackage): @@ -12,19 +13,36 @@ class PyStatsmodels(PythonPackage): homepage = "http://www.statsmodels.org" url = "https://pypi.io/packages/source/s/statsmodels/statsmodels-0.8.0.tar.gz" + version('0.10.1', sha256='320659a80f916c2edf9dfbe83512d9004bb562b72eedb7d9374562038697fa10') version('0.8.0', sha256='26431ab706fbae896db7870a0892743bfbb9f5c83231644692166a31d2d86048') variant('plotting', default=False, description='With matplotlib') + depends_on('python@:3.6', when='@:0.8.0', type=('build', 'run')) + # according to http://www.statsmodels.org/dev/install.html earlier versions # might work. depends_on('py-setuptools@0.6c5:', type='build') - depends_on('py-numpy@1.7.0:', type=('build', 'run')) - depends_on('py-scipy@0.11:', type=('build', 'run')) - depends_on('py-pandas@0.12:', type=('build', 'run')) - depends_on('py-patsy@0.2.1:', type=('build', 'run')) - depends_on('py-cython@0.24:', type=('build', 'run')) - depends_on('py-matplotlib@1.3:', type='run', when='+plotting') - - # TODO: Add a 'test' deptype - # depends_on('py-nose', type='test') + + depends_on('py-numpy@1.7.0:', type=('build', 'run'), when='@0.8.0') + depends_on('py-pandas@0.12:', type=('build', 'run'), when='@0.8.0') + depends_on('py-patsy@0.2.1:', type=('build', 'run'), when='@0.8.0') + depends_on('py-scipy@0.11:', type=('build', 'run'), when='@0.8.0') + depends_on('py-matplotlib@1.3:', type=('build', 'run'), when='@0.8.0 +plotting') + + # patsy@0.5.1 works around a Python change + # https://github.com/statsmodels/statsmodels/issues/5343 and + # https://github.com/pydata/patsy/pull/131 + depends_on('py-numpy', type=('build', 'run'), when='@0.10.1') + depends_on('py-pandas', type=('build', 'run'), when='@0.10.1') + depends_on('py-patsy', type=('build', 'run'), when='@0.10.1') + depends_on('py-scipy@0.5.1:', type=('build', 'run'), when='@0.10.1') + depends_on('py-matplotlib', type=('build', 'run'), when='@0.10.1 +plotting') + + depends_on('py-pytest', type='test') + + def test(self): + dirs = glob.glob("build/lib*") # There can be only one... + with working_dir(dirs[0]): + pytest = which('pytest') + pytest('statsmodels') diff --git a/var/spack/repos/builtin/packages/py-wub/package.py b/var/spack/repos/builtin/packages/py-wub/package.py new file mode 100644 index 0000000000..d86a739b4e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-wub/package.py @@ -0,0 +1,31 @@ +# 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 PyWub(PythonPackage): + """Bioinformatics tools and a software library developed by the Oxford + Nanopore Technologies Applications group. + """ + + homepage = "https://github.com/nanoporetech/wub" + url = "https://github.com/nanoporetech/wub/archive/v0.4.0.tar.gz" + + version('0.4.0', sha256='1526aa392bccac71b872211c45f5b403ad3d55f5762e0ed34ff9086bc1dab6fd') + + depends_on('py-six', type=('build', 'run')) + depends_on('py-pytest', type=('build', 'run', 'test')) + depends_on('py-pycmd', type=('build', 'run', 'test')) + depends_on('py-biopython', type=('build', 'run')) + depends_on('py-numpy', type=('build', 'run', 'test')) + depends_on('py-matplotlib', type=('build', 'run')) + depends_on('py-seaborn', type=('build', 'run')) + depends_on('py-editdistance', type=('build', 'run', 'test')) + depends_on('py-pandas@0.20.2:', type=('build', 'run')) + depends_on('py-pysam', type=('build', 'run')) + depends_on('py-tqdm', type=('build', 'run')) + depends_on('py-statsmodels', type=('build', 'run')) + depends_on('py-setuptools', type='build') -- cgit v1.2.3-70-g09d2