%global pkgvers 0 %global scdate0 20241111 %global schash0 083b34fcd725923d9c588da1e7d23ea581186583 %global branch0 main %global source0 https://github.com/jax-ml/ml_dtypes.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: python-ml_dtypes Version: 0.5.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: NumPy dtype extensions used in machine learning. License: Apache 2.0 URL: https://github.com/jax-ml/ml_dtypes BuildRequires: git python3-devel python3-setuptools BuildRequires: gcc-c++ python3-numpy python3-pybind11 BuildRequires: eigen3-devel pybind11-devel %if 0%{?rhel} == 8 %global debug_package %{nil} %endif %description A stand-alone implementation of several NumPy dtype extensions used in machine learning. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git submodule update --init --depth 1 third_party/eigen git log --format=fuller # py3 sed -i 's|setup(|setup(name="ml_dtypes", version="%{version}",|' setup.py %build %global optflags %(echo "%{optflags} -fpermissive") %py3_build %install %py3_install # deps sed -i '/^[^[]/ s|[!~<=>].*||' %{buildroot}%{python3_sitearch}/*.egg-info/requires.txt || true sed -i 's|Requires-Dist: ||g' %{buildroot}%{python3_sitearch}/*.egg-info/PKG-INFO || true sed -i 's|Provides-Extra: ||g' %{buildroot}%{python3_sitearch}/*.egg-info/PKG-INFO || true # clean rm -rf %{buildroot}%{python3_sitearch}/third_party %files %license LICENSE %doc README.md %{python3_sitearch}/ml_dtypes %{python3_sitearch}/*.egg-info %changelog * Tue Jun 06 2023 Cristian Balint - github release updates