# -*- 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

set real_name       flaky
name                py-${real_name}
version             3.5.3
worksrcdir          ${real_name}-${version}
distfiles           ${real_name}-${version}${extract.suffix}
license             Apache-2
maintainers         {yan12125 @yan12125} openmaintainer
description         Plugin for nose or py.test that automatically reruns flaky tests.
long_description    ${description}
platforms           darwin
homepage            https://github.com/box/flaky
master_sites        pypi:f/flaky

python.versions     27 36 37

checksums           rmd160  94736b4773b85082fa1f6cce30aee020b1f21283 \
                    sha256  12bd5e41f372b2190e8d754b6e5829c2f11dbc764e10b30f57e59f829c9ca1da \
                    size    29320

if {${name} ne ${subport}} {
    depends_test-append port:py${python.version}-tox

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

    test.run            yes
    test.target
    test.cmd            tox-${python.branch}
} else {
    livecheck.type      regex
    livecheck.regex     ${real_name}-(\[0-9.\]+)${extract.suffix}
}