# -*- 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-charset-normalizer
version             3.4.7
revision            0

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

python.versions     36 310 311 312 313 314

maintainers         {stromnov @stromnov} openmaintainer

description         A library that helps you read text from an unknown charset encoding.
long_description    {*}${description}

homepage            https://github.com/ousret/charset_normalizer

distname            charset_normalizer-${version}

checksums           rmd160  4eefa3045680a4041607b425dddd5f2c0f1de0b4 \
                    sha256  ae89db9e5f98a11a4bf50407d4363e7b09b31e55bc117b4f7d80aab97ba009e5 \
                    size    144271

if {${name} ne ${subport}} {
    if {${python.version} == 36} {
        version             2.0.12
        revision            0
        distname            ${python.rootname}-${version}
        checksums           rmd160  f9bbde2f4ca286e47416d01eebd5b8c22cd8bff7 \
                            sha256  2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \
                            size    79105
        python.pep517       no
        depends_lib-append  port:py${python.version}-setuptools
    } else {
        depends_build-append \
                            port:py${python.version}-setuptools_scm

        test.run        yes
    }

    livecheck.type      none
}
