From 6de9f3eacf2ea133f39097fb9c9da04ee33dfe86 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Sun, 9 Jun 2019 17:16:25 +0000 Subject: python-josepy: initial inclusion, dep of python-acme --- abs/core/python_modules/python-josepy/PKGBUILD | 58 ++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 abs/core/python_modules/python-josepy/PKGBUILD 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 + +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} +} -- cgit v0.12