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

Felix Yan felixonmars at archlinux.org
Sun Dec 2 16:29:24 UTC 2018


    Date: Sunday, December 2, 2018 @ 16:29:23
  Author: felixonmars
Revision: 410774

archrelease: copy trunk to community-testing-any

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

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

Copied: python-pyjwt/repos/community-testing-any/PKGBUILD (from rev 410773, python-pyjwt/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2018-12-02 16:29:23 UTC (rev 410774)
@@ -0,0 +1,53 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pyjwt
+pkgname=('python-pyjwt' 'python2-pyjwt')
+pkgver=1.7.0
+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=('32110fb92a59bdd17fdbdd64c1025f414d4bf8b111b60b4056be735fb8bb05d416c4383f607b4ba5e1995bf274cc24be3b6e0924206526799dbacab1693deee5')
+
+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