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

github.setup        requests-cache requests-cache 1.2.1 v
github.tarball_from archive
revision            0
checksums           rmd160  a0bb0a87b3c7106da1dfe7b467219fd28f324207 \
                    sha256  5121eebd8a84c67368165778a23c4791cded96305e1daa231f3cb618730b3354 \
                    size    3056882
name                py-requests-cache

categories-append   devel
license             BSD
supported_archs     noarch
platforms           {darwin any}
maintainers         nomaintainer

description         Transparent persistent cache for py-requests
long_description    {*}${description}

homepage            https://requests-cache.readthedocs.io/en/stable/

python.versions     310 311 312 313
python.pep517_backend poetry

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

    depends_lib-append \
                    port:py${python.version}-platformdirs \
                    port:py${python.version}-attrs         \
                    port:py${python.version}-cattrs        \
                    port:py${python.version}-requests      \
                    port:py${python.version}-url-normalize \
                    port:py${python.version}-urllib3

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}

        xinstall -d ${destroot}${docdir}

        xinstall -m 0644 -W ${worksrcpath} README.md CONTRIBUTORS.md \
            LICENSE HISTORY.md ${destroot}${docdir}
    }
}
