# -*- 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-requests-kerberos
version             0.15.0
revision            0

categories-append   net security
supported_archs     noarch
platforms           {darwin any}
license             ISCL
maintainers         {petr @petrrr} openmaintainer

description         A Kerberos authentication handler for python-requests
long_description    {*}${description}

homepage            https://github.com/requests/requests-kerberos

distname            requests_kerberos-${version}

checksums           rmd160  7fcb4190254a0fa116ccae0290756b5772e94ae6 \
                    sha256  437512e424413d8113181d696e56694ffa4259eb9a5fc4e803926963864eaf4e \
                    size    24410

python.versions     310 311 312 313

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-cryptography \
                    port:py${python.version}-pyspnego \
                    port:py${python.version}-requests

    # These dependencies are optional in pyspnego[kerberos].
    # We are okay without requiring any specific variants.
    depends_run-append\
                    port:py${python.version}-gssapi \
                    port:py${python.version}-krb5

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