# -*- 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
PortGroup           github 1.0

github.setup        astropy astroquery 0.3.9 v
name                py-${name}
maintainers         {aronnax @lpsinger} openmaintainer
categories-append   science
description         Accessing Online Astronomical Data
long_description    Astroquery is an astropy affiliated package that contains \
                    a collection of tools to access online Astronomical data. \
                    Each web service has its own sub-package.
platforms           darwin
supported_archs     noarch
license             BSD

homepage            https://astroquery.readthedocs.io/
checksums           rmd160  da830e53ff424b7cbdde9867b8d215fe8303de25 \
                    sha256  271fd63d8347b55e9860dd4ecdf6dbefb24349c6912eeead307d34a1ccea5325 \
                    size    5892871

python.versions     27 35 36 37

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

    depends_lib-append  port:py${python.version}-astropy \
                        port:py${python.version}-requests \
                        port:py${python.version}-keyring \
                        port:py${python.version}-beautifulsoup4 \
                        port:py${python.version}-html5lib

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

    # 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

    post-patch {
        reinplace -W ${worksrcpath} "s/auto_use = True/auto_use = False/" setup.cfg
    }

    livecheck.type      none
}