2014-08-25 22:59:31 +08:00
|
|
|
# Maintainer: Samir Benmendil <samir.benmendil@gmail.com>
|
|
|
|
# Contributor: Felix Yan <felixonmars@gmail.com>
|
|
|
|
|
|
|
|
pkgbase=python-cryptography
|
|
|
|
pkgname=('python3-cryptography' 'python2-cryptography')
|
2017-10-27 06:01:37 +08:00
|
|
|
pkgver=2.1.2
|
2017-11-01 06:04:26 +08:00
|
|
|
pkgrel=2
|
2014-08-25 22:59:31 +08:00
|
|
|
pkgdesc="A package designed to expose cryptographic recipes and primitives to Python developers"
|
2016-03-17 05:36:13 +08:00
|
|
|
arch=('x86_64')
|
2014-08-25 22:59:31 +08:00
|
|
|
license=('Apache')
|
|
|
|
url="http://pypi.python.org/pypi/cryptography"
|
2017-11-01 06:04:26 +08:00
|
|
|
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-six' 'python2-six' 'python3-cffi' 'python2-cffi' 'python3-pyasn1' 'python2-pyasn1' 'python2-ipaddress' 'python2-enum34' 'python3-idna' 'python2-idna')
|
2014-08-25 22:59:31 +08:00
|
|
|
#checkdepends=('python3-pytest' 'python2-pytest' 'python3-cryptography-vectors' 'python2-cryptography-vectors'
|
|
|
|
# 'python3-iso8601' 'python2-iso8601' 'python3-pretend' 'python2-pretend' 'python3-pyasn1' 'python2-pyasn1')
|
2017-10-27 06:01:37 +08:00
|
|
|
source=("https://pypi.io/packages/source/c/cryptography/cryptography-$pkgver.tar.gz")
|
|
|
|
md5sums=('f0565d3e85cea64f0f01382e525a33dd')
|
2014-08-25 22:59:31 +08:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cp -a cryptography-${pkgver}{,-python2}
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
# Build python 3 module
|
|
|
|
cd cryptography-${pkgver}
|
|
|
|
python3 setup.py build
|
|
|
|
|
|
|
|
# Build python 2 module
|
|
|
|
cd ../cryptography-${pkgver}-python2
|
|
|
|
python2 setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
# disabled for now, too many deps not in the repos
|
|
|
|
#check() {
|
|
|
|
# # Check python3 module
|
|
|
|
# cd "${srcdir}"/cryptography-${pkgver}
|
|
|
|
# python3 setup.py test
|
|
|
|
#
|
|
|
|
# # Check python2 module
|
|
|
|
# cd "${srcdir}"/cryptography-${pkgver}-python2
|
|
|
|
# python2 setup.py test
|
|
|
|
#}
|
|
|
|
|
|
|
|
package_python3-cryptography() {
|
2017-10-27 06:01:37 +08:00
|
|
|
depends=('python3-six' 'python3-cffi' 'python3-idna' 'python3-setuptools' 'python3-asn1crypto')
|
|
|
|
|
|
|
|
cd cryptography-$pkgver
|
|
|
|
python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build
|
2014-08-25 22:59:31 +08:00
|
|
|
}
|
2017-10-27 06:01:37 +08:00
|
|
|
|
2014-08-25 22:59:31 +08:00
|
|
|
package_python2-cryptography() {
|
2017-10-27 06:01:37 +08:00
|
|
|
depends=('python2-six' 'python2-cffi' 'python2-enum34' 'python2-idna' 'python2-ipaddress'
|
|
|
|
'python2-setuptools' 'python2-asn1crypto')
|
|
|
|
|
|
|
|
cd cryptography-$pkgver-python2
|
|
|
|
python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
|
2014-08-25 22:59:31 +08:00
|
|
|
}
|