# -*- 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-librosa
version             0.11.0
revision            0

categories-append   audio
platforms           {darwin any}
supported_archs     noarch
license             ISC
maintainers         nomaintainer

description         A python package for music and audio analysis.
long_description    {*}${description}

checksums           rmd160  9f8e95a07d768e5e68b01a7e2194fbf358bc2081 \
                    sha256  f5ed951ca189b375bbe2e33b2abd7e040ceeee302b9bbaeeffdfddb8d0ace908 \
                    size    327001

homepage            https://github.com/librosa/librosa

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    depends_run-append \
                    port:py${python.version}-audioread \
                    port:py${python.version}-decorator \
                    port:py${python.version}-joblib \
                    port:py${python.version}-lazy_loader \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-msgpack \
                    port:py${python.version}-numba \
                    port:py${python.version}-numpy \
                    port:py${python.version}-pooch \
                    port:py${python.version}-scikit-learn \
                    port:py${python.version}-scipy \
                    port:py${python.version}-soxr \
                    port:py${python.version}-soundfile \
                    port:py${python.version}-typing_extensions

    if {${python.version} >= 313} {
    depends_run-append \
                    port:py${python.version}-standard-aifc \
                    port:py${python.version}-standard-sunau
    }

    depends_test-append \
                    port:py${python.version}-pytest-mpl \
                    port:py${python.version}-packaging \
                    port:py${python.version}-resampy \
                    port:py${python.version}-samplerate \
                    port:py${python.version}-types-decorator

    test.run        yes

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