# -*- 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-natsort
version             8.4.0
revision            1

categories-append   textproc
platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         {reneeotten @reneeotten} openmaintainer

description         Natural sorting for Python
long_description    When you try to sort a list of strings that \
                    contain numbers, the normal Python sort algorithm \
                    sorts lexicographically, so you might not get the \
                    results that you expect. `natsort` provides \
                    a function `natsorted` that helps sort lists \
                    'naturally', either as real numbers (i.e. \
                    signed/unsigned floats or ints), or as versions.

homepage            https://github.com/SethMMorton/natsort

checksums           rmd160  382fcebc05c62add3040e41a8d8f1b79923369f2 \
                    sha256  45312c4a0e5507593da193dedd04abb1469253b601ecaf63445ad80f0a1ea581 \
                    size    76575

python.versions     310 311 312 313 314

if {${subport} ne ${name}} {
    depends_run-append \
                    port:py${python.version}-pyicu

    depends_test-append \
                    port:py${python.version}-hypothesis \
                    port:py${python.version}-pytest-mock

    test.run        yes

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst LICENSE \
            CHANGELOG.md ${destroot}${docdir}
    }
}
