# -*- 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             2024.5.0
revision            0

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            http://www.silx.org

checksums           rmd160  a56ff23c77aadceed2c5be522ac9355f18d81e13 \
                    sha256  c75e0c7093e2f35eb9281671f45d36835b1393b8ca7a00511345219cd68fdb65 \
                    size    57800415

python.versions     38 39 310 311 312

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 \
                    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

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

}
