# -*- 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

# Note: certbot-cloudflare is stuck on this frozen version
# See: https://github.com/certbot/certbot/issues/9938
name                py-cloudflare2
python.rootname     cloudflare
version             2.20.0
revision            0

categories-append   net
license             MIT
maintainers         {mps @Schamschula} openmaintainer
description         Python interface to the CloudFlare API.
long_description    {*}${description}
homepage            https://github.com/cloudflare/python-cloudflare

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  e8d7d7cf06f1fcd923590b0b8eb66bd26eb98d6a \
                    sha256  46aefc39dfaa2365d639b423cec2cd5350ae11153c7247d3eb3545bdcf01a68a \
                    size    120190

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    conflicts       py${python.version}-cloudflare

    depends_lib-append  \
                    port:py${python.version}-jsonlines \
                    port:py${python.version}-requests \
                    port:py${python.version}-yaml

    post-destroot {
        move ${destroot}${python.libdir}/site-packages/examples \
            ${destroot}${python.libdir}/site-packages/CloudFlare/examples
    }
}
