%global pkgvers 0 %global scdate0 20240614 %global schash0 5c181ff3af1de04d4bd70fb0ee287aa81d1fe198 %global branch0 main %global source0 https://github.com/numba/llvmlite.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: llvmlite Summary: LLVM python binding for writing JIT compilers Version: 0.44.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} License: MIT URL: https://llvmlite.readthedocs.io BuildRequires: make gcc-c++ git BuildRequires: python3-devel python3-setuptools %if 0%{?fedora} > 36 BuildRequires: llvm14 llvm14-devel %endif %if 0%{?rhel} > 7 BuildRequires: llvm-devel < 15 %endif %global _python_dist_allow_version_zero 1 %description A lightweight LLVM python binding for writing JIT compilers %package python3 Summary: Development files for python Requires: pkgconfig %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 # py vers sed -i '/^_guard_py_ver()/d' setup.py # llvm vers %if 0%{?fedora} > 35 sed -i '1i #include "llvm/Pass.h"' ffi/passmanagers.cpp sed -i 's|llvm/Support/TargetRegistry.h|llvm/MC/TargetRegistry.h|' ffi/targets.cpp %endif # build export CXXFLAGS="%{optflags} -fPIC" export LLVM_CONFIG="llvm-config-64" export LLVMLITE_SKIP_LLVM_VERSION_CHECK=1 %if 0%{?fedora} > 36 export PATH=$PATH:%{_libdir}/llvm14/bin/ export LLVM_CONFIG=%{_libdir}/llvm14/bin/llvm-config %endif %{__python3} setup.py build %install %{__python3} setup.py install -O1 --skip-build --root %{buildroot} %files python3 %license LICENSE %doc README.rst %{python3_sitearch}/* %changelog * Fri Mar 29 2019 Balint Cristian - github upstream releases