aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-mysqlclient
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-12-04 11:34:03 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-12-04 11:34:03 +0000
commit19e95dd60567020c6643dd0dc2b9f2965a271147 (patch)
treeba1a1040c361628b3c2206e391f6b6e4d5a2e744 /community/py-mysqlclient
parent028a484cf4d309d7aa76784b5fba613904ae0f20 (diff)
downloadaports-19e95dd60567020c6643dd0dc2b9f2965a271147.tar.bz2
aports-19e95dd60567020c6643dd0dc2b9f2965a271147.tar.xz
community/py-mysqlclient: moved from testing
Diffstat (limited to 'community/py-mysqlclient')
-rw-r--r--community/py-mysqlclient/APKBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/py-mysqlclient/APKBUILD b/community/py-mysqlclient/APKBUILD
new file mode 100644
index 0000000000..5b3e0bf8ad
--- /dev/null
+++ b/community/py-mysqlclient/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer:
+pkgname=py-mysqlclient
+pkgver=1.3.13
+pkgrel=0
+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="d656c2c9d6eaf02331a994f154ab0d2e1624e563b7f8e1b6f39b4f7d7ad6416662b8caeeab775d435bba22a5aba2d4c72a56429b403bdcfbc21d7ea8c72cddcc mysqlclient-python-1.3.13.tar.gz"