summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-service-identity/PKGBUILD
blob: 6575c5cca31c2a3ebf5f5c909c38e8ef6d560e28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgbase=python-service-identity
pkgname=('python-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=('python-pyopenssl' 'python2-pyopenssl' 'python-pyasn1' 'python2-pyasn1'
             'python-setuptools' 'python2-setuptools' 'python-pyasn1-modules' 'python2-pyasn1-modules'
             'python-attrs' 'python2-attrs' 'python-idna' 'python2-idna')
checkdepends=('python-pytest-runner' 'python2-pytest-runner')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pyca/service_identity/archive/$pkgver.tar.gz")
sha512sums=('3824cb473420a5ce6779fd35ff931189ed68286ad1f7f2936e3253a785cd76a77bbb95210a4a5fde1b1ef0c8d9c762b8e89ab44dce60ee43e34b2553ab78b5aa')

prepare() {
  cp -a service_identity-$pkgver{,-py2}
}

build() {
  cd "$srcdir"/service_identity-$pkgver
  python setup.py build
 
  cd "$srcdir"/service_identity-$pkgver-py2
  python2 setup.py build
}

check() {
  cd "$srcdir"/service_identity-$pkgver
  python setup.py pytest

  cd "$srcdir"/service_identity-$pkgver-py2
  python2 setup.py pytest
}
 
package_python-service-identity() {
  depends=('python-pyopenssl' 'python-pyasn1' 'python-pyasn1-modules' 'python-attrs')
  optdepends=('python-idna: for Internationalized Domain Names support')
 
  cd service_identity-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
 
package_python2-service-identity() {
  depends=('python2-pyopenssl' 'python2-pyasn1' 'python2-pyasn1-modules' 'python2-attrs')
  optdepends=('python2-idna: for Internationalized Domain Names support')
 
  cd service_identity-$pkgver-py2
  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}