# -*- 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-http-parser
version             0.8.3
revision            0

categories          python www
license             MIT PSF
maintainers         {petr @petrrr} openmaintainer

description         HTTP request/response parser
long_description    HTTP request/response parser for Python. If possible a \
                    C parser based on http-parser from Ryan Dahl will be used.

homepage            https://github.com/benoitc/http-parser

checksums           rmd160  5953b6a238917e14b1bf6c1e4f995fbac03463b5 \
                    sha256  e2aff90a60def3e476bd71694d8757c0f95ebf2fedf0a8ae34ee306e0b20db83 \
                    size    83040

python.versions     27

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

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

        delete ${dest_doc}/examples
        copy ${worksrcpath}/examples ${dest_doc}/examples
    }
}
