# -*- 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-readability-lxml
version             0.8.1
revision            0
categories-append   textproc
platforms           {darwin any}
license             Apache-2
supported_archs     noarch
maintainers         nomaintainer

description         fast html to text parser (article readability tool)
long_description    {*}${description}

homepage            https://github.com/buriy/python-readability

checksums           rmd160  df491e4c463f7816f2269740cc63fc18926bcc93 \
                    sha256  e51fea56b5909aaf886d307d48e79e096293255afa567b7d08bca94d25b1a4e1 \
                    size    15878

python.versions     310 311 312 313

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-chardet \
                    port:py${python.version}-cssselect \
                    port:py${python.version}-lxml

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

    pre-test {
        delete       ${test.target}/__init__.py
    }

    test.run         yes
}
