# -*- 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-control
version             0.10.2

categories-append   science
license             BSD
platforms           {darwin any}
supported_archs     noarch
maintainers         nomaintainer

description         Python package for feedback control systems
long_description    \
    The Python Control Systems Library, python-control, is a python package that \
    implements basic operations for analysis and design of feedback control \
    systems.

homepage            https://python-control.readthedocs.io

checksums           rmd160  6cf20adf2afbccda62ebe662ece3300ebc2897a7 \
                    sha256  d0cf63f6cfb68a4c8e827c26c3744d129e9777fedc9a5d86ca4740548f23a98b \
                    size    12407506

python.versions     310 311 312 313 314

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

    depends_lib-append \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-numpy \
                    port:py${python.version}-scipy

    depends_test-append \
                    port:py${python.version}-numpydoc \
                    port:py${python.version}-pytest-timeout

    test.run        yes

    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc/${subport}/examples
        xinstall -m 0644 -W ${worksrcpath} ChangeLog LICENSE \
            README.rst ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 {*}[glob ${worksrcpath}/examples/*] \
            ${destroot}${prefix}/share/doc/${subport}/examples
    }
}
