%global pkgvers 0 %global scdate0 20240411 %global schash0 78dd54e64155c7b4513008b5295803d6dab9fde8 %global branch0 master %global source0 https://github.com/capnproto/pycapnp.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: pycapnp Version: 2.0.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Python module for pcapnp License: BSD URL: https://github.com/capnproto/pycapnp BuildRequires: cmake gcc-c++ git capnproto-devel BuildRequires: python3-devel python3-pkgconfig python3-setuptools zlib-devel %if 0%{?fedora} > 38 BuildRequires: ((python3dist(cython) > 0.23) with (python3dist(cython) < 3~~)) %else BuildRequires: python3-Cython %endif %description Python module for pcapnp %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 # old cython %if 0%{?rhel} sed -i 's|nogil||g' capnp/helpers/helpers.pxd %endif %build %py3_build %install %py3_install %files %license LICENSE.md %doc README.md %{_bindir}/* %{python3_sitearch}/* %changelog * Fri Jul 02 2021 Cristian Balint - github upstream releases