# -*- 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-zopfli
version             0.1.7
revision            0

platforms           darwin
license             Apache-2
maintainers         nomaintainer

description         Zopfli module for python
long_description    ${description}

homepage            https://github.com/obp/py-zopfli
use_zip             yes

checksums           rmd160  ef2fe2fe2129550270f144cdbff79886225f3268 \
                    sha256  512892714f0e3dcc9a77222cb509ed519f41ce2b92467e47a4b406a23b48561a \
                    size    75709

python.versions     27 36 37 38 39

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

    pre-test {
        test.env    PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
    }

    test.run        yes
    test.dir        ${build.dir}/tests
    test.cmd        ${python.bin} tests.py
    test.target

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

    livecheck.type      none
}
