summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1798030773728c07728ea3f35902c85c1ac1e29f (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
56
57
58
59
60
61
62
63
64
# Maintainer: Ainola
# Contributor: Felix Yan <felixonmars@archlinux.org> (Stable Package)

pkgbase=python-google-auth-httplib2-git
pkgname=(python-google-auth-httplib2-git python2-google-auth-httplib2-git)
pkgver=r8.e7cd722
pkgrel=3
pkgdesc="Google Authentication Library: httplib2 transport"
url="https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2"
license=('Apache')
arch=('any')
makedepends=('python-setuptools' 'python2-setuptools' 'python-google-auth' 'python2-google-auth'
             'python-httplib2' 'python2-httplib2' 'python-six' 'python2-six' 'git')
checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-mock' 'python2-mock'
              'python-flask' 'python2-flask' 'python-pytest-localserver'
              'python2-pytest-localserver')
source=("git+https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2.git")
sha512sums=('SKIP')

pkgver() {
    cd google-auth-library-python-httplib2
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cp -a google-auth-library-python-httplib2{,-py2}
}

build() {
    cd google-auth-library-python-httplib2
    python setup.py build

    cd "$srcdir/google-auth-library-python-httplib2-py2"
    python2 setup.py build
}

check() {
    cd google-auth-library-python-httplib2
    python setup.py pytest

    cd ../google-auth-library-python-httplib2-py2
    python2 setup.py pytest
}

package_python-google-auth-httplib2-git() {
    depends=('python-google-auth' 'python-httplib2' 'python-six')
    provides=('python-google-auth-httplib2')
    conflicts=('python-google-auth-httplib2')

    cd google-auth-library-python-httplib2
    python setup.py install --root="$pkgdir" --optimize=1
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

package_python2-google-auth-httplib2-git() {
    depends=('python2-google-auth' 'python2-httplib2' 'python2-six')
    provides=('python-google-auth-httplib2')
    conflicts=('python-google-auth-httplib2')

    cd google-auth-library-python-httplib2-py2
    python2 setup.py install --root="$pkgdir" --optimize=1
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}