diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/py-pymysql/APKBUILD | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/testing/py-pymysql/APKBUILD b/testing/py-pymysql/APKBUILD index a7aa04124b..c215cdbccc 100644 --- a/testing/py-pymysql/APKBUILD +++ b/testing/py-pymysql/APKBUILD @@ -8,19 +8,39 @@ pkgdesc="Pure Python MySQL Client" url="https://pypi.python.org/pypi/PyMySQL" arch="noarch" license="MIT" -depends="python2" -makedepends="python2-dev py-setuptools" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" - python2 setup.py build || return 1 + python2 setup.py build + python3 setup.py build } package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + $python setup.py install --prefix=/usr --root="$subpkgdir" + rm -r "$subpkgdir"/usr/lib/python*/site-packages/pymysql/tests } md5sums="a87650294d868d6fc7dc81ac4248f873 py-pymysql-0.7.5.tar.gz" |