# $Id: Portfile 64752 2010-03-15 13:16:48Z nox@macports.org $

PortSystem      1.0
PortGroup       python26 1.0

name            py26-pyxb
version         1.1.1
categories      python devel textproc
maintainers     nox openmaintainer
platforms       darwin
license         Apache-2.0
description     PyXB: Python XML Schema Bindings

long_description \
    PyXB is a pure Python package that generates Python code for classes that \
    correspond to data structures defined by XMLSchema. In concept it is \
    similar to JAXB for Java and CodeSynthesis XSD for C++.

homepage        http://pyxb.sourceforge.net/
master_sites    sourceforge:pyxb
distname        PyXB-full-${version}

checksums       md5     58af5134ca6228308d635004bf602c9a \
                sha1    eda02715333be192e25bacd7cfab5145d94fd1c8 \
                rmd160  abb50fe95665ca2ec4e1593d1d1c4c2b7961e478

post-extract {
    delete ${worksrcpath}/tests/bugs/test-200908271556.py
}

worksrcdir      PyXB-${version}

patchfiles      patch-pyxb-utils-utility.py.diff

test.run        yes
test.cmd        ${python.bin} -u setup.py

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} LICENSE NOTICE README.txt \
        ${destroot}${docdir}
    copy ${worksrcpath}/doc/html ${destroot}${docdir}/html

    set examplesdir ${prefix}/share/examples/${name}
    xinstall -d [file dirname ${destroot}${examplesdir}]
    copy ${worksrcpath}/examples ${destroot}${examplesdir}
}

universal_variant   no

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex {PyXB v(\d+(?:\.\d+)*)}
