File sublime-music.spec of Package sublime-music

#
# spec file for package sublime-music
#
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
#
# 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:           sublime-music
Version:        0.11.13
Release:        0
Summary:        A native GTK *sonic client
License:        GPL-3.0-or-later
URL:            https://sublimemusic.app
Source:         https://gitlab.com/sublime-music/sublime-music/-/archive/v%{version}/sublime-music-v%{version}.tar.bz2
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  python-dephell-rpm-macros
BuildRequires:  python-rpm-macros
BuildRequires:  python3-Sphinx
BuildRequires:  python3-setuptools
BuildRequires:  python38-dephell
# SECTION test requirements
BuildRequires:  python3-Levenshtein >= 0.12.0
BuildRequires:  python3-bleach >= 3.3.0
BuildRequires:  python3-dataclasses-json >= 0.5.2
BuildRequires:  python3-deepdiff >= 5.0.2
BuildRequires:  python3-fuzzywuzzy >= 0.18.0
BuildRequires:  python3-gobject >= 3.38.0
BuildRequires:  python3-peewee >= 3.13.3
BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-cov
BuildRequires:  python3-python-dateutil >= 2.8.1
BuildRequires:  python3-python-mpv >= 0.5.2
BuildRequires:  python3-requests >= 2.24.0
BuildRequires:  python3-semver >= 2.10.2
BuildRequires:  typelib-1_0-Gtk-3_0
BuildRequires:  typelib-1_0-Pango-1_0
BuildRequires:  girepository-1_0
# /SECTION
Requires:       python3-Levenshtein >= 0.12.0
Requires:       python3-bleach >= 3.3.0
Requires:       python3-dataclasses-json >= 0.5.2
Requires:       python3-deepdiff >= 5.0.2
Requires:       python3-fuzzywuzzy >= 0.18.0
Requires:       python3-gobject >= 3.38.0
Requires:       python3-peewee >= 3.13.3
Requires:       python3-python-dateutil >= 2.8.1
Requires:       python3-python-mpv >= 0.5.2
Requires:       python3-ordered-set == 4.0.2
Requires:       python3-requests >= 2.24.0
Requires:       python3-semver >= 2.10.2
Requires:       typelib-1_0-Gtk-3_0
Requires:       typelib-1_0-Pango-1_0
Requires:       girepository-1_0
Suggests:       typelib-1_0-Notify-0_7
Suggests:       python3-bottle >= 0.12.18
Suggests:       python3-keyring >= 23.0.0
Suggests:       python3-pychromecast >= 9.1.1
BuildArch:      noarch

%description
A native GTK *sonic client.

%prep
%setup -q -n %{name}-v%{version}

%build
%dephell_gensetup
%python3_build
%make_build -C docs man

%install
%python3_install
%fdupes %{buildroot}%{python3_sitelib}
install -Dm 0644 sublime-music.desktop %{buildroot}%{_datadir}/applications/sublime-music.desktop
install -Dm 0644 sublime-music.metainfo.xml %{buildroot}%{_datadir}/metainfo/sublime-music.metainfo.xml
install -Dm 0644 docs/_build/man/sublime-music.1 %{buildroot}%{_mandir}/man1/sublime-music.1
for size in 16 22 32 48 64 72 96 128 192 512 1024; do
    install -Dm 0644 logo/rendered/${size}.png %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/sublime-music.png
done

%check
# FIXME: have a closer look at the failing tests (sefaults!)
rm tests/common_ui_tests.py
rm tests/adapter_tests/subsonic_adapter_tests.py
python3 -m pytest -v

%files
%license LICENSE
%doc CHANGELOG.rst README.rst
%{_bindir}/sublime-music
%{_datadir}/icons/hicolor/
%{_mandir}/man1/sublime-music.1%{?ext_man}
%{_datadir}/applications/sublime-music.desktop
%{_datadir}/metainfo/sublime-music.metainfo.xml
%{python3_sitelib}/sublime_music*

%changelog
openSUSE Build Service is sponsored by