aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-maxminddb/APKBUILD
blob: d34dca2afc410b1e13465237b55d270c25522fac (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.2
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="1f4ceb3514bba357ec5439a008e7e314c83f2073d5752317bcf6d91f2bb3218ebce33638c44360132e4b12a5694fdbaf75d4ec8c8796fb96844f82d702a29c50  py3-maxminddb-1.5.2.tar.gz
c5340eca903585f4dfc0e5cde6d2ae1aa2064bad7a40b6ea859644cd1a2bbf6058af7d2b6ce6624a82fdf6ab3fbc57b9c71ccc8683293b620164697ca2b8e6ab  MaxMind-DB-test-data-9a56cf59da5c380f6014d042189ad8bce6f3dd89.tar.gz"