# -*- 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-filetype
version             1.0.7
revision            0

platforms           darwin
supported_archs     noarch
license             MIT
maintainers         {reneeotten @reneeotten} openmaintainer

description         Infer file type and MIME type of any file/buffer. No external dependencies.
long_description    ${description}

homepage            https://github.com/h2non/filetype.py

checksums           rmd160  326f7b07478b527a0d026cb6c09414c995fc9acb \
                    sha256  da393ece8d98b47edf2dd5a85a2c8733e44b769e32c71af4cd96ed8d38d96aa7 \
                    size    666636

python.versions     37 38 39

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

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

    test.run        yes
    test.cmd        ${python.bin}
    test.args       -m unittest discover
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

    livecheck.type  none
}
