# -*- 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.8.6
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  7a65a18882640ae64d9ddb59bd14386ed136e70c \
                    sha256  f729c37c9317126da9475bdd06a7208eb52fcbd180a6341648b45a56b4ba708b \
                    size    891354

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
    }
}
