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>
This commit is contained in:
Matteo Bernardini 2015-03-10 14:53:16 +01:00 committed by Willy Sudiarto Raharjo
parent 0e3fb46681
commit 59db74dcd4
4 changed files with 43 additions and 12 deletions

View file

@ -1,3 +1,8 @@
tweepy (Twitter python library) tweepy (Twitter python library)
Tweepy is a python library for accessing the Twitter API. 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

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Slackware build script for tweepy # 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. # All rights reserved.
# #
# Redistribution and use of this script, with or without modification, is # Redistribution and use of this script, with or without modification, is
@ -22,7 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=tweepy PRGNAM=tweepy
VERSION=${VERSION:-2.1} VERSION=${VERSION:-3.1.0}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -53,7 +53,10 @@ else
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
fi fi
DOCS="CONTRIBUTORS LICENSE README.md" PYTHON=python
[ "${PYTHON3:-no}" = "yes" ] && PYTHON=python3
DOCS="CHANGELOG.md CONTRIBUTORS LICENSE README.md"
set -e set -e
@ -61,11 +64,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM-$VERSION rm -rf $PRGNAM-$VERSION
if [ -e $CWD/$PRGNAM-$VERSION.tar.?z* ]; then tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || tar xvf $CWD/v$VERSION.tar.?z*
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
else
tar xvf $CWD/$VERSION.tar.?z*
fi
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find -L . \ 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 \) \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \; -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 python setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \

View file

@ -1,10 +1,10 @@
PRGNAM="tweepy" PRGNAM="tweepy"
VERSION="2.1" VERSION="3.1.0"
HOMEPAGE="http://tweepy.github.com/" HOMEPAGE="http://tweepy.github.com/"
DOWNLOAD="https://github.com/tweepy/tweepy/archive/2.1.tar.gz" DOWNLOAD="https://github.com/tweepy/tweepy/archive/v3.1.0.tar.gz"
MD5SUM="98a52da1b6e6ec3f95ed78955e122301" MD5SUM="358e750d6f865ebe83dbb2bc6e9235f4"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="pysetuptools" REQUIRES="pip requests-oauthlib six"
MAINTAINER="Matteo Bernardini" MAINTAINER="Matteo Bernardini"
EMAIL="ponce@slackbuilds.org" EMAIL="ponce@slackbuilds.org"

View file

@ -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",