# -*- 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-supervisor
version             4.1.0
revision            0

platforms           darwin
supported_archs     noarch
license             BSD ZPL-2.1
maintainers         nomaintainer

description         Process manager for UNIX-like OSs
long_description    The supervisor is a client/server system that allows its users to control \
                    a number of processes on UNIX-like operating systems

homepage            http://supervisord.org

checksums           rmd160  1c3abbe97894c3ea946e48585736ae25f11ec69b \
                    sha256  2dc86fe0476e945e61483d614ceb2cf4f93b95282eb243bdf792621994360383 \
                    size    459020

python.versions     27 37

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

    depends_test-append \
                    port:py${python.version}-pytest

    if {${python.version} == 27} {
        depends_test-append \
                    port:py${python.version}-mock
    }

    # 6 tests fail currently, mostly because of "error: AF_UNIX path too long", which can be ignored
    test.run        yes
    test.cmd        py.test-${python.branch}
    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} CHANGES.rst COPYRIGHT.txt \
            LICENSES.txt README.rst supervisor/skel/sample.conf \
            docs/plugins.rst ${destroot}${docdir}
    }

    livecheck.type  none
}
