# -*- 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-cloudflare
version             5.4.0
revision            0

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

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  ed5d93ec8de213f4412c76fa3e5fbb49d359fd49 \
                    sha256  863f2a234a7d2cce9f7ff9c4ae0b7e62f39f58504494bc49d9023a213d29aceb \
                    size    3021495

python.versions     310 311 312 313 314

python.pep517_backend \
                    hatch

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

    depends_build-append  \
                    port:py${python.version}-hatch-fancy-pypi-readme

    depends_lib-append  \
                    port:py${python.version}-anyio \
                    port:py${python.version}-distro \
                    port:py${python.version}-httpx \
                    port:py${python.version}-pydantic \
                    port:py${python.version}-sniffio \
                    port:py${python.version}-typing_extensions

    patchfiles      patch-pyproject.toml.diff

    variant aiohttp description {add aiohttp support} {
         depends_lib-append \
                        port:py${python.version}-aiohttp \
                        port:py${python.version}-httpx-aiohttp
    }
}
