%global pkgvers 1 %global scdate0 20240205 %global schash0 bc22e0f0c71a244e634a73c89fee9d1bec85190f %global branch0 master %global source0 https://github.com/deepmind/tree.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: dm-tree Version: 0.1.8 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: Library for working with nested data structures License: Apache URL: https://github.com/deepmind/tree.git Patch0: 73.patch BuildRequires: git gcc-c++ cmake python3-devel python3-setuptools pybind11-devel BuildRequires: abseil-cpp-devel python3dist(wrapt) python3dist(numpy) python3dist(absl-py) Requires: tensorflow python3dist(wrapt) python3dist(numpy) python3dist(absl-py) python3dist(attrs) %global debug_package %{nil} %description Tree is a library for working with nested data structures. %package python3 Summary: %{summary} Provides: dm-tree %description python3 Tree is a library for working with nested data structures. %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 %patch0 -p1 -b .ext~ %build sed -i 's|SYSTEM ||g' tree/CMakeLists.txt sed -i 's|CMAKE_CXX_STANDARD 14|CMAKE_CXX_STANDARD 17|g' tree/CMakeLists.txt sed -i '1 i set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)' tree/CMakeLists.txt sed -i '1 i set(CMAKE_PREFIX_PATH "/usr/lib64/cmake/absl")' tree/CMakeLists.txt sed -i 's|strings throw_delegate|strings throw_delegate raw_logging_internal|g' tree/CMakeLists.txt sed -i '1 i #include ' tree/tree.cc %py3_build %install %py3_install %files python3 %license LICENSE %doc docs %doc README.md %{python3_sitearch}/* %changelog * Thu Apr 14 2022 Cristian Balint - git update releases