[arch-commits] Commit in (3 files)
Felix Yan
fyan at archlinux.org
Sat Nov 15 03:46:47 UTC 2014
Date: Saturday, November 15, 2014 @ 04:46:47
Author: fyan
Revision: 122588
upgpkg: python-flickrapi 2.0-1 add python 3.x counterpart
Added:
python-flickrapi/
Modified:
python-flickrapi/trunk/PKGBUILD
Deleted:
python2-flickrapi/
----------+
PKGBUILD | 49 +++++++++++++++++++++++++++++++++++--------------
1 file changed, 35 insertions(+), 14 deletions(-)
Modified: python-flickrapi/trunk/PKGBUILD
===================================================================
--- python2-flickrapi/trunk/PKGBUILD 2014-11-14 16:01:26 UTC (rev 122573)
+++ python-flickrapi/trunk/PKGBUILD 2014-11-15 03:46:47 UTC (rev 122588)
@@ -1,42 +1,63 @@
# $Id$
-# Maintainer: Felix Yan <felixonmars at gmail.com>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
# Contributor: Francois Garillot <francois[@]garillot.net>
# Contributor: György Balló <ballogy at freestart.hu>
-pkgname=python2-flickrapi
+pkgbase=python-flickrapi
+pkgname=(python-flickrapi python2-flickrapi)
_pkgname=flickrapi
-pkgver=1.4.4
+pkgver=2.0
pkgrel=1
pkgdesc="The official Python interface to the Flickr API"
arch=('any')
url="http://stuvel.eu/flickrapi"
license=('Python')
-depends=('python2')
-makedepends=('python2-docutils' 'python2-setuptools')
-checkdepends=('python2-nose')
-source=("http://pypi.python.org/packages/source/f/$_pkgname/$_pkgname-$pkgver.zip")
+makedepends=('python-docutils' 'python2-docutils' 'python-setuptools' 'python2-setuptools' 'python-requests-toolbelt' 'python2-requests-toolbelt'
+ 'python-requests-oauthlib' 'python2-requests-oauthlib' 'python-six' 'python2-six')
+checkdepends=('python-nose' 'python2-nose')
+source=("http://pypi.python.org/packages/source/f/$_pkgname/$_pkgname-$pkgver.tar.gz")
+sha512sums=('634aede2e33f044265b9332296ab4352670ee00e681d1ebcd5c612ef88b1bed35fb8bcecf4de63b2d6cfa660cb31c6903375ed4b660c39c9c16586fe51708c7a')
prepare() {
- cd $_pkgname-$pkgver
+ cp -a $_pkgname-$pkgver{,-py2}
+
+ cd $_pkgname-$pkgver-py2
find . -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
}
build() {
cd $_pkgname-$pkgver
+ python setup.py build
+
+ cd ../$_pkgname-$pkgver-py2
python2 setup.py build
}
check() {
+ # Tests not shipped
+ return
+
cd $_pkgname-$pkgver
- nosetests2
+ python runtests
+
+ cd ../$_pkgname-$pkgver-py2
+ python2 runtests
}
-package() {
+package_python-flickrapi() {
+ depends=('python-six' 'python-requests-oauthlib' 'python-requests-toolbelt')
+
cd "$srcdir/$_pkgname-$pkgver"
+ python setup.py install --root=$pkgdir/ --optimize=1
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
+}
+
+package_python2-flickrapi() {
+ depends=('python2-six' 'python2-requests-oauthlib' 'python2-requests-toolbelt')
+
+ cd "$srcdir/$_pkgname-$pkgver-py2"
+
python2 setup.py install --root=$pkgdir/ --optimize=1
-
- install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}
-
-sha512sums=('3af0e38ca9368b43d84449cecc8065145e822223e086dd07fb9bdd5af23e55f16961c9e87c867c0a965064d2aac9ee022ca2e0bfb291991439ab53ae425c3bd9')
More information about the arch-commits
mailing list