# Template file for 'hg-git'
pkgname=hg-git
version=1.2.0+20251126
revision=1
# 1.2.0 is broken with dulwich 0.24 and hg 7.0+
_changeset=61756b2c29df83216fea58f42bf46e6ac9ac8d98
build_style=python3-pep517
hostmakedepends="python3-setuptools_scm python3-wheel"
depends="python3-dulwich mercurial"
checkdepends="$depends git unzip openssh gnupg"
short_desc="Mercurial plugin adding the ability to push and pull to/from Git"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
# https://www.mercurial-scm.org/wiki/HgGit
homepage="https://foss.heptapod.net/mercurial/hg-git"
changelog="https://foss.heptapod.net/mercurial/hg-git/-/raw/branch/default/NEWS.rst"
distfiles="$PYPI_SITE/h/hg_git/hg_git-$version.tar.gz"
distfiles="https://foss.heptapod.net/mercurial/hg-git/-/archive/${_changeset}/hg-git-${_changeset}.tar.gz"
checksum=14af00f1c4ec094f56343729f2af1848cb326b8323c153d64ad909f3361459ec

do_check() {
	python3 tests/run-tests.py --with-hg=/usr/bin/hg
}
