File python-qrbill.spec of Package python-qrbill

#
# spec file for package python-qrbill
#
# Copyright (c) 2024 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-qrbill
Version:        1.1.0
Release:        0
Summary:        A library to generate Swiss QR-bill payment slips
License:        MIT
URL:            https://github.com/claudep/swiss-qr-bill/
Source:         https://files.pythonhosted.org/packages/source/q/qrbill/qrbill-%{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 iso3166}
BuildRequires:  %{python_module python-stdnum >= 1.13}
BuildRequires:  %{python_module qrcode}
BuildRequires:  %{python_module svgwrite}
# /SECTION
BuildRequires:  fdupes
Requires:       python-iso3166
Requires:       python-python-stdnum >= 1.13
Requires:       python-qrcode
Requires:       python-svgwrite
BuildArch:      noarch
Requires(pre):  update-alternatives
Requires(post): update-alternatives
%python_subpackages

%description
A library to generate Swiss QR-bill payment slips

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

%build
%pyproject_wheel

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/qrbill
%python_expand rm -rf %{buildroot}%{$python_sitelib}/tests
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
%python_expand PYTHONPATH=%{buildroot}/%{$python_sitelib} $python tests/test_qrbill.py

%post
%python_install_alternative qrbill

%postun
%python_uninstall_alternative qrbill

%files %{python_files}
%doc CHANGELOG.rst README.rst
%license LICENSE.TXT
%python_alternative %{_bindir}/qrbill
%{python_sitelib}/qrbill
%{python_sitelib}/qrbill-%{version}.dist-info

%changelog
openSUSE Build Service is sponsored by