# -*- 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-xmltodict
version             0.12.0
revision            0

categories-append   devel
platforms           darwin
supported_archs     noarch
license             MIT
maintainers         {petr @petrrr} openmaintainer

description         Makes working with XML feel like you are working with JSON
long_description    This Python module makes working with XML feel like you \
                    are working with JSON.

homepage            https://github.com/martinblech/xmltodict
master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}
distname            ${python.rootname}-${version}

checksums           rmd160  937e519c77a0289eea28c646179be0e1e785d853 \
                    sha256  50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21 \
                    size    18481

python.versions     27 35 36 37 38 39

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

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

    test.run        yes
    test.cmd        nosetests-${python.branch}
    test.target
    test.env        PYTHONPATH=${worksrcpath}/build/lib

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

    livecheck.type  none
}
