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

Felix Yan felixonmars at archlinux.org
Sat Jun 30 09:18:01 UTC 2018


    Date: Saturday, June 30, 2018 @ 09:18:00
  Author: felixonmars
Revision: 348011

archrelease: copy trunk to community-staging-any

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

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

Copied: python-pyjwt/repos/community-staging-any/PKGBUILD (from rev 348010, python-pyjwt/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-06-30 09:18:00 UTC (rev 348011)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pyjwt
+pkgname=('python-pyjwt' 'python2-pyjwt')
+pkgver=1.6.4
+pkgrel=2
+pkgdesc='JSON Web Token implementation in Python'
+arch=('any')
+url='https://github.com/jpadilla/pyjwt'
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-pytest-cov' 'python2-pytest-cov')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/jpadilla/pyjwt/archive/$pkgver.tar.gz")
+sha512sums=('d6c9ff1c281b00e2a2baf0c916d721ecc0c1bdc51fab73a6be91ac8d603bd448cdb3eebe189201039a3cb8504f3dcee9da73c71bc930c37ce29d99d92287ccb7')
+
+prepare() {
+  sed -i 's/pytest==2.7.3/pytest/' pyjwt-$pkgver/setup.py
+  cp -a pyjwt-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/pyjwt-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/pyjwt-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/pyjwt-$pkgver
+  python setup.py pytest
+
+  cd "$srcdir"/pyjwt-$pkgver-py2
+  python2 setup.py pytest || warning "Tests failed"
+}
+
+package_python-pyjwt() {
+  depends=('python-setuptools')
+
+  cd pyjwt-$pkgver
+  python3 setup.py install --root="$pkgdir" -O1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-pyjwt() {
+  depends=('python2-setuptools')
+
+  cd pyjwt-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" -O1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  mv "$pkgdir"/usr/bin/pyjwt{,2}
+}



More information about the arch-commits mailing list