# -*- 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-lmfit
version             1.3.4
revision            1

categories-append   math
platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         {gmail.com:jjstickel @jjstickel} {reneeotten @reneeotten} openmaintainer

description         Least-Squares Minimization with Bounds and Constraints
long_description    Built on top of scipy.optimize, lmfit provides a\
                    Parameter object which can be set as fixed or free,\
                    can have upper and/or lower bounds, or can be written\
                    in terms of algebraic constraints of other Parameters.

homepage            https://lmfit.github.io/lmfit-py/

checksums           rmd160  392f328ab2b32093060c482d987fe42ddee5c8c6 \
                    sha256  3c22c28c43f717f6c5b4a3bd81e893a2149739c26a592c046f2e33c23cfbe497 \
                    size    630720

python.versions     310 311 312 313 314

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

    depends_lib-append \
                    port:py${python.version}-asteval \
                    port:py${python.version}-dill \
                    port:py${python.version}-numpy \
                    port:py${python.version}-scipy \
                    port:py${python.version}-uncertainties

    test.run        yes

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