# -*- 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-docstring-to-markdown
version             0.17
revision            1

categories-append   devel
platforms           {darwin any}
supported_archs     noarch
license             LGPL-2.1+
maintainers         {reneeotten @reneeotten} openmaintainer

description         On the fly conversion of Python docstrings to markdown
long_description    {*}${description}

homepage            https://github.com/python-lsp/docstring-to-markdown

distname            docstring_to_markdown-${version}

checksums           rmd160  7e9115813f7691399a0c680170f4404e2f95fe21 \
                    sha256  df72a112294c7492487c9da2451cae0faeee06e86008245c188c5761c9590ca3 \
                    size    32260

python.versions     310 311 312 313 314

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-importlib-metadata \
                    port:py${python.version}-typing_extensions

    test.run        yes
    test.env-append PYTHONPATH=${destroot}${python.pkgd}

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