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

Felix Yan felixonmars at archlinux.org
Thu Feb 15 16:33:05 UTC 2018


    Date: Thursday, February 15, 2018 @ 16:33:02
  Author: felixonmars
Revision: 294725

archrelease: copy trunk to community-testing-any

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

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

Copied: python-cloudflare/repos/community-testing-any/PKGBUILD (from rev 294724, python-cloudflare/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2018-02-15 16:33:02 UTC (rev 294725)
@@ -0,0 +1,60 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-cloudflare
+pkgname=('python-cloudflare' 'python2-cloudflare')
+pkgver=2.0.4
+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/$pkgver.tar.gz")
+sha512sums=('1f77e39b483ca025ab9cf05dea7a6684f0cb030552cae8ee3e38c7b39fbc50a6f7833008dd6c9d3c271756a467393a478df399a718bc7ee3ae1fea51e2346364')
+
+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')
+
+  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.6/site-packages/examples
+}
+
+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}
+
+  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