File python-mat2.spec of Package python-mat2

#
# spec file for package python-mat2
#
# Copyright (c) 2026 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:           python-mat2
Version:        0.14.0
Release:        1
Summary:        mat2 is a metadata removal tool, supporting a wide range of commonly used file formats, written in python3: at its core, it's a library, used by an eponymous command-line interface, as well as several file manager extensions
License: LGPL-3.0-only
URL:            https://github.com/jvoisin/mat2
Source:         https://files.pythonhosted.org/packages/source/m/mat2/mat2-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
# SECTION test requirements
BuildRequires:  %{python_module mutagen}
BuildRequires:  %{python_module pycairo}
BuildRequires:  %{python_module gobject}
# /SECTION
BuildRequires:  fdupes
Requires:       python-mutagen
Requires:       python-pycairo
Requires:       python-gobject
BuildArch:      noarch
%python_subpackages

%description
mat2 is a metadata removal tool, supporting a wide range of commonly used file formats, written in python3: at its core, it's a library, used by an eponymous command-line interface, as well as several file manager extensions.

%prep
%autosetup -p1 -n mat2-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/mat2
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
%pyunittest -v mat2lib

%post
%python_install_alternative mat2

%postun
%python_uninstall_alternative mat2

%files %{python_files}
%doc README.md
%license LICENSE
%python_alternative %{_bindir}/mat2
%{python_sitelib}/mat2
%{python_sitelib}/mat2-%{version}.dist-info
%dir %doc %{_mandir}/man1
%doc %{_mandir}/man1/mat2.1

%changelog
openSUSE Build Service is sponsored by