# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-pyFAI
python.rootname     pyfai
version             2025.3.0
revision            1

license             MIT
maintainers         {ill.fr:coquelleni @coquellen} \
                    openmaintainer

description         Azimuthal Integration library
long_description    pyFAI is an azimuthal integration library that tries to be fast (as fast as C\
                    and even more using OpenCL and GPU).\
                    It is based on histogramming of the 2theta/Q positions of each (center of)\
                    pixel weighted by the intensity of each pixel, but parallel version use a\
                    SparseMatrix-DenseVector multiplication.

homepage            https://www.silx.org

checksums           rmd160  c9bdba463a3a127ff9e8c27e76800de887fd2030 \
                    sha256  67b3bb7625170c63c33039c738e8aff02f0f1156f68a5eae444d56b5cdd06275 \
                    size    67093744

python.versions     310 311 312 313
python.pep517_backend meson

if {${name} ne ${subport}} {
    patchfiles-append \
                     pyproject.toml.patch \
                     requirements.txt.patch

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

    if {${python.version} < 311} {
        depends_build-append \
                    port:py${python.version}-tomli
    }

    depends_lib-append \
                    port:py${python.version}-fabio \
                    port:py${python.version}-h5py \
                    port:py${python.version}-matplotlib \
                    port:py${python.version}-numexpr \
                    port:py${python.version}-numpy \
                    port:py${python.version}-scipy \
                    port:py${python.version}-silx

    build.env-append    CYTHON=${prefix}/bin/cython-${python.branch}
}
