From d1be523cf0f37cd5440c331129d30530d8837ecaf3af50b68bdbb8dcdda2e108 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 20 Jun 2023 14:27:26 +0000 Subject: [PATCH] Accepting request 1093875 from home:bnavigator:branches:multimedia:apps - Remove obsolete python-sip (v4) module from BuildRequires - Remove obsolete distribution switches for suse_version < 1500 - Use PEP517 macros instead of deprecated setup.py - Enable tests - Add picard-requirements.patch, update requirements OBS-URL: https://build.opensuse.org/request/show/1093875 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/picard?expand=0&rev=128 --- picard-requirements.patch | 24 +++++++++++++++++ picard.changes | 9 +++++++ picard.spec | 56 +++++++++++++++++++++++---------------- 3 files changed, 66 insertions(+), 23 deletions(-) create mode 100644 picard-requirements.patch diff --git a/picard-requirements.patch b/picard-requirements.patch new file mode 100644 index 0000000..393eb3b --- /dev/null +++ b/picard-requirements.patch @@ -0,0 +1,24 @@ +diff -ur picard-release-2.8.5.o/requirements.txt picard-release-2.8.5/requirements.txt +--- picard-release-2.8.5.o/requirements.txt 2023-06-20 08:30:49.086031685 +0200 ++++ picard-release-2.8.5/requirements.txt 2023-06-20 08:31:10.326725906 +0200 +@@ -1,12 +1,8 @@ +-python-dateutil~=2.7 +-discid~=1.0 +-fasteners~=0.14 +-markdown~=3.2 +-mutagen~=1.37 +-PyJWT~=2.0 +-pyobjc-core>=6.2, <10; sys_platform == 'darwin' +-pyobjc-framework-Cocoa>=6.2, <10; sys_platform == 'darwin' +-PyQt5~=5.11 +-PyQt5-sip<=12.9.1; python_version < '3.7' +-pywin32; sys_platform == 'win32' +-pyyaml>=5.1, <7 ++python-dateutil>=2.7 ++discid>=1.0 ++fasteners>=0.14 ++markdown>=3.2 ++mutagen>=1.37 ++PyJWT>=2.0 ++PyQt5>=5.11 ++pyyaml>=5.1 diff --git a/picard.changes b/picard.changes index 1b59760..8f2ebbc 100644 --- a/picard.changes +++ b/picard.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jun 19 18:51:36 UTC 2023 - Benjamin Greiner + +- Remove obsolete python-sip (v4) module from BuildRequires +- Remove obsolete distribution switches for suse_version < 1500 +- Use PEP517 macros instead of deprecated setup.py +- Enable tests +- Add picard-requirements.patch, update requirements + ------------------------------------------------------------------- Tue Dec 6 13:48:58 UTC 2022 - Paolo Stivanin diff --git a/picard.spec b/picard.spec index f9a8925..d8b898e 100644 --- a/picard.spec +++ b/picard.spec @@ -1,7 +1,7 @@ # # spec file for package picard # -# Copyright (c) 2022 SUSE LLC +# 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 @@ -24,26 +24,40 @@ License: GPL-2.0-or-later Group: Productivity/Multimedia/Sound/Utilities URL: https://picard.musicbrainz.org Source0: https://codeload.github.com/metabrainz/picard/tar.gz/release-%{version}#/%{name}-%{version}.tar.gz +# PATCH-FIX-SUSE picard-requirements.patch, code@bnavigator.de -- clean python requirements metadata +Patch0: picard-requirements.patch BuildRequires: desktop-file-utils +BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: hicolor-icon-theme BuildRequires: libofa-devel BuildRequires: python-rpm-macros BuildRequires: python3-devel -BuildRequires: python3-fasteners -BuildRequires: python3-mutagen >= 1.37 -BuildRequires: python3-qt5 >= 5.11 +BuildRequires: python3-pip BuildRequires: python3-setuptools -BuildRequires: python3-sip +BuildRequires: python3-wheel BuildRequires: update-desktop-files -Requires: python3-Markdown -Requires: python3-PyYAML -Requires: python3-dateutil >= 2.7.3 -Requires: python3-fasteners +Requires: python3-Markdown >= 3.2 +Requires: python3-PyJWT >= 2.0 +Requires: python3-PyQt5 >= 5.11 +Requires: python3-PyYAML >= 5.1 +Requires: python3-discid >= 1.0 +Requires: python3-fasteners >= 0.14 Requires: python3-mutagen >= 1.37 -Requires: python3-qt5 >= 5.11 +Requires: python3-python-dateutil >= 2.7 Recommends: chromaprint-fpcalc -Recommends: python3-discid +# SECTION test +BuildRequires: python3-python-dateutil >= 2.7 +BuildRequires: python3-Markdown >= 3.2 +BuildRequires: python3-PyJWT >= 2.0 +BuildRequires: python3-PyQt5 >= 5.11 +BuildRequires: python3-PyYAML >= 5.1 +BuildRequires: python3-discid >= 1.0 +BuildRequires: python3-fasteners >= 0.14 +BuildRequires: python3-mutagen >= 1.37 +BuildRequires: python3-pytest +BuildRequires: python3-pytest-xvfb +# /SECTION %description MusicBrainz Picard is a MusicBrainz tag editor written in Python. @@ -53,16 +67,15 @@ track-based tagging. %lang_package %prep -%setup -q -n %{name}-release-%{version} +%autosetup -p1 -n %{name}-release-%{version} %build export LANG=en_US.UTF-8 -python3 setup.py config -python3 setup.py build +%python3_pyproject_wheel %install export LANG=en_US.UTF-8 -python3 setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} +%python3_pyproject_install %suse_update_desktop_file -G "Music Tagger" -N "picard" org.musicbrainz.Picard @@ -71,21 +84,18 @@ rm -rfv %{buildroot}%{_datadir}/locale/sco %find_lang %{name} %{name}.lang %find_lang %{name}-countries %{name}.lang %find_lang %{name}-attributes %{name}.lang +%fdupes %{buildroot}%{python3_sitearch} -%if 0%{?suse_version} < 1500 -%post -%icon_theme_cache_post - -%postun -%icon_theme_cache_postun -%endif +%check +pytest -v %files %doc AUTHORS.txt NEWS.md %license COPYING.txt %{_bindir}/picard %{_datadir}/applications/org.musicbrainz.Picard.desktop -%{python3_sitearch}/picard* +%{python3_sitearch}/picard +%{python3_sitearch}/picard-%{version}.dist-info %{_datadir}/icons/hicolor/*/apps/org.musicbrainz.Picard.png %{_datadir}/icons/hicolor/*/apps/org.musicbrainz.Picard.svg %{_datadir}/metainfo/org.musicbrainz.Picard.appdata.xml