# -*- 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.1
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  065c554206693496e60362f04bd932588e7a8bae \
                    sha256  c1480c5a78b0c426cde9fc9887190531b4e314dbda12d40b9a88b426b340b681 \
                    size    431493

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