# -*- 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                 0.9.12
categories-append       math
license                 BSD
maintainers             {gmail.com:jjstickel @jjstickel} {gmail.com:ottenr.work @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.
platforms               darwin
homepage                https://lmfit.github.io/lmfit-py/
master_sites            pypi:l/lmfit/
distname                lmfit-${version}

checksums               rmd160  dc4bb6835e34fadd8786c1dd760f09df694dba6b \
                        sha256  a8fb058f8ab792fbd01a5d7a659f630822a279c780210df6e32640e1aba58d31 \
                        size    1569497

python.versions         27 34 35 36 37

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

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

    depends_test-append port:py${python.version}-pytest
    test.run            yes
    test.cmd            py.test-${python.branch}
    test.target
    test.env            PYTHONPATH=${worksrcpath}/build/lib

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

    livecheck.type      none
}