# Python package author: Stefan Marsiske # Maintainer: Hauke Rehfeld pkgname=python-pysodium pkgver=0.7.11 pkgrel=1 pkgdesc="python libsodium wrapper" arch=(any) url="https://github.com/stef/pysodium" license=(BSD) makedepends=("python-setuptools") depends=("libsodium" "python") source=("https://files.pythonhosted.org/packages/source/p/pysodium/pysodium-$pkgver.tar.gz") sha256sums=('1a739ff00606595f5e818d9f1414ea82a0c75aed6ba6778f580e52cb5ff6a625') prepare() { cd pysodium-$pkgver sed -i 's|#!/usr/bin/env python2|#!/usr/bin/env python|' pysodium/__init__.py } build() { cd pysodium-$pkgver python setup.py build } check() { cd pysodium-$pkgver python -m unittest discover --start-directory test } package() { cd pysodium-$pkgver python setup.py install --root="${pkgdir}" --optimize=1 --skip-build rm -r "$pkgdir"/usr/lib/python*/site-packages/test/ install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/ }