%global srcname ffcx %global pypi_name fenics-ffcx Name: python-%{pypi_name} Version: 0.11.0 Release: %autorelease Summary: The FEniCSx form compiler License: LGPL-3.0-or-later URL: https://github.com/FEniCS/ffcx Source: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest BuildRequires: cmake >= 3.21 BuildRequires: gcc %global _description %{expand: FFCx is the form compiler of the FEniCSx project. It takes a variational form expressed in UFL and generates efficient C code implementing the corresponding finite element kernels, following the UFCx interface.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} Requires: ufcx-devel = %{version}-%{release} # Generated kernels are compiled at runtime via cffi Requires: gcc Requires: python3-cffi %description -n python3-%{pypi_name} %_description %package -n ufcx-devel Summary: UFCx interface header for finite element kernels Provides: ufcx = %{version}-%{release} Requires: cmake-filesystem %description -n ufcx-devel The UFCx C header defining the interface between form compilers and finite element assemblers, together with its pkg-config and CMake configuration. Required to build DOLFINx and any code consuming FFCx-generated kernels. %prep %autosetup -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel # UFCx header / pkgconfig / CMake config. ufcx is an INTERFACE target, so # nothing lands in %%{_libdir} and the package stays noarch. Upstream installs # its CMake config under %%{_datadir}/ufcx/cmake, which find_package() searches. %cmake -S cmake %cmake_build %install %pyproject_install %pyproject_save_files -l ffcx %cmake_install %check %pyproject_check_import test -f %{buildroot}%{_includedir}/ufcx.h test -f %{buildroot}%{_datadir}/pkgconfig/ufcx.pc %files -n python3-%{pypi_name} -f %{pyproject_files} %doc README.md ChangeLog.rst AUTHORS %{_bindir}/ffcx %files -n ufcx-devel %license LICENSE COPYING COPYING.LESSER %{_includedir}/ufcx.h %{_datadir}/pkgconfig/ufcx.pc %{_datadir}/ufcx/ %changelog %autochangelog