# -*- 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-elementtree
# if version or revision change, be sure to update the py24 subport revision
version			1.2.6-20050316
python.versions 27
platforms		darwin
maintainers		{snc @nerdling} openmaintainer
license         MIT
supported_archs noarch

description		flexible container object for python
long_description	The Element type is a simple but flexible container \
				object, designed to store hierarchical data structures, such \
				as simplified XML infosets, in memory. The element type can be \
				described as a cross between a Python list and a Python \
				dictionary.

homepage		http://effbot.org/zone/element-index.htm

if {${name} ne ${subport}} {
    master_sites	http://effbot.org/downloads/
    distname		elementtree-${version}
    checksums           rmd160  813aaf07a0fcdfb23d29b648a8e082e1674539f5 \
                        sha256  b5dd2c4e234f325abc1c7fb17815cb6cbcfef062f01065ddb05a6d6b96452f18
    use_zip			yes
    patchfiles		patch-setup.py.diff

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

    post-extract { file copy ${filespath}/ez_setup.py ${worksrcpath} }

    test.run		yes
    test.cmd		${python.bin}
    test.target		selftest.py

    post-destroot	{
        xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${prefix}/share/doc/${subport}/examples
        xinstall -m 644 -W ${worksrcpath}/samples simple-ns.xml simple.xml \
            ${destroot}${prefix}/share/doc/${subport}/examples
        file copy {*}[glob ${worksrcpath}/docs/*] \
            ${destroot}${prefix}/share/doc/${subport}
    }
}
livecheck.type  none
notes "Warning The xml.etree.ElementTree module is not secure against maliciously constructed data. If you need to parse untrusted or unauthenticated data see {https://docs.python.org/2/library/xml.html#xml-vulnerabilities XML vulnerabilities}."