[arch-commits] Commit in python-pyjwt/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Thu May 10 03:13:18 UTC 2018
Date: Thursday, May 10, 2018 @ 03:13:18
Author: felixonmars
Revision: 319931
archrelease: copy trunk to community-testing-any
Added:
python-pyjwt/repos/community-testing-any/
python-pyjwt/repos/community-testing-any/PKGBUILD
(from rev 319930, python-pyjwt/trunk/PKGBUILD)
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Copied: python-pyjwt/repos/community-testing-any/PKGBUILD (from rev 319930, python-pyjwt/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2018-05-10 03:13:18 UTC (rev 319931)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pyjwt
+pkgname=('python-pyjwt' 'python2-pyjwt')
+pkgver=1.6.1
+pkgrel=1
+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=('b96435fa9809a06472d5205c76fed1436a5bd8bac23848e4213038e6be5590f44ab935ff2def09beae0775666cde8be6512adb2d9987f215637dd9fcc880c078')
+
+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