aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-mysqlclient/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-mysqlclient/APKBUILD')
-rw-r--r--community/py3-mysqlclient/APKBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/py3-mysqlclient/APKBUILD b/community/py3-mysqlclient/APKBUILD
new file mode 100644
index 0000000000..5d819e44e4
--- /dev/null
+++ b/community/py3-mysqlclient/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
+pkgname=py-mysqlclient
+pkgver=1.3.14
+pkgrel=1
+pkgdesc="MySQL database connector for Python (with py3 support)"
+url="https://mysqlclient.readthedocs.io/"
+arch="all"
+license="GPL-2.0"
+depends=""
+makedepends="python2-dev python3-dev py-setuptools mariadb-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="mysqlclient-python-$pkgver.tar.gz::https://github.com/PyMySQL/mysqlclient-python/archive/$pkgver.tar.gz"
+builddir="$srcdir/mysqlclient-python-$pkgver"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py test
+ python3 setup.py test
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+sha512sums="480e36f7d7b31851f2d50eb3f6f2e8009277e8c5fff8ea8e5d2a3bc2424a5f13735e6c1fa620d17383ac0dd5020440425fcf8781911c3360f752e344813a7ddb mysqlclient-python-1.3.14.tar.gz"