14
0
forked from pool/python-tweepy

- Switch to github tarball

- Update url
- Update to version 3.6.0:
  * Most notably support for python3 and various tweaks
- Add patch to work with new pip:
  * tweepy-pip2.10.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tweepy?expand=0&rev=16
This commit is contained in:
Tomáš Chvátal
2018-05-02 10:54:14 +00:00
committed by Git OBS Bridge
parent c7daa372a7
commit ac7671f95f
5 changed files with 107 additions and 27 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-tweepy
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,29 +16,34 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-tweepy
Version: 3.5.0
Version: 3.6.0
Release: 0
Url: http://github.com/joshthecoder/tweepy
Summary: Twitter library for python
License: MIT
Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/t/tweepy/tweepy-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-pip
BuildRequires: python-requests >= 2.4.3
BuildRequires: python-requests-oauthlib >= 0.4.1
BuildRequires: python-setuptools
BuildRequires: python-six >= 1.7.3
Requires: python-requests >= 2.4.3
Requires: python-requests-oauthlib >= 0.4.1
Requires: python-six >= 1.7.3
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
URL: https://github.com/tweepy/tweepy
Source: https://github.com/tweepy/tweepy/archive/v%{version}.tar.gz
Patch0: tweepy-pip2.10.patch
BuildRequires: %{python_module PySocks >= 1.5.7}
BuildRequires: %{python_module mock >= 1.0.1}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module requests >= 2.11.1}
BuildRequires: %{python_module requests-oauthlib >= 0.7.0}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10.0}
BuildRequires: %{python_module vcrpy >= 1.0.1}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python2-unittest2
Requires: python-PySocks >= 1.5.7
Requires: python-requests >= 2.11.1
Requires: python-requests-oauthlib >= 0.7.0
Requires: python-six >= 1.10.0
BuildArch: noarch
%endif
%python_subpackages
%description
A library for accessing the Twitter.com API. Supports OAuth, covers the entire
@@ -46,17 +51,23 @@ API, and streaming API.
%prep
%setup -q -n tweepy-%{version}
%patch0 -p1
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# remove the examples from site package root
rm -r %{buildroot}%{python_sitelib}/examples
%python_install
# do not install generic example folder
%python_expand rm -r %{buildroot}%{$python_sitelib}/examples
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files
%defattr(-,root,root,-)
%check
# Sadly tests need access to twitter api
#%%python_expand nosetests-%{$python_bin_suffix} -v tests.test_cursors tests.test_api tests.test_utils
%files %{python_files}
%license LICENSE
%{python_sitelib}/*
%changelog