# -*- 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.3
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  ee23e4c842979fdb630630fa0eb53b1bb542c43c \
                    sha256  95ce33057ba4d05df50b1f3cfefab22e351868a843b3b15a46c65836283670c9 \
                    size    692316

python.versions     39 310 311 312 313

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
}

