# -*- 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-slugify
python.rootname     python-slugify
version             4.0.1
revision            1

categories-append   textproc
platforms           darwin
supported_archs     noarch
license             MIT
maintainers         openmaintainer {gmail.com:esafak @esafak}

description         A Python Slugify application that handles Unicode
long_description    ${description}

homepage            https://github.com/un33k/python-slugify

checksums           rmd160  02cde0a17e327c0df75d37a339c354de50eb04fb \
                    sha256  69a517766e00c1268e5bbfc0d010a0a8508de0b18d30ad5a1ff357f8ae724270 \
                    size    11079

python.versions     27 35 36 37 38 39

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

    depends_lib-append \
                    port:py${python.version}-unidecode \
                    port:py${python.version}-text-unidecode

    test.run        yes
    test.cmd        ${python.bin} test.py
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

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

    livecheck.type  none
}
