# -*- 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-upt-pypi
version             0.5.1
revision            0

platforms           darwin
supported_archs     noarch
license             BSD
maintainers         {@korusuke somaiya.edu:karan.sheth} openmaintainer

description         PyPI frontend for upt
long_description    ${description}

homepage            https://framagit.org/upt/upt-pypi

checksums           sha256  1cb93bf5c91ba2584f53f2b060a21c1c470b3d038c9f859054976815e87499ce \
                    rmd160  88a40dda5b90c37374e4802420f463bfdbb293a1 \
                    size    12668

python.versions     37 38 39

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

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

    test.run        yes
    test.cmd        ${python.bin} -m unittest
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.md LICENSE CHANGELOG \
            ${destroot}${docdir}
    }

    livecheck.type  none
}
