# -*- 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           github 1.0
PortGroup           python 1.0

github.setup        martin-majlis Wikipedia-API 0.5.4
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                py-wikipedia-api
revision            0
supported_archs     noarch
platforms           {darwin any}
license             MIT

python.versions     310

maintainers         {@srirangav} openmaintainer

description         ${name} is a python wrapper for Wikipedia's API
long_description    ${name} is a python wrapper for Wikipedia's API \
                    that supports extracting text, sections, links, \
                    categories, translations, etc. for Wikipedia entries.

checksums           rmd160  cd86d23f4ca6bbbab52492664805edf789dec4eb \
                    sha256  94e1a02b5d8ffb142c52721ff72661c27eaafccfc7c56f436a5609adb3de46ac \
                    size    26268

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

    depends_lib-append \
                        port:py${python.version}-requests

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