# -*- 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-pandarm
version             0.0.7.post1
revision            0

license             AGPL-3
maintainers         {mps @Schamschula} openmaintainer
description         A pandas-centric interface to highly performant travel network \
                    analysis leveraging contraction hierarchies provided by code from \
                    the Open Source Routing Machine (OSRM).
long_description    {*}${description} Hence, the pandas routing machine, pandarm.
homepage            https://github.com/oturns/pandarm

checksums           rmd160  325bdd39294f302b092693e2c783d4071243ff23 \
                    sha256  d85fcc70860e5fc87577b7c820810e1011b298e0242f90d3aecc56e8d044f1ce \
                    size    13534867

python.versions     311 312 313 314 315

python.pep517_backend \
                    scikit

if {${name} ne ${subport}} {
    configure.cxx   clang++-mp-22

    depends_build-append \
                    port:py${python.version}-cython \
                    port:py${python.version}-setuptools_scm

    depends_lib-append  \
                    port:py${python.version}-geopandas \
                    port:py${python.version}-numpy \
                    port:py${python.version}-nanobind \
                    port:py${python.version}-pandas \
                    port:py${python.version}-scikit-learn \
                    port:py${python.version}-tables

    patchfiles      patch-CMakeLists.txt.diff

    post-patch {
        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/CMakeLists.txt
    }
}
