# -*- 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
PortGroup           select 1.0

name                py-dns-lexicon
python.rootname     dns_lexicon
version             3.25.2
epoch               1
revision            0

categories-append   net
license             MIT
maintainers         {mps @Schamschula} openmaintainer
description         Manipulate DNS records on various DNS providers in a \
                    standardized/agnostic way.
long_description    {*}${description}
homepage            https://github.com/dns-lexicon/dns-lexicon

supported_archs     noarch
platforms           {darwin any}

checksums           rmd160  fc1e0745d4b4c441bd45ff40002827cc765c4a2b \
                    sha256  a377bf2b4017ee46de8d5515cf2c204bfda74b49032dc5420bd3100993f28deb \
                    size    164305

python.versions     310 311 312 313 314

python.pep517_backend   \
                    poetry

if {${name} ne ${subport}} {
    depends_run-append  \
                    port:py${python.version}-beautifulsoup4 \
                    port:py${python.version}-cryptography \
                    port:py${python.version}-dnspython \
                    port:py${python.version}-pyotp \
                    port:py${python.version}-requests \
                    port:py${python.version}-requests-unixsocket \
                    port:py${python.version}-tldextract \
                    port:py${python.version}-yaml \
                    port:lexicon_select

    select.group    lexicon
    select.file     ${filespath}/lexicon${python.version}

    notes "
    To make the Python ${python.branch} version of lexicon the one that is run\
    when you execute the commands without a version suffix, e.g. 'lexicon', run:
    sudo port select --set ${select.group} [file tail ${select.file}]
    "
}
