File python-alot.spec of Package python-alot

#
# spec file for package python-alot
#
# Copyright (c) 2022 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 http://bugs.opensuse.org/
#

%{?python_enable_dependency_generator}

Name:           python-alot
Version:        0.10
Release:        0
Summary:        Experimental terminal MUA based on notmuch mail
License:        GPL-3.0-or-later
Group:          Development/Languages/Python
Url:            https://github.com/pazz/alot
Source:         alot-%{version}.tar.gz
Patch:          notmuch-version.diff
BuildRequires:  %{python_module configobj >= 4.7.0}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module gpg}
BuildRequires:  %{python_module magic}
BuildRequires:  %{python_module notmuch2 > 0.29}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module Twisted >= 18.4.0}
BuildRequires:  %{python_module urwid >= 1.3.0}
BuildRequires:  %{python_module urwidtrees >= 1.0.3}
BuildRequires:  fdupes
BuildRequires:  notmuch-devel
BuildRequires:  procps
BuildRequires:  python-rpm-macros
BuildArch:      noarch

%python_subpackages

%description
Makes use of existing solutions where possible: It does not fetch, send or
edit mails; it lets notmuch handle your mailindex and uses a toolkit to
render its display. You are responsible for automatic initial tagging.

%prep
%autosetup -n alot-%{version}

%build
export LC_ALL=en_US.utf8
%python_build

%install
export LC_ALL=en_US.utf8
%python_install
%python_clone -a %{buildroot}%{_bindir}/alot
%python_expand %fdupes %{buildroot}%{$python_sitelib}/

%post
%python_install_alternative alot

%postun
%python_uninstall_alternative alot

%files %{python_files}
%license COPYING
%doc CONTRIBUTING.md NEWS README.md
%python_alternative %{_bindir}/alot
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by