# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-routes
_pkgname=Routes
pkgver=2.5.1
pkgrel=4
pkgdesc="Routing Recognition and Generation Tools"
url="https://routes.readthedocs.io/en/latest/"
arch="noarch"
license="MIT"
depends="py3-repoze-lru py3-six"
makedepends="py3-setuptools"
checkdepends="py3-beautifulsoup4 py3-nose py3-pytest py3-webob py3-webtest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/R/Routes/Routes-$pkgver.tar.gz
	py312-unittest.patch
	"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 -m pytest -W ignore::DeprecationWarning \
		-k "not test_unicode" # https://github.com/bbangert/routes/issues/117
}

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

sha512sums="
06ec9a8426ced86524096703de47e3da2fa08bd0ed8c962d451b4338966804245b5074077021fb58a5afcb63acd6dcffa05a89703b8b54841a69a4cdff12b755  py3-routes-2.5.1.tar.gz
a814e946632e4e86dc556b13811f9f7f89c142cbec13aad723b58c292cd7e4689adb19835c0c7f68d147033b89845fe34dbf63a0004e13ea7ff004efaec03d52  py312-unittest.patch
"
