# -*- 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-chardet
version             7.7.0
revision            0

categories-append   devel textproc
license             LGPL-2.1+
platforms           {darwin any}
supported_archs     noarch
maintainers         {aronnax @lpsinger} openmaintainer
description         Universal character encoding detector
long_description    Character encoding auto-detection in Python. \
                    As smart as your browser.

homepage            https://github.com/chardet/chardet

checksums           rmd160  296fb1f0a9e536756d7318fbd698d3d9808770df \
                    sha256  0ba38a05201b0abf7570c12d8af45c30b2af835bd5cc52bfc7105082eda82c1e \
                    size    1008480

python.versions     27 310 311 312 313 314 315
python.pep517_backend hatch

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        version     4.0.0
        revision    0
        checksums   rmd160  03bd0ba9cb2b0a150bed313cedf1c824439705b5 \
                    sha256  96481c3479f67911078b49063daa4978e4a7425d4a33353966c00b6208e732b9 \
                    size    1924276

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

    test.run        yes
    test.env-append PYTHONPATH=${destroot}${python.pkgd}
}
