[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Mon Aug 26 07:05:35 UTC 2019


    Date: Monday, August 26, 2019 @ 07:05:34
  Author: felixonmars
Revision: 501821

addpkg: python-geoip2 2.9.0-1

Added:
  python-geoip2/
  python-geoip2/repos/
  python-geoip2/trunk/
  python-geoip2/trunk/PKGBUILD

----------+
 PKGBUILD |   38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

Added: python-geoip2/trunk/PKGBUILD
===================================================================
--- python-geoip2/trunk/PKGBUILD	                        (rev 0)
+++ python-geoip2/trunk/PKGBUILD	2019-08-26 07:05:34 UTC (rev 501821)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=python-geoip2
+pkgver=2.9.0
+_testdatacommit=f6ed981c23b0eb33d7c07568e2177236252afda6
+pkgrel=1
+pkgdesc="MaxMind GeoIP2 API"
+url="https://github.com/maxmind/GeoIP2-python"
+license=('Apache')
+arch=('any')
+depends=('python-maxminddb' 'python-requests')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-runner' 'python-requests-mock')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/maxmind/GeoIP2-python/archive/v$pkgver.tar.gz"
+        https://github.com/maxmind/MaxMind-DB/archive/$_testdatacommit.tar.gz)
+sha512sums=('8631a41d9644887d0149678e40a5f9d03bba660853c308c43bf358cd49b3f021566b9d6f65b670c0c1c78bcb4cb7cb007ad2db6f3c032749afa454fc9e06d74c'
+            'f7b9d370c330980d9419c7bea486b258aef3fa8ab49f83b860ef73036fc577c402e2f631090c5d1d23f2a8e34f927030a8fc6dc15edcd8002136673685aecb12')
+
+prepare() {
+  cd GeoIP2-python-$pkgver
+  rmdir tests/data
+  ln -s "$srcdir"/MaxMind-DB-$_testdatacommit tests/data
+}
+
+build() {
+  cd GeoIP2-python-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd GeoIP2-python-$pkgver
+  python setup.py pytest
+}
+
+package() {
+  cd GeoIP2-python-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+}



More information about the arch-commits mailing list