# -*- 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 _name           unittest-xml-reporting
set _n              [string index ${_name} 0]

name                py-${_name}
version             2.2.0
categories-append   devel
platforms           darwin
supported_archs     noarch
license             BSD
maintainers         {petr @petrrr} openmaintainer

description         Unittest based test runner with Ant/JUnit like XML reporting.
long_description    \
    unittest-xml-reporting is a unittest test runner that can save test \
    results to XML files that can be consumed by a wide range of tools, such \
    as build systems, IDEs and continuous integration servers.

homepage            http://github.com/xmlrunner/unittest-xml-reporting/
master_sites        pypi:${_n}/${_name}
distname            ${_name}-${version}

checksums           rmd160  ee69c782ced53ada574a6b7fea93fdf72c8aa5a5 \
                    sha256  3ba27af788bddb4403ee72561bfd3df2deb27a926a5426aa9beeb354c59b9c44 \
                    size    13677

python.versions     27 36 37

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

    livecheck.type      none
} else {
    livecheck.type  regex
    livecheck.url   https://pypi.python.org/pypi/${_name}/json
    livecheck.regex "\"${_name}-(\[.\\d\]+)\\${extract.suffix}\""
}
