# Template file for 'python-pafy'
pkgname=python-pafy
version=0.5.1
revision=1
wrksrc="pafy-${version}"
noarch=yes
python_versions="2.7 3.4"
pycompile_module="pafy"
build_style=python-module
hostmakedepends="python-setuptools python3.4-setuptools"
depends="youtube-dl"
short_desc="Python2 library to download YouTube content and retrieve metadata"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="LGPL-3"
homepage="https://github.com/np1/pafy"
distfiles="https://github.com/np1/pafy/archive/v${version}.tar.gz"
checksum=0d7a36b2551a9306060d5c7ddb37992272532649342cea1f4639cb02cad569dc
alternatives="pafy:ytdl:/usr/bin/ytdl2.7"

python3.4-pafy_package() {
	noarch=yes
	pycompile_version="3.4"
	pycompile_module="pafy"
	depends="python3.4-youtube-dl"
	short_desc="${short_desc/2/3.4/}"
	alternatives="pafy:ytdl:/usr/bin/ytdl3.4"
	pkg_install() {
		vmove usr/bin/ytdl3.4
		vmove usr/lib/python3.4
	}
}
