# -*- 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-spopt
version             0.8.0
revision            0

categories-append   gis

platforms           {darwin any}
supported_archs     noarch
license             BSD
maintainers         nomaintainer

description         Spatial Optimization (spopt)
long_description    {*}${description} is an open-source Python library for \
                    solving optimization problems with spatial data. \
                    Originating from the region module in PySAL (Python \
                    Spatial Analysis Library), it is under active development \
                    for the inclusion of newly proposed models and methods \
                    for regionalization, facility location, and \
                    transportation-oriented solutions.

homepage            https://github.com/pysal/spopt

checksums           rmd160  88a31e73fd7c0be2618e261fe44962b6138ce57b \
                    sha256  4c74d8675d0d178cf0ae217315cbfd2c2259808298faea271909f30d154bdc9b \
                    size    33204534

python.versions     310 311 312 313 314

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

    depends_test-append \
                    port:py${python.version}-codecov \
                    port:py${python.version}-coverage \
                    port:py${python.version}-pytest \
                    port:py${python.version}-pytest-cov \
                    port:py${python.version}-pytest-xdist

    depends_run-append \
                    port:py${python.version}-geopandas \
                    port:py${python.version}-libpysal \
                    port:py${python.version}-mapclassify \
                    port:py${python.version}-networkx \
                    port:py${python.version}-numpy \
                    port:py${python.version}-pandas \
                    port:py${python.version}-pointpats \
                    port:py${python.version}-pulp \
                    port:py${python.version}-scikit-learn \
                    port:py${python.version}-scipy \
                    port:py${python.version}-shapely \
                    port:py${python.version}-spaghetti \
                    port:py${python.version}-tqdm

    if {${python.version} == 310} {
        version         0.6.1
        revision        0
        checksums       rmd160  c2c47b0126db97afff4171fcafea35c2517b5a5d \
                        sha256  22fd867543cd04325d11d7d75a68dcdf8fba4c2c2fe959ba60ccef13dc54acf7 \
                        size    30537353
    }

    test.run        yes
}
