File python-IMAPClient.spec of Package python-IMAPClient

%global distname IMAPClient

%if 0%{?sle_version} >= 150500
%global pythons python3 python311
%else
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
%endif

%{?!python_module:%define python_module() python-%{**} python3-%{**}}

Name:           python-%{distname}
Version:        2.2.0
Release:        0
Summary:        Easy-to-use, Pythonic and complete IMAP client library
License:        BSD-3-Clause
Group:          Development/Languages/Python
Url:            https://github.com/mjs/imapclient/
Source:         %{distname}-%{version}.zip
BuildRequires:  %{python_module base}
BuildRequires:  %{python_module setuptools >= 20.5}
BuildRequires:  %{python_module six}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  unzip
Requires:       python-six
BuildArch:      noarch
%python_subpackages

%description
IMAPClient is an easy-to-use, Pythonic and complete IMAP client library.

Features:
  - Arguments and return values are natural Python types.
  - IMAP server responses are fully parsed and readily usable.
  - IMAP unique message IDs (UIDs) are handled transparently.
  - Internationalised mailbox names are transparently handled.
  - Time zones are correctly handled.
  - Convenience methods are provided for commonly used functionality.
  - Exceptions are raised when errors occur.

Python versions 2.7 and 3.4 through 3.7 are officially supported.

IMAPClient includes comprehensive units tests and automated functional
tests that can be run against a live IMAP server.

%prep
%setup -q -n %{distname}-%{version}

%build
%python_build

%install
%python_install
%fdupes %{buildroot}%{_prefix}

%files %{python_files}
%doc README.rst
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by