summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-astropy/package.py
blob: d138a514f68e7ffe8e05fd4c784c09224b17d4cb (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
from spack import *

class PyAstropy(Package):
    """
    The Astropy Project is a community effort to develop a single core
    package for Astronomy in Python and foster interoperability between
    Python astronomy packages.
    """
    homepage = 'http://www.astropy.org/'

    version('1.1.post1', 'b52919f657a37d45cc45f5cb0f58c44d')

    def url_for_version(self, version):
        return 'https://pypi.python.org/packages/source/a/astropy/astropy-{0}.tar.gz'.format(version)

    extends('python')

    depends_on('cfitsio')
    depends_on('expat')
    depends_on('py-h5py')
    depends_on('py-numpy')
    depends_on('py-scipy')

    def install(self, spec, prefix):
        python('setup.py', 'build', '--use-system-cfitsio',
                                    '--use-system-expat')
        python('setup.py', 'install', '--prefix=' + prefix)