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

Evangelos Foutras foutrelis at archlinux.org
Fri Oct 25 16:40:29 UTC 2019


    Date: Friday, October 25, 2019 @ 16:40:29
  Author: foutrelis
Revision: 519534

archrelease: copy trunk to community-staging-any

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

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

Copied: python-pyjwt/repos/community-staging-any/PKGBUILD (from rev 519533, python-pyjwt/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-10-25 16:40:29 UTC (rev 519534)
@@ -0,0 +1,53 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pyjwt
+pkgname=('python-pyjwt' 'python2-pyjwt')
+pkgver=1.7.1
+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=('0f61ad132309f896b6ea7f1a689854e643f4db6baf3a44d9f5b544b62e3fce384b95c3a04fe2a46aa3e1a5843c3550d57eaec5449c7faa56ca06562571940171')
+
+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