# -*- 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 0.9.7 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
checksums           rmd160  906efa0234086b9041b5cfe5314d50ef75bbfa9f \
                    sha256  b9237e58de2c75265892325e8b9876b17110137df8f7f6385b262c3384402faf \
                    size    1543984
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     38 39 310
python.pep517_backend poetry

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

    depends_lib-append \
                    port:py${python.version}-appdirs       \
                    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}
    }
}
