# Template file for 'hg-evolve'
pkgname=hg-evolve
version=11.1.8
revision=2
_hg_version=6.9 # sync with mercurial version in void repos
build_style=python3-module
build_wrksrc="hg_evolve-${version}"
hostmakedepends="python3-setuptools"
depends="mercurial"
checkdepends="mercurial unzip"
short_desc="Mercurial extension for faster and safer mutable history"
maintainer="icp <pangolin@vivaldi.net>"
license="GPL-2.0-or-later"
homepage="https://www.mercurial-scm.org/doc/evolution/"
changelog="https://repo.mercurial-scm.org/evolve/file/tip/CHANGELOG"
distfiles="${PYPI_SITE}/h/hg_evolve/hg_evolve-${version}.tar.gz
 https://www.mercurial-scm.org/release/mercurial-${_hg_version}.tar.gz"
checksum="2486dead90a2466c4f927d0ff83b29b38da31d686403584b2865cf95b6fe00f5
 629604293df2be8171ec856bf4f8b4faa8e4305af13607dce0f89f74132836d6"

do_check() {
	_skips="check-compat-strings check-sdist version-install"
	for skip in $_skips; do rm "tests/test-${skip}.t"; done

	python3 ${wrksrc}/mercurial-${_hg_version}/tests/run-tests.py \
		${makejobs} --with-hg=/usr/bin/hg tests
}

post_install() {
	# resolve conflict against mercurial
	rm ${DESTDIR}/${py3_sitelib}/hgext3rd/__init__.py
}
