# Template file for 'python-html5lib'
pkgname=python-html5lib
version=0.999999999
revision=3
noarch=yes
wrksrc="html5lib-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-six python-webencodings"
pycompile_module="html5lib"
short_desc="Python2 HTML parser based on the WHATWG HTML5 specification"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="https://github.com/html5lib/html5lib-python"
license="MIT"
distfiles="${PYPI_SITE}/h/html5lib/html5lib-${version}.tar.gz"
checksum=ee747c0ffd3028d2722061936b5c65ee4fe13c8e4613519b4447123fc4546298

pre_build() {
	sed -i '/setuptools>=/d' setup.py
}
post_install() {
	vlicense LICENSE
}

python3-html5lib_package() {
	noarch=yes
	pycompile_module="html5lib"
	depends="python3-six python3-webencodings"
	replaces="python3.4-html5lib>=0"
	short_desc="${short_desc/Python2/Python3}"
	pkg_install() {
		vmove usr/lib/python3*
		vlicense LICENSE
	}
}
python3.4-html5lib_package() {
	noarch=yes
	build_style=meta
	short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
	depends="python3-html5lib>=${version}_${revision}"
}
