%global srcname symengine.py %global common_description %{expand: Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library.} Name: python-symengine Version: 0.13.0 Release: %autorelease Summary: SymEngine Python Wrappers License: MIT URL: https://symengine.org/ Source0: https://github.com/symengine/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz Patch0: %{srcname}-buildfix.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: flint-devel BuildRequires: gmp-devel BuildRequires: python3-cython BuildRequires: python3-devel BuildRequires: symengine-devel %description %{common_description} %package -n python3-symengine Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-symengine %{common_description} %package -n python3-symengine-tests Summary: %{summary} tests Requires: python3-symengine %description -n python3-symengine-tests %{common_description} This package contains tests for SymEngine.py. %prep %autosetup -p1 -n %{srcname}-%{version} %build %cmake \ -DPYTHON_BIN=%{_bindir}/python3 \ -DPYTHON_INCLUDE_PATH=%{_includedir}/python%{python3_version} \ -DPYTHON_INSTALL_PATH=%{python3_sitearch} %cmake_build %install %cmake_install # Tests are installed by default, but not this file which is required: install -p -m 0644 %{_vpath_builddir}/symengine/test_utilities.py %{buildroot}%{python3_sitearch}/symengine/ %check # Tests don't produce any output: for i in symengine/tests/test_*.py; do %{py3_test_envvars} %{python3} $i done %files -n python3-symengine %license LICENSE %doc AUTHORS README.md %{python3_sitearch}/symengine %exclude %{python3_sitearch}/symengine/test_utilities.py %exclude %{python3_sitearch}/symengine/tests %files -n python3-symengine-tests %{python3_sitearch}/symengine/test_utilities.py %{python3_sitearch}/symengine/tests %changelog %autochangelog