%global pypi_name ml_dtypes Name: python-%{pypi_name} Version: 0.5.4 Release: 1%{?dist} Summary: A stand-alone implementation of several NumPy dtype extensions License: Apache-2.0 URL: https://github.com/jax-ml/ml_dtypes Source0: %{url}/archive/v%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: eigen3-devel BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-numpy python3-pybind11 pybind11-devel # For tests # Tests fail in koji # BuildRequires: python3-pytest # BuildRequires: python3-absl-py %global _description %{expand: A stand-alone implementation of several NumPy dtype extensions used in machine learning. } %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} sed -i 's|"numpy~=.*"|"numpy"|' pyproject.toml sed -i 's|"setuptools~=.*"|"setuptools"|' pyproject.toml rm -rf third_party sed -i 's#Eigen/Core#eigen3/Eigen/Core#' ml_dtypes/include/mxfloat.h ml_dtypes/include/float8.h ml_dtypes/_src/intn_numpy.h ml_dtypes/_src/custom_float.h ml_dtypes/_src/dtypes.cc ml_dtypes/_src/common.h ml_dtypes/tests/intn_test.cc %generate_buildrequires %pyproject_buildrequires %build %global optflags %(echo "%{optflags} -fpermissive") %pyproject_wheel %install %pyproject_install %pyproject_save_files ml_dtypes %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %changelog * Mon Nov 24 2025 Peter Robinson - 0.5.4-1 - Initial package