mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-26 08:51:25 +02:00
54 lines
1.2 KiB
Plaintext
54 lines
1.2 KiB
Plaintext
# Contributor: Pierre-Gildas MILLON <pgmillon@gmail.com>
|
|
# Maintainer:
|
|
pkgname=py-pygit2
|
|
_pkgname=pygit2
|
|
pkgver=0.27.2
|
|
pkgrel=0
|
|
pkgdesc="Python bindings for libgit2"
|
|
url="https://github.com/libgit2/pygit2"
|
|
arch="all"
|
|
license="GPL-2.0-only-WITH-GCC-exception-2.0"
|
|
depends="py-cffi py-six"
|
|
makedepends="python2-dev python3-dev py-setuptools libgit2-dev"
|
|
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
|
|
source="https://pypi.io/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
python2 setup.py build
|
|
python3 setup.py build
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
python2 setup.py check
|
|
python3 setup.py check
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"
|
|
}
|
|
|
|
_py2() {
|
|
replaces="$pkgname"
|
|
depends="${depends//py-/py2-}"
|
|
_py python2
|
|
}
|
|
|
|
_py3() {
|
|
depends="${depends//py-/py3-}"
|
|
_py python3
|
|
}
|
|
|
|
_py() {
|
|
local python="$1"
|
|
pkgdesc="$pkgdesc (for $python)"
|
|
install_if="$pkgname=$pkgver-r$pkgrel $python"
|
|
|
|
cd "$builddir"
|
|
$python setup.py install --prefix=/usr --root="$subpkgdir"
|
|
}
|
|
|
|
sha512sums="f6578a3694babe7837a5ccc4c99e2fa1827b5f67815f2cac6f3b3d0498d94a0ffeb55d3c6e9c9417d47ecbf0ad9a10302e3b59ea0d2e9eec6d9da8426b10175b pygit2-0.27.2.tar.gz"
|