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,3 +1,13 @@
-------------------------------------------------------------------
Wed May 2 10:42:39 UTC 2018 - tchvatal@suse.com
- 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
-------------------------------------------------------------------
Thu Feb 18 13:42:14 UTC 2016 - eshmarnev@suse.com

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

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f00ccf5f48c30d559ce0b750dfe3b2df6668dc799d8ce276fd90bfaa68845a58
size 24348

59
tweepy-pip2.10.patch Normal file
View File

@@ -0,0 +1,59 @@
From 778bd7a31d2f5fae98652735e7844533589ca221 Mon Sep 17 00:00:00 2001
From: Ben Cipollini <bcipollini@classy.org>
Date: Wed, 18 Apr 2018 10:26:07 -0700
Subject: [PATCH] #1029 - migrate requirements to setup.py, reference in
requirements.txt
---
requirements.txt | 7 +++----
setup.py | 11 ++++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index 14440314..cd8c47d3 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,3 @@
-requests>=2.11.1
-requests_oauthlib>=0.7.0
-six>=1.10.0
-PySocks>=1.5.7
+--index-url https://pypi.python.org/simple/
+
+-e .
diff --git a/setup.py b/setup.py
index 18c59108..5688c2f5 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,6 @@
#from distutils.core import setup
import re, uuid
from setuptools import setup, find_packages
-from pip.req import parse_requirements
VERSIONFILE = "tweepy/__init__.py"
ver_file = open(VERSIONFILE, "rt").read()
@@ -14,9 +13,6 @@
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
-install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
-reqs = [str(req.req) for req in install_reqs]
-
setup(name="tweepy",
version=version,
description="Twitter library for python",
@@ -25,7 +21,12 @@
author_email="tweepy@googlegroups.com",
url="http://github.com/tweepy/tweepy",
packages=find_packages(exclude=['tests']),
- install_requires=reqs,
+ install_requires=[
+ "requests>=2.11.1",
+ "requests_oauthlib>=0.7.0",
+ "six>=1.10.0",
+ "PySocks>=1.5.7",
+ ],
keywords="twitter library",
classifiers=[
'Development Status :: 4 - Beta',

3
v3.6.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:70f0c02b6249a3a7551328f731f1b90c822a780eb2fd15eaef4510a477c9f33c
size 426906