%global pkgvers 1 %global scdate0 20260306 %global schash0 85bb3304d2b518869088d12d38d5e0f1c094d3fd %global branch0 main %global source0 https://github.com/huggingface/pytorch-image-models.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: python-timm Version: %(curl -s https://raw.githubusercontent.com/huggingface/pytorch-image-models/%{schash0}/timm/version.py | grep __version__ | sed 's|[^[:digit:].]||g') Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: THe largest collection of PyTorch image encoders / backbones. License: Apache 2.0 BuildArch: noarch URL: https://github.com/jax-ml/ml_dtypes BuildRequires: git python3-devel python3-setuptools python3-pip BuildRequires: python3-pdm-backend %if 0%{?rhel} == 10 BuildRequires: pyproject-rpm-macros %endif %description The largest collection of PyTorch image encoders / backbones. %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 log --format=fuller # requirements sed -i 's|"numpy~=.*"|"numpy"|' pyproject.toml sed -i 's|"setuptools~=.*"|"setuptools"|' pyproject.toml # fc42 license %if 0%{?fedora} == 42 sed -i '/license/d' pyproject.toml %endif %generate_buildrequires %build %global optflags %(echo "%{optflags} -fpermissive") %pyproject_wheel %install %pyproject_install # deps sed -i 's|Requires-Dist: ||g' %{buildroot}%{python3_sitelib}/*.dist-info/METADATA sed -i 's|Provides-Extra: ||g' %{buildroot}%{python3_sitelib}/*.dist-info/METADATA # clean rm -rf %{buildroot}%{python3_sitearch}/third_party %files %license LICENSE %doc README.md %{python3_sitelib}/timm %{python3_sitelib}/*.*-info %changelog * Fri Mar 06 2026 Cristian Balint - github release updates