[arch-commits] Commit in python2-flickrapi/trunk (PKGBUILD fix_setuptools.patch)

Felix Yan fyan at nymeria.archlinux.org
Sat Aug 17 15:01:29 UTC 2013


    Date: Saturday, August 17, 2013 @ 17:01:29
  Author: fyan
Revision: 95846

upgpkg: python2-flickrapi 1.4.2-3 Replacement of distribute dependency in favour of setuptools

Added:
  python2-flickrapi/trunk/fix_setuptools.patch
Modified:
  python2-flickrapi/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   15 +++++++++++----
 fix_setuptools.patch |   19 +++++++++++++++++++
 2 files changed, 30 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-08-17 14:47:34 UTC (rev 95845)
+++ PKGBUILD	2013-08-17 15:01:29 UTC (rev 95846)
@@ -6,18 +6,22 @@
 pkgname=python2-flickrapi
 _pkgname=flickrapi
 pkgver=1.4.2
-pkgrel=2
+pkgrel=3
 pkgdesc="The official Python interface to the Flickr API"
 arch=('any')
 url="http://stuvel.eu/flickrapi"
 license=('Python')
 depends=('python2')
-makedepends=('python2-docutils' 'python2-distribute')
-source=("http://pypi.python.org/packages/source/f/$_pkgname/$_pkgname-$pkgver.zip")
-md5sums=('90dca08a45968b18da0894887f3e59b3')
+makedepends=('python2-docutils' 'python2-setuptools')
+source=("http://pypi.python.org/packages/source/f/$_pkgname/$_pkgname-$pkgver.zip"
+        fix_setuptools.patch)
 
 build() {
   cd "$srcdir/$_pkgname-$pkgver"
+  
+  # Fix setuptools > 0.7b
+  patch -p1 -i ../fix_setuptools.patch
+
   find . -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
 
   python2 setup.py build
@@ -31,3 +35,6 @@
   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
   rm -r "$pkgdir"/usr/{README,LICENSE,UPGRADING}
 }
+
+sha512sums=('e140fd0bdf04d3866988609b2c9d8cb841766aafe349f4cb050716c89912c24f4f656419b7b48e92bae0e1b94b4cd3482475d31171895a1aa52d9da1849f9d88'
+            '2ab9de3dd3086cf823d397e541287cf04851397c349d608bc8efc7e2e2fc3fa4bc59f5201a4e83a4a2d8a45ad0b23c2c18f45449b3947b09338722c7dda8b6ca')

Added: fix_setuptools.patch
===================================================================
--- fix_setuptools.patch	                        (rev 0)
+++ fix_setuptools.patch	2013-08-17 15:01:29 UTC (rev 95846)
@@ -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