aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-maxminddb/APKBUILD
blob: 93340c26586e2879a45fda52ca1e1b264a5bf30e (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
42
43
44
45
46
47
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=py3-maxminddb
pkgver=1.4.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 python3-dev py3-setuptools"
checkdepends="py3-nose py3-mock"
_test_data_commit=90c7fb95d67ee03ca7fc487fb69f525bcc19a671
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() {
	cd "$builddir"

	python3	setup.py build
}

check() {
	cd "$builddir"

	python3	setup.py test
}

package() {
	cd "$builddir"

	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="94bee89a0ef9d24f937f12f79dc8b9686be46ba3aeedc5538cc0c2ff4379ad2eb0bb84914849d3baa9120d4bbdb3abc215e30efd237a2c6d5fc0161e7e40c0d6  py3-maxminddb-1.4.1.tar.gz
6693bc2d100524c7fce61ff556132a78f33793f3e4bd4756661cfdf385198d15f3a0044346d46fef6d50fac2f6ecc755d9bebea4b22edb5be834cd39f64e7434  MaxMind-DB-test-data-90c7fb95d67ee03ca7fc487fb69f525bcc19a671.tar.gz"