# Template file for 'python3-GitPython'
pkgname=python3-GitPython
version=3.1.27
revision=1
wrksrc="GitPython-${version}"
build_style=python3-module
make_check_args="--deselect test/test_base.py::TestBase::test_with_rw_remote_and_rw_repo
 --deselect test/test_git.py::TestGit::test_refresh
 --deselect test/test_remote.py::TestRemote::test_base
 --deselect test/test_git.py::TestGit::test_call_process_calls_execute"
hostmakedepends="python3-setuptools"
depends="python3-gitdb git"
checkdepends="${depends} python3-pytest-sugar python3-coverage python3-pytest-cov python3-toml
 python3-mypy flake8 python3-ddt git python3-virtualenv"
short_desc="Library to interact with Git repositories (Python3)"
maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz>"
license="BSD-3-Clause"
homepage="https://github.com/gitpython-developers/GitPython"
distfiles="https://github.com/gitpython-developers/GitPython/archive/refs/tags/${version}.tar.gz"
checksum=2ec5341b54aed19424696c933d705ddedcf2fe45f89d2fd0dbed06087ac5ed3c

post_install() {
	vlicense LICENSE
}

pre_check() {
	git clone https://github.com/gitpython-developers/GitPython GitPython-test-checkout
	cd GitPython-test-checkout
	git checkout ${version}
	yes | ./init-tests-after-clone.sh
	export GIT_PYTHON_TEST_GIT_REPO_BASE="${PWD}"

	git config --global user.email "void@example.com"
	git config --global user.name "void"
}
