%global commit e969a3f37bf673502b0759c56d4d3ee380ec672b %global shortcommit %(c=%{commit}; echo ${c:0:7}) %define min_python_version 3.6 %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %if 0%{!?pyproject_wheel:1} %define pyproject_wheel %py3_build %endif %if 0%{!?pyproject_install:1} %define pyproject_install %py3_install %endif %define pypiname imaplib2 Name: python3-%{pypiname} Version: 3.6 Release: %mkrel 2.1 Group: Development Summary: IMAP library for Python License: MIT URL: https://imaplib2.readthedocs.io/ Source0: https://github.com/jazzband/imaplib2/archive/v%{version}/%{pypiname}-%{version}.tar.gz Patch0: imaplib2-tls1.3.diff BuildArch: noarch BuildRequires: pkgconfig(python3) >= %{min_python_version} BuildRequires: python3dist(setuptools) BuildRequires: python3dist(wheel) Requires: python3 >= %{min_python_version} %if 0%{?pyproject_buildrequires:1} %generate_buildrequires %pyproject_buildrequires %endif %description Based on RFC 3501 and original imaplib module. This is a version of imaplib that uses threads to allow full use of the IMAP4 concurrency features, and to de-couple a user of imaplib from i/o lags, except where explicitly allowed. Documented in imaplib2.html %prep %autosetup -p1 -n %{pypiname}-%{version} %build %pyproject_wheel %install %pyproject_install %check %clean rm -f %{_builddir}/%{name}-%{version}*pyproject* rm -rf %{_buildir}/.pyproject-builddir %files %license LICENCE %doc *.md imaplib2/imaplib2.html %{python3_sitelib}/%{pypiname}/ %{python3_sitelib}/%{pypiname}-%{version}*.*-info/ %changelog