Blob Blame History Raw
%bcond_without  tests

%global         srcname         tweepy
%global         forgeurl
Version:        4.7.0
%global         tag             v%{version}

Name:           python-%{srcname}
Release:        %autorelease
Summary:        Python interface to the Twitter API

License:        MIT
URL:            %forgeurl
Source0:        %forgesource

# NOTE(mhayden): Temporary workaround until RHBZ#2067264 is fixed.
Patch0:         tweepy-allow-older-oauthlib.patch

BuildArch:      noarch

BuildRequires:  python3-devel

%if %{with tests}
BuildRequires:  python3dist(pytest)

%global _description %{expand:
Python interface to the Twitter API.}

%description %{_description}

%package -n python3-%{srcname}
Summary:        %{summary}
%description -n python3-%{srcname} %{_description}

%pyproject_extras_subpkg -n python3-%{srcname} async socks

%forgeautosetup -p1

%pyproject_buildrequires -r %{?with_tests:-t}


%pyproject_save_files tweepy

%if %{with tests}

%files -n python3-%{srcname} -f %{pyproject_files}
%doc *.md examples