# -*- 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

name                py-pyvo
version             1.9.0
revision            0

license             BSD
maintainers         {mps @Schamschula} openmaintainer
description         Astropy affiliated package for accessing Virtual Observatory data and services
long_description    {*}${description}
homepage            https://github.com/astropy/pyvo

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  46b542f9a7964c6b5e0dcdc44f5c0893ce08ea81 \
                    sha256  5f285d90df96bae3074c5ca215995530af626208603c9246f016ed5c5cfc9cc0 \
                    size    2162580

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools_scm

    depends_lib-append \
                    port:py${python.version}-astropy \
                    port:py${python.version}-defusedxml \
                    port:py${python.version}-pillow \
                    port:py${python.version}-requests

    patchfiles      patch-pyproject.toml.diff

    # samp_hub is being moved from py-astropy to py-pyvo
    # See: https://github.com/astropy/pyvo/issues/761
    post-destroot {
        delete ${destroot}${prefix}/bin
        delete ${destroot}${frameworks_dir}/Python.framework/Versions/${python.branch}/bin
    }
}
