# -*- 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-service_identity
version             24.2.0
revision            0

categories-append   devel
platforms           {darwin any}
supported_archs     noarch
license             MIT

python.versions     27 310 311 312 313 314

maintainers         {khindenburg @kurthindenburg} openmaintainer

description         Service Identity Verification for pyOpenSSL

long_description    service_identity aspires to give you all the tools\
                    you need for verifying whether a certificate is valid\
                    for the intended purposes.

homepage            https://github.com/pyca/service_identity

checksums           rmd160  023df399fc521bf2efb0fa92a80471b523e7cb79 \
                    sha256  b8683ba13f0d39c6cd5d625d2c5f65421d6d707b013b375c355751557cbe8e09 \
                    size    39245

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-asn1 \
                        port:py${python.version}-asn1-modules \
                        port:py${python.version}-cryptography \
                        port:py${python.version}-idna \
                        port:py${python.version}-openssl \
                        port:py${python.version}-attrs

    if {${python.version} eq 27} {
        # last working version for py27
        version     21.1.0
        python.rootname     service-identity
        checksums   rmd160  79f25230d1c15331cc967560f4d2521983354a26 \
                    sha256  6e6c6086ca271dc11b033d17c3a8bea9f24ebff920c587da090afc9519419d34 \
                    size    40073

        python.pep517           no

        depends_build-append    port:py${python.version}-setuptools
        depends_lib-append      port:py${python.version}-ipaddress
    } else {
        python.pep517_backend   hatch

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

    livecheck.type      none
}
