# -*- 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-ml_dtypes
version             0.5.4
revision            0
categories-append   devel
license             Apache-2

maintainers         nomaintainer

description         NumPy dtype extensions used in machine learning

long_description    {*}${description}

homepage            https://github.com/jax-ml/ml_dtypes

checksums           rmd160  5cf37cc8c67fe84ae8a0af7eda7f30326cbf6662 \
                    sha256  8ab06a50fb9bf9666dd0fe5dfb4676fa2b0ac0f31ecff72a6c3af8e22c063453 \
                    size    692314

python.versions     310 311 312 313 314

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

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

    # remove unnecessary dependencies and version pinning
    # diff -NaurdwB ./py-ml_dtypes-orig ./py-ml_dtypes-new | sed -E -e 's/\.\/py-ml_dtypes-(orig|new)/\./g' | sed -E -e 's|/opt/local|@@PREFIX@@|g' > ~/Downloads/patch-pyproject_toml.diff
    patchfiles-append       patch-pyproject_toml.diff

    compiler.cxx_standard   2017
}

