aboutsummaryrefslogtreecommitdiff
path: root/python/tweepy
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2015-03-10 14:53:16 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-03-14 16:55:54 +0700
commit59db74dcd4c6eff27a42b71d596662f52c3fa8d4 (patch)
treef182fd98bc9ede95f4fd9d1fb1594de144c38d96 /python/tweepy
parent0e3fb4668163e3bba8a17cce2677a95018d0ad65 (diff)
python/tweepy: Updated for version 3.1.0.
Added the new deps pip, requests-oauthlib and six Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'python/tweepy')
-rw-r--r--python/tweepy/README5
-rw-r--r--python/tweepy/tweepy.SlackBuild21
-rw-r--r--python/tweepy/tweepy.info8
-rw-r--r--python/tweepy/update_req_for_pip6.patch21
4 files changed, 43 insertions, 12 deletions
diff --git a/python/tweepy/README b/python/tweepy/README
index 37e660511bc51..e55f5ea88c8cc 100644
--- a/python/tweepy/README
+++ b/python/tweepy/README
@@ -1,3 +1,8 @@
tweepy (Twitter python library)
Tweepy is a python library for accessing the Twitter API.
+
+If you want to build this for use with Python 3.x (needs the optional
+dependency python3) pass the script PYTHON3=yes, like
+
+ PYTHON3=yes ./httplib2.SlackBuild
diff --git a/python/tweepy/tweepy.SlackBuild b/python/tweepy/tweepy.SlackBuild
index 10ddbb33d6208..217e10b600004 100644
--- a/python/tweepy/tweepy.SlackBuild
+++ b/python/tweepy/tweepy.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Slackware build script for tweepy
-# Copyright Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy, 2013
+# Copyright 2013-2015 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,7 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=tweepy
-VERSION=${VERSION:-2.1}
+VERSION=${VERSION:-3.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -53,7 +53,10 @@ else
LIBDIRSUFFIX=""
fi
-DOCS="CONTRIBUTORS LICENSE README.md"
+PYTHON=python
+[ "${PYTHON3:-no}" = "yes" ] && PYTHON=python3
+
+DOCS="CHANGELOG.md CONTRIBUTORS LICENSE README.md"
set -e
@@ -61,11 +64,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-if [ -e $CWD/$PRGNAM-$VERSION.tar.?z* ]; then
- tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
-else
- tar xvf $CWD/$VERSION.tar.?z*
-fi
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || tar xvf $CWD/v$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -74,6 +73,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# https://github.com/tweepy/tweepy/issues/533
+patch -p1 < $CWD/update_req_for_pip6.patch
+
+# we have six=1.8.0 and requests-oauthlib=0.4.2, so we cheat
+sed -i -e "s|1\.7\.3|1.8.0|" -e "s|0\.4\.1|0.4.2|" requirements.txt
+
python setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
diff --git a/python/tweepy/tweepy.info b/python/tweepy/tweepy.info
index dab81638f08b9..0739f15dad794 100644
--- a/python/tweepy/tweepy.info
+++ b/python/tweepy/tweepy.info
@@ -1,10 +1,10 @@
PRGNAM="tweepy"
-VERSION="2.1"
+VERSION="3.1.0"
HOMEPAGE="http://tweepy.github.com/"
-DOWNLOAD="https://github.com/tweepy/tweepy/archive/2.1.tar.gz"
-MD5SUM="98a52da1b6e6ec3f95ed78955e122301"
+DOWNLOAD="https://github.com/tweepy/tweepy/archive/v3.1.0.tar.gz"
+MD5SUM="358e750d6f865ebe83dbb2bc6e9235f4"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="pysetuptools"
+REQUIRES="pip requests-oauthlib six"
MAINTAINER="Matteo Bernardini"
EMAIL="ponce@slackbuilds.org"
diff --git a/python/tweepy/update_req_for_pip6.patch b/python/tweepy/update_req_for_pip6.patch
new file mode 100644
index 0000000000000..0214819549dc1
--- /dev/null
+++ b/python/tweepy/update_req_for_pip6.patch
@@ -0,0 +1,21 @@
+diff --git a/setup.py b/setup.py
+index 2de2d05..3b3b807 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env python
+ #from distutils.core import setup
+-import re
++import re, uuid
+ from setuptools import setup, find_packages
+ from pip.req import parse_requirements
+
+@@ -14,7 +14,7 @@ if mo:
+ else:
+ raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
+
+-install_reqs = parse_requirements('requirements.txt')
++install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())
+ reqs = [str(req.req) for req in install_reqs]
+
+ setup(name="tweepy",