summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-cogent/package.py
blob: 0e277be682630ad90e49a3fe85f2391a8210551d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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 PyCogent(PythonPackage):
    """A toolkit for statistical analysis of biological sequences."""

    homepage = "https://github.com/Magdoll/Cogent/wiki/Installing-Cogent"
    pypi = "cogent/cogent-1.9.tar.gz"

    version('1.9', sha256='57d8c58e0273ffe4f2b907874f9b49dadfd0600f5507b7666369f4e44d56ce14', deprecated=True)
    version('1.5.3', url="https://pypi.io/packages/source/c/cogent/cogent-1.5.3.tgz",
            sha256='1215ac219070b7b2207b0b47b4388510f3e30ccd88160aa9f02f25d24bcbcd95', deprecated=True)

    variant('matplotlib', default=False, description="graphs related to codon usage")
    variant('mpi', default=False, description='MPI required for parallel computation.')
    variant('mysql', default=False, description='Required for the Ensembl querying code.')

    depends_on('py-setuptools', type=('build'), when='@1.9')
    depends_on('python@2.6:2', type=('build', 'run'))
    depends_on('py-numpy@1.3:', type=('build', 'run'))
    depends_on('zlib')
    depends_on('py-matplotlib', when='+matplotlib', type=('build', 'run'))
    depends_on('py-mpi4py', when='+mpi', type=('build', 'run'))
    depends_on('py-sqlalchemy', when='+mysql', type=('build', 'run'))
    depends_on('py-pymysql', when='+mysql', type=('build', 'run'))
    depends_on('py-cython@0.17.1:', type='build')

    def setup_build_environment(self, env):
        env.set('DONT_USE_PYREX', '1')