# -*- 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-libcst
version             1.9.0
revision            0

license             MIT
maintainers         {mps @Schamschula} openmaintainer
description         A Concrete Syntax Tree (CST) parser and serializer library for Python
long_description    {*}${description} LibCST parses Python 3.x source code as a CST tree \
                    that keeps all formatting details (comments, whitespaces, \
                    parentheses, etc). It's useful for building automated refactoring \
                    (codemod) applications and linters.
homepage            https://github.com/Instagram/LibCST

checksums           rmd160  45b4cc313d21e40ef45de5e3d35e4c185f4b5571 \
                    sha256  087b58a9afe076bb08e2d726478e1f16cb928d67ffa9092817e033c335de522a \
                    size    914739

python.versions     310 311 312 313 314

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

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

    if {${python.version} == 313} {
        depends_lib-replace \
            port:py${python.version}-yaml port:py${python.version}-yaml-ft
    }
}
