summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-gitpython/PKGBUILD
blob: 3c6807e96f08ee9887a2d787330aed802980b9e2 (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
# Maintainer: NicoHood <archlinux {cat} nicohood {dog} de>
# PGP ID: 97312D5EB9D7AE7D0BD4307351DAE9B7C1AE9161
# Contributor: brent s. <bts[at]square-r00t[dot]net>

_pkgname=python-gitpython
_pypiname=GitPython
pkgbase=python-gitpython
pkgdesc="A python library used to interact with Git repositories"
pkgname=('python-gitpython' 'python2-gitpython')
pkgver=2.1.8
pkgrel=1
url="https://github.com/gitpython-developers/gitpython"
license=('BSD')
arch=("any")
makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools')
source=("${_pkgname}-${pkgver}.tar.gz::https://pypi.org/packages/source/G/${_pypiname}/${_pypiname}-${pkgver}.tar.gz"
        "${_pkgname}-${pkgver}.tar.gz.asc::https://pypi.org/packages/source/G/${_pypiname}/${_pypiname}-${pkgver}.tar.gz.asc")
sha512sums=('9ddef0c9c1b99b3c554257c913efa1e0928fd8bdedae3c9fbbc261d337ed73a62472f3d47c9f55812f5e4c7abb9ea04fb03a6818984060b7847948d75dc2b98a'
            'SKIP')
validpgpkeys=('2CF6E0B51AAF73F09B1C21174D1DA68C88710E60') # Sebastian Thiel (In Rust I trust!) <byronimo@gmail.com>

prepare() {
    cp -a "${srcdir}/${_pypiname}-${pkgver}"{,-py2}
}

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

    cd "${srcdir}/${_pypiname}-${pkgver}-py2"
    python2 setup.py build
}

package_python-gitpython() {
    depends=('python' 'python-gitdb>=2.0.0')

    cd "${srcdir}/${_pypiname}-${pkgver}"
    python setup.py install --skip-build --root="${pkgdir}" --optimize=1
    install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_python2-gitpython() {
    depends=('python2' 'python2-gitdb>=2.0.0')

    cd "${srcdir}/${_pypiname}-${pkgver}-py2"
    python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1
    install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}