# -*- 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-last
python.rootname     pylast
version             6.0.0
revision            0

categories-append   devel audio
license             Apache-2
platforms           {darwin any}
supported_archs     noarch

description         A Python interface to Last.fm and Libre.fm
long_description    {*}${description}

homepage            https://github.com/pylast/pylast

maintainers         nomaintainer

checksums           rmd160  45025d3da7efa8a4f9a21f5696e32b97b667f794 \
                    sha256  09748dcdb97ddc812c65460bea73f7cce578b2b8ed4d9f6a0d1da122f8b05c5c \
                    size    45408

python.versions     310 311 312 313
python.pep517_backend   hatch

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

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

    depends_test-append \
                    port:py${python.version}-flaky \
                    port:py${python.version}-pytest-random-order \
                    port:py${python.version}-yaml

    # See https://github.com/pylast/pylast/issues/397
    test.run        yes
}
