summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 37e660511b..e55f5ea88c 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 10ddbb33d6..217e10b600 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 dab81638f0..0739f15dad 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 0000000000..0214819549
--- /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",