# -*- 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           github 1.0
PortGroup           python 1.0

github.setup        behave behave 1.2.6 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
name                py-${github.project}

categories-append   devel
license             BSD
maintainers         nomaintainer

description         behave is behavior-driven development, Python style.
long_description    Behavior-driven development (or BDD) is an agile\
                    software development technique that encourages\
                    collaboration between developers, QA and\
                    non-technical or business participants in a\
                    software project. behave uses tests written in a\
                    natural language style, backed up by\
                    Python code.

checksums           rmd160  a78eda96ca951924b19f20c4589f82f4d2d91de0 \
                    sha256  ea4351f89631c9a0f439d831c3d27c32f9f33d8965e1ec47bf4cac8800add7bd \
                    size    701895

supported_archs     noarch
platforms           {darwin any}

python.versions      39

github.livecheck.regex  {([0-9.]+)}

if {${name} ne ${subport}} {
    patchfiles-append   no_2to3.diff
    post-patch {
        system -W ${worksrcpath} "${prefix}/bin/2to3-${python.branch} --write --nobackups behave"
        }

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

    depends_run-append \
                    port:py${python.version}-colorama \
                    port:py${python.version}-cucumber-tag-expressions \
                    port:py${python.version}-parse \
                    port:py${python.version}-parse-type \
                    port:py${python.version}-six

    depends_test-append \
                    port:py${python.version}-pyhamcrest \
                    port:py${python.version}-mock \
                    port:py${python.version}-path \
                    port:py${python.version}-pytest-html

    test.run        yes

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