# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

set _name           gammapy
set _n              [string index ${_name} 0]

name                py-${_name}
version             0.7
categories-append   science
platforms           darwin
license             BSD
maintainers         nomaintainer

description         A Python package for gamma-ray astronomy
long_description    ${description}

homepage            http://gammapy.org/
master_sites        pypi:${_n}/${_name}/
distname            ${_name}-${version}

checksums           md5     abda1f58982d8b6d19fff632980e521a \
                    rmd160  7a5dcb6c93078e80f4308174985eab3a421e30b4 \
                    sha256  f30eef6efefb2829d55ceb4bab547011ae1e9fa0434cb5ab6042e4156f1ec6da

python.versions     27 35 36

if {${name} ne ${subport}} {

    # By default, astropy downloads an astropy-helpers package for setup.py.
    # The --offline and --no-git flags prevent this and use a bundled version.
    build.cmd  ${python.bin} setup.py --no-user-cfg --offline --no-git
    destroot.cmd  ${python.bin} setup.py --no-user-cfg --offline --no-git

    depends_build-append  port:py${python.version}-setuptools

    depends_run-append    port:py${python.version}-numpy \
                          port:py${python.version}-scipy \
                          port:py${python.version}-matplotlib \
                          port:py${python.version}-astropy \
                          port:py${python.version}-regions \
                          port:py${python.version}-yaml \
                          port:py${python.version}-click

    livecheck.type  none
} else {
    livecheck.type  pypi
}