# -*- 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-zopeinterface
python.rootname     zope_interface
version             8.7
revision            0
python.versions     27 310 311 312 313 314 315
categories-append   zope
license             ZPL-2.1
maintainers         {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
description         Python interfaces for Zope
long_description    {*}${description}

homepage            https://zopetoolkit.readthedocs.io/

checksums           rmd160  88ccc9722d6a26a379c5bf88d959394c83166532 \
                    sha256  0b47b62e8d0d99b24bcdd32f4f2120425e5019c3bee2ad69a0e1d75737487a96 \
                    size    266343

if {${name} ne ${subport}} {
    if {${python.version} == 27} {
        python.rootname     zope.interface
        version             5.5.2
        revision            0

        checksums           rmd160  b56a9e93853ccc43993cf3b6f893a9d1986e6917 \
                            sha256  bfee1f3ff62143819499e348f5b8a7f3aa0259f9aca5e0ddae7391d059dce671 \
                            size    300533

        depends_build       port:py${python.version}-setuptools
    } elseif {${python.version} == 310} {
        version             8.6
        revision            0

        checksums           rmd160  ebf7ea70f9f44cd415756cf19508f6bdfa35b918 \
                            sha256  b40ef9b4873afb5d0dec02b8d2dfde1cf18c72337b60c99cb735961e0bac05c0 \
                            size    257973
    }

    if {${python.version} > 27} {
        depends_test    port:py${python.version}-zope-event
        test.run        yes

        # Probably fails without this due to lack of port for zope.testing
        test.args       --pyargs zope.interface.common.tests
    }

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

    livecheck.type      none
}
