[arch-commits] Commit in python-flickrapi/repos (3 files)
Felix Yan
fyan at archlinux.org
Mon Sep 21 07:40:10 UTC 2015
Date: Monday, September 21, 2015 @ 09:40:10
Author: fyan
Revision: 141356
archrelease: copy trunk to community-staging-any
Added:
python-flickrapi/repos/community-staging-any/
python-flickrapi/repos/community-staging-any/PKGBUILD
(from rev 141355, python-flickrapi/trunk/PKGBUILD)
python-flickrapi/repos/community-staging-any/fix_setuptools.patch
(from rev 141355, python-flickrapi/trunk/fix_setuptools.patch)
----------------------+
PKGBUILD | 63 +++++++++++++++++++++++++++++++++++++++++++++++++
fix_setuptools.patch | 19 ++++++++++++++
2 files changed, 82 insertions(+)
Copied: python-flickrapi/repos/community-staging-any/PKGBUILD (from rev 141355, python-flickrapi/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2015-09-21 07:40:10 UTC (rev 141356)
@@ -0,0 +1,63 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Francois Garillot <francois[@]garillot.net>
+# Contributor: György Balló <ballogy at freestart.hu>
+
+pkgbase=python-flickrapi
+pkgname=(python-flickrapi python2-flickrapi)
+_pkgname=flickrapi
+pkgver=2.1.1
+pkgrel=2
+pkgdesc="The official Python interface to the Flickr API"
+arch=('any')
+url="http://stuvel.eu/flickrapi"
+license=('Python')
+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=('15e3e9e0c08fbc9d7226e4b1f0f18e6d1c69a049f169cf10f9400b9e030907bf590ae1da4ffcf72a8abe1c13cf24ff55f0851feaa9499abe5c0cb96e0a420c55')
+
+prepare() {
+ 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
+ python runtests
+
+ cd ../$_pkgname-$pkgver-py2
+ python2 runtests
+}
+
+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.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
+}
Copied: python-flickrapi/repos/community-staging-any/fix_setuptools.patch (from rev 141355, python-flickrapi/trunk/fix_setuptools.patch)
===================================================================
--- community-staging-any/fix_setuptools.patch (rev 0)
+++ community-staging-any/fix_setuptools.patch 2015-09-21 07:40:10 UTC (rev 141356)
@@ -0,0 +1,19 @@
+--- a/distribute_setup.py 2013-08-17 22:57:41.227220859 +0800
++++ b/distribute_setup.py 2013-08-17 22:57:29.343673408 +0800
+@@ -133,6 +133,16 @@
+ try:
+ try:
+ import pkg_resources
++
++ # Setuptools 0.7b and later is a suitable (and preferable)
++ # substitute for any Distribute version.
++ try:
++ pkg_resources.require("setuptools>=0.7b")
++ return
++ except (pkg_resources.DistributionNotFound,
++ pkg_resources.VersionConflict):
++ pass
++
+ if not hasattr(pkg_resources, '_distribute'):
+ if not no_fake:
+ _fake_setuptools()
More information about the arch-commits
mailing list