%global pkgvers 0 %global scdate0 20240925 %global schash0 59a639fa977e4a2e19c6cc60b44cbc9926418710 %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 Patch0: https://github.com/capnproto/pycapnp/pull/334.patch %define _default_patch_fuzz 100 BuildRequires: cmake gcc-c++ git capnproto-devel BuildRequires: python3-devel python3-pkgconfig python3-setuptools zlib-devel BuildRequires: python3-Cython %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 %if 0%{?fedora} > 38 %patch -P 0 -p1 %endif # 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