core/python-service-identity/PKGBUILD
2017-10-27 00:00:45 +02:00

61 lines
2.0 KiB
Bash

#
# Platform Packages for Chakra, part of chakraos.org
#
pkgbase=python-service-identity
pkgname=('python3-service-identity' 'python2-service-identity')
pkgver=17.0.0
pkgrel=1
pkgdesc="Service identity verification for pyOpenSSL"
arch=('any')
license=('MIT')
url="http://pypi.python.org/pypi/service_identity"
makedepends=('python3-pyopenssl' 'python2-pyopenssl' 'python3-pyasn1' 'python2-pyasn1'
'python3-setuptools' 'python2-setuptools' 'python3-pyasn1-modules' 'python2-pyasn1-modules'
'python3-characteristic' 'python2-characteristic' 'python3-pytest' 'python2-pytest')
#checkdepends=('python3-idna' 'python2-idna')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pyca/service_identity/archive/$pkgver.tar.gz")
md5sums=('9d334f4a74659b661539ae4f5187eab3')
prepare() {
cp -a service_identity-${pkgver}{,-python2}
}
build() {
# Build python 3 module
cd service_identity-${pkgver}
python3 setup.py build
# Build python 2 module
cd ../service_identity-${pkgver}-python2
python2 setup.py build
}
#check() {
# # Check python3 module
# cd "${srcdir}"/service_identity-${pkgver}
# py.test
#
# # Check python2 module
# cd "${srcdir}"/service_identity-${pkgver}-python2
# py.test2
#}
package_python3-service-identity() {
depends=('python3' 'python3-pyopenssl' 'python3-pyasn1' 'python3-pyasn1-modules' 'python3-characteristic')
optdepends=('python3-idna: for Internationalized Domain Names support')
cd service_identity-${pkgver}
python3 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python2-service-identity() {
depends=('python2' 'python2-pyopenssl' 'python2-pyasn1' 'python2-pyasn1-modules' 'python2-characteristic')
optdepends=('python2-idna: for Internationalized Domain Names support')
cd service_identity-${pkgver}-python2
python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}