# Template file for 'python-discogs_client'
pkgname=python-discogs_client
version=2.2.1
revision=1
noarch=yes
wrksrc="discogs-client-${version}"
build_style=python-module
hostmakedepends="python-setuptools python3-setuptools"
depends="python-requests python-six python-oauthlib"
pycompile_module="discogs_client"
short_desc="Official Discogs API client for Python2"
maintainer="Georg Schabel <gescha@posteo.de>"
homepage="https://github.com/discogs/discogs_client"
license="BSD-2-Clause"
distfiles="${PYPI_SITE}/d/discogs-client/discogs-client-${version}.tar.gz
 https://raw.githubusercontent.com/discogs/discogs_client/master/LICENSE"
checksum="9e32b5e45cff41af8025891c71aa3025b3e1895de59b37c11fd203a8af687414
 1af62aeddccb57134218ddbdc67d0473524ca736703d7cce01db59b2e07da542"
skip_extraction="LICENSE"

post_install() {
	vlicense ${XBPS_SRCDISTDIR}/${pkgname}-${version}/LICENSE
}

python3-discogs_client_package() {
	noarch=yes
	depends="python3-requests python3-six python3-oauthlib"
	pycompile_module="discogs_client"
	short_desc="${short_desc/Python2/Python3}"
	pkg_install() {
		vmove usr/lib/python3*
		vlicense ${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/LICENSE
	}
}
