aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-maxminddb/APKBUILD
blob: 73102ef5fee35f53b872cb55969b96c9b9fa0f9c (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=2.0.3
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=dfce8394656a873510d11d0570588da2294e0cf3
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="f853eb0cd3ce756e60ca99bc44f26a593940fd63a6d2b525880e66b7d71d2327d208147eb132c792ebac462ab210ef502f340ef8ab7a09374389f9b90f8a8ded  py3-maxminddb-2.0.3.tar.gz
983b9bb63cc51852d0eb2a29044497bf9800842f485c659a9500a56be564690238a8e1ccfb84beefd99095a18029922128cf8feb538b5896125f30f9fe5143a3  MaxMind-DB-test-data-dfce8394656a873510d11d0570588da2294e0cf3.tar.gz"