# -*- 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-webtest
python.rootname     WebTest

version             3.0.0
revision            0
maintainers         nomaintainer
platforms           {darwin any}
supported_archs     noarch

description         Helper to test WSGI applications
long_description    {*}${description}
license             MIT
homepage            https://pypi.python.org/pypi/WebTest/

checksums           rmd160  4ba2315da8dd5ff68bfa75736d2708790fe5bfe4 \
                    sha256  54bd969725838d9861a9fa27f8d971f79d275d94ae255f5c501f53bb6d9929eb \
                    size    75871

python.versions     310 311 312

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

    depends_test-append \
                    port:py${python.version}-coverage \
                    port:py${python.version}-mock \
                    port:py${python.version}-pastedeploy \
                    port:py${python.version}-pyquery
                    # TODO: misisng test dependency WSGIProxy2

    test.run        yes
    python.test_framework nose

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst license.rst \
            CHANGELOG.rst contributing.md RELEASING.rst ${destroot}${docdir}
    }
}
