aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-maxminddb/APKBUILD
blob: d1ce8a8ebd4324f4332d8bd67a3df0e1bc3eb0f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=py3-maxminddb
pkgver=1.5.1
pkgrel=0
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"