%bcond_without tests %global _description %{expand: PyPlane is a free software for phase plane analysis of second order dynamical systems written in PYTHON and PyQT5. Comparable to MATLAB's pplane.} %global forgeurl https://github.com/TUD-RST/pyplane %global tag release %forgemeta Name: pyplane Version: 2.0.1 Summary: Phase plane analysis of nonlinear systems %global tag PyPlane_v%{version} Release: %autorelease License: GPLv3 URL: %{forgeurl} Source0: %{forgesource} #Source1: packaging/linux/pyplane.metainfo.xml #Source2: packaging/linux/pyplane.desktop BuildArch: noarch BuildRequires: python3-devel BuildRequires: libappstream-glib %if %{with tests} BuildRequires: %{py3_dist pytest} # bits not mentioned in install_requires BuildRequires: texlive-latex BuildRequires: texlive-dvipng BuildRequires: desktop-file-utils %endif # Optional but readme says they improve the graphs etc., so add them as weak # dependencies Recommends: texlive-latex Recommends: texlive-dvipng # Add virtual provides to help users find it Provides: python3-pyplane %description %_description %prep %forgesetup %generate_buildrequires # the install requirements seem to be required for tests, so include them %pyproject_buildrequires %{?with_tests:-r} # correct import in test script sed -i -e '/sys.path.append/ d' -e 's/import core./import pyplane.core./' tests/test_core.py %build %pyproject_wheel %install %pyproject_install %pyproject_save_files pyplane desktop-file-install --dir=%{buildroot}%{_datadir}/applications packaging/linux/pyplane.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/pyplane.desktop %check %if %{with tests} %{pytest} %endif %files -f %{pyproject_files} %{_datadir}/applications/pyplane.desktop %doc README.md AUTHORS %{_bindir}/pyplane %changelog %autochangelog