# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-zopeinterface
version             5.3.0
revision            0
python.versions     27 35 36 37 38 39
categories-append   zope
license             ZPL-2.1
platforms           darwin
maintainers         {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description         Python interfaces for Zope
long_description    {*}${description}

homepage            https://zopetoolkit.readthedocs.io/
master_sites        pypi:z/zope.interface
distname            zope.interface-${version}

checksums           rmd160  9a8ada33bdfec240e2665cd1c07cc9b104d2bd25 \
                    sha256  b18a855f8504743e0a2d8b75d008c7720d44e4c76687e13f959e35d9a13eb397 \
                    size    241964

if {${name} ne ${subport}} {

    depends_build   port:py${python.version}-setuptools

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} \
            CHANGES.rst  README.rst \
            ${destroot}${prefix}/share/doc/${subport}
    }

    variant tests description {Add dependencies needed to run tests} {
        depends_build-append port:py${python.version}-zope-event
        test.run    yes
        test.cmd    ${python.bin} setup.py
        test.target test
    }

    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       https://pypi.python.org/pypi/zope.interface/json
    livecheck.regex     zope.interface-(\\d+(?:\\.\\d+)*)${extract.suffix}
}
