# -*- 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-blosc
version             1.11.2
revision            0
categories-append   devel
license             MIT

python.versions     310 311 312 313

maintainers         {stromnov @stromnov} openmaintainer

description         Python package that wraps the Blosc compressor

long_description    Blosc (http://blosc.pytables.org) is a high performance \
                    compressor optimized for binary data.  It has been \
                    designed to transmit data to the processor cache faster \
                    than the traditional, non-compressed, direct memory fetch \
                    approach via a memcpy() OS call. \
                    \
                    Blosc works well for compressing numerical arrays that \
                    contains data with relatively low entropy, like sparse \
                    data, time series, grids with regular-spaced values, etc. \
                    \
                    This is a Python package that wraps it.

homepage            http://python-blosc.blosc.org/

checksums           rmd160  d0a435c8f67166a51f973b5b5475508d0047d512 \
                    sha256  ac5e7c1bfc1c7232b900be94cddb5ffcf9ea49f313c8ae98a7ca0dd87b872bf4 \
                    size    1434010

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-scikit-build \
                        path:bin/cmake:cmake \
                        port:ninja \
                        port:py${python.version}-cpuinfo

    depends_lib-append  port:blosc

    patchfiles-append   patch-setup.py.diff \
                        patch-pyproject.toml.diff

    build.env-append    USE_SYSTEM_BLOSC=1

    depends_test-append port:py${python.version}-numpy \
                        port:py${python.version}-psutil

    test.run            yes
    python.test_framework
    test.cmd            ${python.bin} -m blosc.test
}
