File Plots.spec of Package Plots

#
# spec file for package Plots
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           Plots
Version:        0.8.5
Release:        0
Summary:        A graph plotting app for GNOME
License:        GPL-3.0-or-later
URL:            https://github.com/alexhuntley/Plots
Source:         %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  python3-Jinja2
BuildRequires:  python3-PyGLM
BuildRequires:  python3-PyOpenGL
BuildRequires:  python3-freetype-py
BuildRequires:  python3-gobject
BuildRequires:  python3-lark
BuildRequires:  python3-numpy
BuildRequires:  python3-pip
BuildRequires:  python3-pytest
BuildRequires:  python3-wheel
BuildRequires:  update-desktop-files
Requires:       python3-Jinja2
Requires:       python3-PyGLM
Requires:       python3-PyOpenGL
Requires:       python3-freetype-py
Requires:       python3-gobject-Gdk
Requires:       python3-lark
Requires:       python3-numpy
BuildArch:      noarch

%description
Plots is a graph plotting app for GNOME. Plots makes it easy to visualise
mathematical formulae. In addition to basic arithmetic operations, it supports
trigonometric, hyperbolic, exponential and logarithmic functions, as well as
arbitrary sums and products. It can display polar equations, and both implicit
and explicit Cartesian equations.

%prep
%autosetup

%build
%python3_pyproject_wheel

%install
%python3_pyproject_install

%suse_update_desktop_file -i com.github.alexhuntley.Plots
install -m0644 -D -t %{buildroot}%{_datadir}/icons/hicolor/scalable/apps res/com.github.alexhuntley.Plots.svg
install -m0644 -D -t %{buildroot}%{_datadir}/icons/hicolor/scalable/apps res/com.github.alexhuntley.Plots-symbolic.svg
install -m0644 -D -t %{buildroot}%{_datadir}/metainfo res/com.github.alexhuntley.Plots.metainfo.xml

sed -Ei "1{\@%{_bindir}/env python[1-9]?[0-9]*@d}" %{buildroot}%{python3_sitelib}/plots/{plots,preferences}.py

%fdupes %{buildroot}%{python3_sitelib}/plots/

%files
%license COPYING
%doc README.md
%{_bindir}/plots
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%{_datadir}/metainfo/*.xml
%{python3_sitelib}/%{name}-%{version}*-info/
%{python3_sitelib}/plots/
%{python3_sitelib}/plots/locale

%changelog
openSUSE Build Service is sponsored by