desktop/python-pynacl/PKGBUILD
2017-10-31 23:04:26 +01:00

46 lines
1.2 KiB
Bash

pkgbase=python-pynacl
pkgname=(python3-pynacl python2-pynacl)
pkgver=1.1.2
pkgrel=1
pkgdesc='Python binding to the Networking and Cryptography (NaCl) library'
url='https://pypi.python.org/pypi/PyNaCl'
arch=('x86_64')
license=('Apache')
depends=('libsodium')
makedepends=('python3-setuptools' 'python3-pycparser' 'python3-cffi'
'python2-setuptools' 'python2-pycparser' 'python2-cffi')
source=("https://pypi.org/packages/source/P/PyNaCl/PyNaCl-$pkgver.tar.gz")
sha512sums=('2fb186fca3ebdf3824b4a2517056124901cf81f0c6cfce3e46abf0e44a801150dfd68a08627f1c7cd9b115a67b1ed0802d21140cd79d700803cc409d1e1e9857')
prepare() {
cp -a PyNaCl-$pkgver{,-python2}
}
build() {
export SODIUM_INSTALL=system
cd "$srcdir"/PyNaCl-$pkgver
python3 setup.py build
cd "$srcdir"/PyNaCl-$pkgver-python2
python2 setup.py build
}
package_python3-pynacl() {
depends=('libsodium' 'python3' 'python3-six')
export SODIUM_INSTALL=system
cd PyNaCl-$pkgver
python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
package_python2-pynacl() {
depends=('libsodium' 'python2' 'python2-six')
export SODIUM_INSTALL=system
cd PyNaCl-$pkgver-python2
python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
}