[arch-commits] Commit in python-qiniu/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sun Oct 9 15:12:46 UTC 2016


    Date: Sunday, October 9, 2016 @ 15:12:45
  Author: felixonmars
Revision: 191713

upgpkg: python-qiniu 7.0.9-1

Modified:
  python-qiniu/trunk/PKGBUILD

----------+
 PKGBUILD |   36 +++++++++++++++++++++++++-----------
 1 file changed, 25 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-10-09 15:09:38 UTC (rev 191712)
+++ PKGBUILD	2016-10-09 15:12:45 UTC (rev 191713)
@@ -3,38 +3,52 @@
 
 pkgbase=python-qiniu
 pkgname=(python-qiniu python2-qiniu)
-pkgver=7.0.8
+pkgver=7.0.9
 pkgrel=1
 pkgdesc="Qiniu Resource Storage SDK for Python"
 arch=('any')
 url='https://github.com/qiniu/python-sdk'
 license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools')
-source=("https://pypi.io/packages/source/q/qiniu/qiniu-$pkgver.tar.gz"
-        LICENSE)
-sha512sums=('0fccab898262eea5f4d8e21a89814d992b3568f0c2e533d2afc44777fa8ca016e41dafc33759ef842220443614fde1e6b392aca7d0a55136acf84e360a073547'
-            '4fbb1090b3ee0d230d40b45db7bcd164873872d1860bd83b51197ed5d03e9d4be7785a400f1d314d6e3c0a6fcba7e1afdf3fdab04ae9970df59f96b18862c529')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-requests' 'python2-requests' 'git')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner')
+source=("qiniu::git+https://github.com/qiniu/python-sdk#tag=v$pkgver")
+sha512sums=('SKIP')
 
 prepare() {
-  cp -a qiniu-$pkgver{,-py2}
+  cp -a qiniu{,-py2}
 }
 
+check() {
+  # Extracted from .travis.yml
+  export QINIU_ACCESS_KEY="QWYn5TFQsLLU1pL5MFEmX3s5DmHdUThav9WyOWOm"
+  export QINIU_SECRET_KEY="Bxckh6FA-Fbs9Yt3i3cbKVK22UPBmAOHJcL95pGz"
+  export QINIU_TEST_BUCKET="pythonsdk"
+  export QINIU_TEST_DOMAIN="pythonsdk.qiniudn.com"
+  export QINIU_TEST_ENV="travis"
+
+  cd "$srcdir"/qiniu
+  python setup.py ptr
+
+  cd "$srcdir"/qiniu-py2
+  python2 setup.py ptr
+}
+
 package_python-qiniu() {
   depends=('python-requests' 'python-setuptools')
 
-  cd qiniu-$pkgver
+  cd qiniu
   python setup.py install -O1 --root "$pkgdir"
 
-  install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }
 
 package_python2-qiniu() {
   depends=('python2-requests' 'python2-setuptools')
 
-  cd qiniu-$pkgver-py2
+  cd qiniu-py2
   python2 setup.py install -O1 --root "$pkgdir"
 
-  install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 
   # Don't conflict with python 3.x version
   mv "$pkgdir"/usr/bin/qiniupy{,2}



More information about the arch-commits mailing list