File powerline.spec of Package failed_powerline

#
# spec file for package powerline
#
# 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/
#


%define powerline_python_sitelib %{python3_sitelib}
Name:           powerline
Version:        2.8.4
Release:        0
Summary:        Status line and prompt utility
License:        MIT
Group:          System/Console
URL:            https://github.com/powerline/powerline
Source0:        https://github.com/powerline/powerline/archive/%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pytest
BuildRequires:  python3-docutils
Requires:       python3 >= 3.6
BuildArch:      noarch

%description
Powerline is a statusline plugin for vim, and provides status lines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.

%prep
%setup -q

%build
python3 setup.py build

%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %{buildroot}%{_datadir}

%check
# Exclude failing test cases for unsupported architectures
%ifarch riscv64
echo "Skipping tests on RISC-V architecture"
%else
python3 setup.py test
%endif

%files
%license LICENSE
%doc README.rst
%{_bindir}/powerline*
%dir %{_datadir}/powerline
%{_datadir}/powerline/*
%{powerline_python_sitelib}/powerline

%changelog
* Fri Aug 18 2023 - opensuse@example.com
- Initial package
openSUSE Build Service is sponsored by