archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-gitdb / trunk / PKGBUILD
blobe28fc1d3de41482c886ee8ba89352285571682a9
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: NicoHood <archlinux {cat} nicohood {dog} de>
3 # Contributor: Carl George < arch at cgtx dot us >
5 _name=gitdb
6 pkgdesc="A pure-Python git object database"
7 pkgname=python-gitdb
8 _commit=bb7d69697b9d24885217b37b94cc0bf4da676fd4  # refs/tags/4.0.10^{}
9 pkgver=4.0.10
10 pkgrel=2
11 epoch=1
12 url="https://github.com/gitpython-developers/gitdb"
13 license=(BSD)
14 arch=(any)
15 depends=(git python-smmap)
16 makedepends=(git python-build python-installer python-setuptools python-wheel)
17 checkdepends=(python-nose python-pytest)
18 source=(git+$url#tag=$_commit?signed)
19 sha512sums=('SKIP')
20 validpgpkeys=('27C50E7F590947D7273A741E85194C08421980C9') # Sebastian Thiel (In Rust I trust!) <byronimo@gmail.com>
22 build() {
23   cd $_name
24   python -m build --wheel --no-isolation
27 # some tests need to be disabled, because of coupling with the project
28 # repository: https://github.com/gitpython-developers/gitdb/issues/51
29 check() {
30   cd $_name
31   local TEST_TMPDIR=$(mktemp -d)
32   (
33     cd "$TEST_TMPDIR"
34     git init
35     git config user.name "Test User"
36     git config user.email "test@user.org"
37     for commit in {1..50}; do
38       touch "file$commit"
39       git add "file$commit"
40       git commit -m "file$commit"
41     done
42   )
43   export GITDB_TEST_GIT_REPO_BASE="$TEST_TMPDIR/.git"
44   pytest -vv -k "not test_pack_writing"
47 package() {
48   cd $_name
49   python -m installer --destdir="$pkgdir" dist/*.whl
50   install -vDm 644 {AUTHORS,README.rst} -t "$pkgdir/usr/share/doc/$pkgname/"
51   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"