# -*- 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-numdifftools
version             0.10.1
revision            0

categories-append   math
platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         Solve automatic numerical differentiation problems in one or more variables.
long_description    {*}${description}

homepage            https://github.com/pbrod/numdifftools

checksums           rmd160  afd2dee1611b2513ffa7c7d100e6eb90791635c4 \
                    sha256  21c38c7f562f11a2dcd478da31c167ad0bcd559c58c94920a2ddebd1995b49fb \
                    size    85419

python.versions     310 311 312 313 314
python.pep517_backend pdm

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-algopy \
                        port:py${python.version}-numpy \
                        port:py${python.version}-scipy \
                        port:py${python.version}-statsmodels

    test.run            yes
    test.env-append     PYTHONPATH=${destroot}${python.pkgd}
    test.dir            ${destroot}${python.pkgd}/numdifftools/tests

    depends_test-append port:py${python.version}-hypothesis \
                        port:py${python.version}-matplotlib \
                        port:py${python.version}-line_profiler

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