[arch-commits] Commit in python-josepy/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Sat Oct 26 06:09:47 UTC 2019
Date: Saturday, October 26, 2019 @ 06:09:43
Author: felixonmars
Revision: 520202
archrelease: copy trunk to community-staging-any
Added:
python-josepy/repos/community-staging-any/
python-josepy/repos/community-staging-any/PKGBUILD
(from rev 520201, python-josepy/trunk/PKGBUILD)
----------+
PKGBUILD | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
Copied: python-josepy/repos/community-staging-any/PKGBUILD (from rev 520201, python-josepy/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-26 06:09:43 UTC (rev 520202)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-josepy
+pkgname=(python-josepy python2-josepy)
+pkgver=1.2.0
+pkgrel=2
+pkgdesc="JOSE protocol implementation in Python"
+url="https://github.com/certbot/josepy"
+license=('PerlArtistic')
+arch=('any')
+makedepends=('python-cryptography' 'python2-cryptography' 'python-pyopenssl' 'python2-pyopenssl'
+ 'python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-coverage' 'python2-coverage'
+ 'python-pytest-isort' 'python2-pytest-isort' 'python-pytest-cache'
+ 'python2-pytest-cache' 'python-pytest-cov' 'python2-pytest-cov' 'flake8'
+ 'python2-flake8' 'python-pytest-flake8' 'python2-pytest-flake8' 'python-mock'
+ 'python2-mock')
+source=("https://pypi.io/packages/source/j/josepy/josepy-$pkgver.tar.gz")
+sha512sums=('1e746cf8e02c86a728d1a502000bba3c7db829f29dcb49ed40c7398d2ec904e830d267c60b444d57c3cf44d6ae829d3f3f4fd4288dcb3d5f47ab96d06a2d6bc5')
+
+prepare() {
+ # https://github.com/certbot/josepy/issues/24
+ sed -i 's/flake8-ignore = E501/flake8-ignore = E501 W504/' josepy-$pkgver/pytest.ini\
+
+ cp -a josepy-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/josepy-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/josepy-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/josepy-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/josepy-$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_python-josepy() {
+ depends=('python-cryptography' 'python-pyopenssl' 'python-setuptools')
+
+ cd josepy-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-josepy() {
+ depends=('python2-cryptography' 'python2-pyopenssl' 'python2-setuptools')
+
+ cd josepy-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ mv "$pkgdir"/usr/bin/jws{,2}
+}
More information about the arch-commits
mailing list