[arch-commits] Commit in python-cloudflare/repos (2 files)

Eli Schwartz eschwartz at archlinux.org
Wed Jul 4 19:24:38 UTC 2018


    Date: Wednesday, July 4, 2018 @ 19:24:38
  Author: eschwartz
Revision: 352105

archrelease: copy trunk to community-staging-any

Added:
  python-cloudflare/repos/community-staging-any/
  python-cloudflare/repos/community-staging-any/PKGBUILD
    (from rev 352103, python-cloudflare/trunk/PKGBUILD)

----------+
 PKGBUILD |   61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Copied: python-cloudflare/repos/community-staging-any/PKGBUILD (from rev 352103, python-cloudflare/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-07-04 19:24:38 UTC (rev 352105)
@@ -0,0 +1,61 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-cloudflare
+pkgname=('python-cloudflare' 'python2-cloudflare')
+pkgver=2.1.0
+pkgrel=3
+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' 'python-jsonlines'
+             'python2-jsonlines')
+checkdepends=('python-pytest' 'python2-pytest')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/cloudflare/python-cloudflare/archive/$pkgver.tar.gz")
+sha512sums=('e9e55a0fa4debde3a050bc6b1c8dfe4721021e5467dfc0a3f7c3c20d5f97ac713cfbef0626ed747eeb30947c74c881cc34e7fac5257e5b874fb9eaf6af56c568')
+
+prepare() {
+  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" pytest tests/test1.py
+
+  cd "$srcdir"/python-cloudflare-$pkgver-py2
+  PYTHONPATH="$PWD/build/lib" pytest2 tests/test1.py
+}
+
+package_python-cloudflare() {
+  depends=('python-requests' 'python-future' 'python-yaml' 'python-jsonlines')
+
+  cd python-cloudflare-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  rm -r "$pkgdir"/usr/lib/python3.7/site-packages/examples
+}
+
+package_python2-cloudflare() {
+  depends=('python2-requests' 'python2-future' 'python2-yaml' 'python2-jsonlines')
+
+  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}
+
+  rm -r "$pkgdir"/usr/lib/python2.7/site-packages/examples
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list