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

github.setup        gotcha ipdb 0.13.13
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
name                py-ipdb

platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         nomaintainer

description         An enhanced Interactive Python shell
long_description    Provide an interactive shell superior to Python's default. \
                    Serve as an embeddable, ready to use interpreter for your own programs. \
                    Offer a flexible framework which can be used as the base environment for \
                    other systems with Python as the underlying language.  \
                    Allow interactive testing of threaded graphical toolkits.

checksums           rmd160  ea110bf740e026b06fe58e814b6d77268dd28d77 \
                    sha256  9d21dd5d0ccc7c4538f71f704e8b5ae136c2da79913332eb323c5997e00fd48d \
                    size    13456

python.versions     310 311 312 313

if {${name} ne ${subport}} {
    depends_lib-append \
                    port:py${python.version}-ipython

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README.rst HISTORY.txt \
            COPYING.txt AUTHORS ${destroot}${docdir}
    }

    test.run        yes

    depends_run     port:ipdb_select

    select.group    ipdb
    select.file     ${filespath}/ipdb${python.version}

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

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