# -*- 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 3.0.1 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
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  eb40b9bc147beeb989e7a6286a66d9bcfde786bf \
                    sha256  82954a85a6a5876a298a8f1567590321d9fa67bcc33f99063511f1fd55591640 \
                    size    823858

python.versions     310 311 312
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}-mdit-py-plugins \
                        port:py${python.version}-beautifulsoup4 \
                        port:py${python.version}-pytest-regressions

    test.run            yes
    test.args           -k 'not test_sphinx_builds and not test_fixtures'
}
