%global pypi_name llvmlite %global forgeurl https://github.com/numba/llvmlite Name: python-%{pypi_name} Version: 0.37.0 Release: 1%{?dist} Summary: lightweight wrapper around basic LLVM functionality %forgemeta License: BSD URL: http://llvmlite.pydata.org Source0: %{forgesource} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: llvm11-devel BuildRequires: gcc-c++ %global _description %{expand: llvmlite provides a Python binding to LLVM for use in Numba. Numba previously relied on llvmpy. While llvmpy exposed large parts of the LLVM C++ API for direct calls into the LLVM library, llvmlite takes an entirely different approach. Llvmlite starts from the needs of a JIT compiler and splits them into two decoupled tasks: - Construction of a Module, function by function, Instruction by instruction. - Compilation and optimization of the module into machine code. The construction of an LLVM module does not call the LLVM C++ API. Rather, it constructs the LLVM intermediate representation (IR) in pure Python. This is the role of the IR layer. The compilation of an LLVM module takes the IR in textual form and feeds it into LLVM's parsing API. It then returns a thin wrapper around LLVM's C++ module object. This is the role of the binding layer. Once parsed, the module's source code cannot be modified, which loses the flexibility of the direct mapping of C++ APIs into Python that was provided by llvmpy but saves a great deal of maintenance.} %description %_description %package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{summary} %description -n python%{python3_pkgversion}-%{pypi_name} %_description %package doc Summary: %{summary} BuildRequires: python%{python3_version}dist(sphinx) BuildRequires: python%{python3_version}dist(sphinx-rtd-theme) %description doc Documentation for %{pypi_name}. %prep %autosetup -n %{pypi_name}-%{version} %build export LLVM_CONFIG="%{_libdir}/llvm11/bin/llvm-config" CFLAGS="$RPM_OPT_FLAGS" %{python3} setup.py build make -C docs SPHINXBUILD=sphinx-build-3 html rm -rf docs/_build/html/{.doctrees,.buildinfo,_static/EMPTY} %install %{python3} setup.py install --skip-build --root %{buildroot} %check export LLVM_CONFIG="%{_libdir}/llvm11/bin/llvm-config" export PYTHONPATH=%{buildroot}%{python3_sitearch} %{python3} setup.py test %files -n python%{python3_pkgversion}-%{pypi_name} %doc CHANGE_LOG README.rst %{python3_sitearch}/%{pypi_name} %{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %files doc %license LICENSE %doc docs/_build/html examples/ %changelog * Wed Dec 15 2021 mockbuilder - 0.37.0-1 - Initial package.