# -*- 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        mwouts jupytext 1.16.1 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball

name                py-jupytext
revision            0
categories-append   devel
maintainers         {gmail.com:jjstickel @jjstickel} openmaintainer
license             MIT
supported_archs     noarch
platforms           {darwin any}

python.versions     310 311 312
python.pep517_backend   hatch

description         Jupyter Notebooks as Markdown Documents, Julia, Python or R Scripts

long_description    Jupytext can save Jupyter notebooks as Markdown and R \
                    Markdown documents and Scripts in many languages. It can \
                    also convert these documents **into** Jupyter Notebooks, \
                    allowing you to synchronize content in both directions.

checksums           rmd160  42d6415a0f1e6d6b0f4acacdb1ac8dbc12d18cdc \
                    sha256  74c03ea1f1d525731ca96355f381838df51fd0724020ea8319330c55af68a6ac \
                    size    4590143

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-hatch-jupyter-builder \
                        port:py${python.version}-jupyterlab \
                        port:npm10
    depends_lib-append  port:py${python.version}-nbformat \
                        port:py${python.version}-mdit-py-plugins \
                        port:py${python.version}-markdown-it-py \
                        port:py${python.version}-packaging \
                        port:py${python.version}-yaml \
                        port:py${python.version}-toml

    patchfiles-append   patch-pyproject.toml.diff

    build.env-append    PATH=${prefix}/Library/Frameworks/Python.framework/Versions/${python.branch}/bin:$::env(PATH)
}
