summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2019-06-09 17:16:25 (GMT)
committerBritney Fransen <brfransen@gmail.com>2019-06-09 17:16:25 (GMT)
commit6de9f3eacf2ea133f39097fb9c9da04ee33dfe86 (patch)
tree5b6ff164cb059d2ff0f94e0a8e64e7868a384615 /abs/core
parent20a340f6fc367f8c139c0baba712de8d522dbab5 (diff)
downloadlinhes_pkgbuild-6de9f3eacf2ea133f39097fb9c9da04ee33dfe86.zip
linhes_pkgbuild-6de9f3eacf2ea133f39097fb9c9da04ee33dfe86.tar.gz
linhes_pkgbuild-6de9f3eacf2ea133f39097fb9c9da04ee33dfe86.tar.bz2
python-josepy: initial inclusion, dep of python-acme
Diffstat (limited to 'abs/core')
-rw-r--r--abs/core/python_modules/python-josepy/PKGBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/abs/core/python_modules/python-josepy/PKGBUILD b/abs/core/python_modules/python-josepy/PKGBUILD
new file mode 100644
index 0000000..7e56bda
--- /dev/null
+++ b/abs/core/python_modules/python-josepy/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
+
+pkgbase=python-josepy
+pkgname=(python-josepy python2-josepy)
+pkgver=1.1.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=('eee886565b1cb92e6d7a42f1e3666a158c162fb891f90de844118ac32b24f6deccf2eee5990ba100827109203f7da99c2b55735fb7bda05fd7a447dca39d6362')
+
+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}
+}