%global pkgvers 0 %global scdate0 20230419 %global schash0 8faa584b69e692b58b42cd3dd42f9b728d175e69 %global branch0 master %global source0 https://github.com/ducha-aiki/kornia_moons.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: kornia-moons Summary: Helper functions for navigating the space Version: %(curl -s "https://raw.githubusercontent.com/ducha-aiki/kornia_moons/%{schash0}/kornia_moons/__init__.py" | cut -d'"' -f2 | sed 's/[^0-9,.]*//g') Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} License: Apache BuildArch: noarch URL: https://ducha-aiki.github.io/kornia_moons BuildRequires: make gcc-c++ git BuildRequires: python3-setuptools python3-devel python3-pytest-runner %description Helper functions for navigating the space around planet Kornia. %package python3 Summary: Development files for python Requires: pkgconfig Provides: kornia-moons Requires: kornia pytorch-python3 torch-vision-python3 %description python3 This package contains the python libraries. %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 %build %{__python3} setup.py build %install rm -rf %{buildroot} %{__python3} setup.py install --root %{buildroot} rm -rf %{buildroot}%{python3_sitelib}/*.egg-info %files python3 %license LICENSE %doc data %doc README.md %{python3_sitelib}/* %changelog * Sat Apr 02 2022 Balint Cristian - github build releases