%global pkgvers 0 %global scdate0 20240110 %global schash0 1118b9c69cf592d705f86f087aa72ab07e8d853c %global branch0 master %global source0 https://github.com/kornia/kornia.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: kornia Summary: Computer Vision 2.0 library Version: 0.7.1 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} License: Apache BuildArch: noarch URL: https://github.com/kornia/kornia BuildRequires: make gcc-c++ git BuildRequires: python3-setuptools python3-devel python3-pytest-runner %if 0%{?fedora} BuildRequires: python3-sphinx-copybutton python3-sphinx-autodoc-typehints %endif Requires: pytorch-python3 Requires: torch-vision-python3 %description Kornia is a differentiable computer vision library for PyTorch. %package python3 Summary: Development files for python Provides: kornia %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 echo "import setuptools; setuptools.setup()" > setup.py %{__python3} setup.py build %install rm -rf %{buildroot} %{__python3} setup.py install --root %{buildroot} # install docs export PYTHONPATH=%{buildroot}/%{python3_sitelib} pushd docs sed -i '/sphinx_autodoc_defaultargs/d' source/conf.py sed -i '/sphinxcontrib.youtube/d' source/conf.py sed -i '/sphinx_design/d' source/conf.py #make latexpdf LATEXMKOPTS="-f -interaction=nonstopmode" || true popd # remove spurious rm -rf %{buildroot}/usr/x.txt rm -rf %{buildroot}/usr/dev.txt %files python3 %license LICENSE %doc docs %doc README.md %{python3_sitelib}/* %changelog * Tue Sep 14 2021 Balint Cristian - github build releases