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

github.setup        USEPA WNTR 0.3.0

name                py-wntr

categories-append   science
platforms           darwin
license             BSD
maintainers         {gmail.com:jjstickel @jjstickel} openmaintainer

description         The Water Network Tool for Resilience (WNTR)
long_description    The Water Network Tool for Resilience (WNTR) is an EPANET \
                    compatible Python package designed to simulate and analyze \
                    resilience of water distribution networks.

checksums           rmd160  11818a45a798d9c8c648dd6d8e7898b6ab71e29a \
                    sha256  086171dd6e52564ab2ef14330f584aef0460a0649061a06b1962a2bfe8f9874f \
                    size    9646393

python.versions     35 36 37 38

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

    depends_lib-append \
                    port:py${python.version}-networkx \
                    port:py${python.version}-pandas \
                    port:py${python.version}-scipy
    
    post-destroot {
        # remove Linux and Windows versions of epanet libraries
        delete ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/wntr/epanet/Linux
        delete ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/${python.branch}/lib/python${python.branch}/site-packages/wntr/epanet/Windows
    }

    livecheck.type  none
}
