# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-urlgrabber
pkgver=4.1.0
pkgrel=6
pkgdesc="Python3 module for fetching files"
url="http://urlgrabber.baseurl.org/"
arch="noarch"
license="LGPL-2.0-or-later"
depends="python3 py3-curl py3-six"
makedepends="py3-setuptools"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/rpm-software-management/urlgrabber/releases/download/urlgrabber-${pkgver//./-}/urlgrabber-$pkgver.tar.gz"

# keep those til after alpine v3.11
provides="py-urlgrabber=$pkgver-r$pkgrel" # for backward compatibility
replaces="py-urlgrabber" # for backward compatibility

builddir="$srcdir"/urlgrabber-$pkgver

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="ab2e2707eb45cf460e2d7cebb0669ea1d20d9edc33ba526c19961314b76a3d8dd2bd932627c17756eac773e2f8bc63e8c9bba35a26487fc50735066c6404611a  urlgrabber-4.1.0.tar.gz"
