# -*- 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           select 1.0

name                py-trepan3k
version             1.5.0
revision            0

categories-append   devel
supported_archs     noarch
platforms           {darwin any}
license             GPL-3+
maintainers         {reneeotten @reneeotten} openmaintainer

description         A gdb-like Python 3 Debugger in the Trepan family
long_description    This is a gdb-like debugger for Python. It is a rewrite of pdb \
                    from the ground up. A command-line interface (CLI) is provided \
                    as well as an remote access interface over TCP/IP.

homepage            https://github.com/rocky/python3-trepan

checksums           rmd160  642f850ae6509993ce548c036f32759af5382970 \
                    sha256  e08b78c1e3e7e120fab4d0959c063f8532740cd38b9c8181fb8bdfac7e80657d \
                    size    430525

python.versions     310 311 312 313

if {${subport} ne ${name}} {
    depends_run-append \
                    port:py${python.version}-columnize \
                    port:py${python.version}-pyficache \
                    port:py${python.version}-pygments \
                    port:py${python.version}-spark_parser \
                    port:py${python.version}-tracer \
                    port:py${python.version}-term-background \
                    port:py${python.version}-uncompyle6 \
                    port:py${python.version}-xdis \
                    port:trepan3k_select

    post-destroot {
        # do not install "test" directory into ".../site-packages"
        move ${destroot}${python.pkgd}/test ${destroot}${python.pkgd}/${python.rootname}

        file delete -force ${destroot}/${python.prefix}/trepan
    }

    depends_test-append \
                    port:py${python.version}-pyficache

    test.run        yes
    python.test_framework nose

    select.group    trepan3k
    select.file     ${filespath}/trepan${python.version}

    notes "
To make the Python ${python.branch} version of ${python.rootname} the one that is run\
when you execute the commands without a version suffix, e.g. '${python.rootname}', run:

sudo port select --set ${select.group} [file tail ${select.file}]
"
}
