%global pkgvers 0 %global scdate0 20260311 %global schash0 c93664d5851bd6380f7c553a1c7575e96749da14 %global branch0 main %global source0 https://github.com/overcat/fastcrc.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: python-fastcrc Version: %(curl -s https://raw.githubusercontent.com/overcat/fastcrc/%{schash0}/Cargo.toml | grep version | sed 's|[^[:digit:].]||g') Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: A hyper-fast Python module for computing CRC License: MIT URL: https://github.com/overcat/fastcrc.git BuildRequires: git cargo maturin python3-devel python3-setuptools python3-pip %if 0%{?rhel} == 10 BuildRequires: pyproject-rpm-macros %endif %global debug_package %{nil} %define __strip /usr/bin/strip --strip-all %description A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum. %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 %generate_buildrequires %build %global optflags %(echo "%{optflags} -fpermissive") %pyproject_wheel %install %pyproject_install # deps #sed -i 's|Requires-Dist: ||g' %{buildroot}%{python3_sitearch}/*.dist-info/METADATA #sed -i 's|Provides-Extra: ||g' %{buildroot}%{python3_sitearch}/*.dist-info/METADATA # clean #rm -rf %{buildroot}%{python3_sitearch}/third_party %files %license LICENSE %doc README.rst %{python3_sitearch}/fastcrc %{python3_sitearch}/*.*-info %changelog * Thu Mar 26 2026 Cristian Balint - github release updates