[arch-commits] Commit in (4 files)
Felix Yan
felixonmars at archlinux.org
Sat Jun 10 16:58:15 UTC 2017
Date: Saturday, June 10, 2017 @ 16:58:15
Author: felixonmars
Revision: 236015
addpkg: python-cloudflare 1.5.1-1
Added:
python-cloudflare/
python-cloudflare/repos/
python-cloudflare/trunk/
python-cloudflare/trunk/PKGBUILD
----------+
PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
Added: python-cloudflare/trunk/PKGBUILD
===================================================================
--- python-cloudflare/trunk/PKGBUILD (rev 0)
+++ python-cloudflare/trunk/PKGBUILD 2017-06-10 16:58:15 UTC (rev 236015)
@@ -0,0 +1,61 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-cloudflare
+pkgname=('python-cloudflare' 'python2-cloudflare')
+pkgver=1.5.1
+_commit=c1c5096e4c8e20609638dfde9b662be9c70c9c7b
+pkgrel=1
+pkgdesc='Python wrapper for the Cloudflare v4 API'
+arch=('any')
+license=('MIT')
+url='https://github.com/cloudflare/python-cloudflare'
+makedepends=('python-setuptools' 'python2-setuptools' 'python-requests' 'python2-requests'
+ 'python-future' 'python2-future' 'python-yaml' 'python2-yaml')
+checkdepends=('python-pytest' 'python2-pytest')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/cloudflare/python-cloudflare/archive/$_commit.tar.gz")
+sha512sums=('2a2c131038099223117aa50ab75c6d624efaf24d8f9fd908cb18017ec3e698b765c9c9bce09e3678f61a74b5787131e3d3ccdfa5d9991684a79205bf910c5958')
+
+prepare() {
+ mv python-cloudflare-{$_commit,$pkgver}
+
+ # https://github.com/cloudflare/python-cloudflare/issues/30
+ sed -i "s/'logger', //" python-cloudflare-$pkgver/setup.py
+ cp -a python-cloudflare-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/python-cloudflare-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/python-cloudflare-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/python-cloudflare-$pkgver
+ PYTHONPATH="$PWD/build/lib" python tests/test1.py
+
+ cd "$srcdir"/python-cloudflare-$pkgver-py2
+ PYTHONPATH="$PWD/build/lib" python2 tests/test1.py
+}
+
+package_python-cloudflare() {
+ depends=('python-requests' 'python-future' 'python-yaml')
+
+ cd python-cloudflare-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-cloudflare() {
+ depends=('python2-requests' 'python2-future' 'python2-yaml')
+
+ cd python-cloudflare-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+ mv "$pkgdir"/usr/bin/cli4{,-python2}
+}
+
+# vim:set ts=2 sw=2 et:
Property changes on: python-cloudflare/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
More information about the arch-commits
mailing list