# Contributor: Kevin Daudt # Maintainer: Kevin Daudt pkgname=py3-maxminddb pkgver=1.5.1 pkgrel=1 pkgdesc="Python MaxMind DB reader extension" url="http://maxminddb.readthedocs.org/" arch="all" license="Apache-2.0" depends="python3" makedepends="libmaxminddb-dev python3-dev py3-setuptools" checkdepends="py3-nose py3-mock" _test_data_commit=9a56cf59da5c380f6014d042189ad8bce6f3dd89 source="$pkgname-$pkgver.tar.gz::https://github.com/maxmind/MaxMind-DB-Reader-python/archive/v$pkgver.tar.gz MaxMind-DB-test-data-$_test_data_commit.tar.gz::https://github.com/maxmind/MaxMind-DB/archive/$_test_data_commit.tar.gz" builddir="$srcdir/MaxMind-DB-Reader-python-$pkgver" prepare() { cd "$srcdir" # Submodule required for tests cp -r "MaxMind-DB-$_test_data_commit/"* "$builddir/tests/data" default_prepare } build() { python3 setup.py build } check() { python3 setup.py test } package() { python3 setup.py install --prefix=/usr --root="$pkgdir" } sha512sums="d62542127d44ad2740d213331a7d0be0fc5bc9687d06b2c42501e9456727c0b266207bf01450c170d55d0b969cfc3396f533646376ceca1a2070c11b3e47aea4 py3-maxminddb-1.5.1.tar.gz c5340eca903585f4dfc0e5cde6d2ae1aa2064bad7a40b6ea859644cd1a2bbf6058af7d2b6ce6624a82fdf6ab3fbc57b9c71ccc8683293b620164697ca2b8e6ab MaxMind-DB-test-data-9a56cf59da5c380f6014d042189ad8bce6f3dd89.tar.gz"