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

github.setup        executablebooks MyST-Parser 5.0.0 v
github.tarball_from archive
revision            0
name                py-myst-parser

categories-append   textproc devel
supported_archs     noarch
platforms           {darwin any}
license             MIT
maintainers         {judaew @judaew} openmaintainer

description         \
    An extended commonmark compliant parser, with bridges to docutils & sphinx.
long_description    \
    MyST is a flavor of markdown that is designed for simplicity, flexibility, \
    and extensibility. This repository serves as the reference implementation \
    of MyST Markdown, as well as a collection of tools to support working with \
    MyST in Python and Sphinx. It contains an extended CommonMark-compliant \
    parser using markdown-it-py, as well as a Sphinx extension that allows you \
    to write MyST Markdown in Sphinx.
homepage            https://github.com/executablebooks/MyST-Parser

checksums           rmd160  acbbe5a68327cca8b7a0de3e245d7655c2f90696 \
                    sha256  358c0f4a5c6a3d65f6878d0ec7dca0e1c79238e63923982bb2a3af6429e78860 \
                    size    830837

python.versions     311 312 313 314
python.pep517_backend flit

if {${name} ne ${subport}} {
    depends_run-append \
                        port:py${python.version}-docutils \
                        port:py${python.version}-jinja2 \
                        port:py${python.version}-markdown-it-py \
                        port:py${python.version}-mdit-py-plugins \
                        port:py${python.version}-sphinx \
                        port:py${python.version}-yaml

    depends_test-append \
                        port:py${python.version}-beautifulsoup4 \
                        port:py${python.version}-defusedxml \
                        port:py${python.version}-linkify-it-py \
                        port:py${python.version}-pytest-param-files \
                        port:py${python.version}-pytest-regressions \
                        port:py${python.version}-sphinx-pytest

    test.run            yes
    # Put the unpacked source on PYTHONPATH: the nested tests import myst_parser
    # from it, which is not installed during the test phase.
    test.env-append     PYTHONPATH=${worksrcpath}
}
