diff options
Diffstat (limited to 'community')
-rw-r--r-- | community/py-sqlalchemy/APKBUILD | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/community/py-sqlalchemy/APKBUILD b/community/py-sqlalchemy/APKBUILD new file mode 100644 index 0000000000..9ae9c77dcb --- /dev/null +++ b/community/py-sqlalchemy/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: William Pitcock <nenolod@dereferenced.org> +# Contributor: Drew DeVault <sir@cmpwn.com> +# Maintainer: William Pitcock <nenolod@dereferenced.org> +pkgname=py-sqlalchemy +_pkgname=SQLAlchemy +pkgver=1.3.0 +pkgrel=0 +pkgdesc="An object relational mapper for Python" +url="https://pypi.python.org/pypi/SQLAlchemy" +arch="all" +license="MIT" +makedepends="python2-dev py-setuptools python3-dev" +checkdepends="pytest py-mock" +subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +prepare() { + cd "$builddir" + sed -i setup.py -e 's/ *"pytest-xdist",//g' + cp -r "$builddir" "$builddir"-py3 +} + +build() { + cd "$builddir" + python2 setup.py build + cd "$builddir"-py3 + python3 setup.py build +} + +check() { + cd "$builddir" + pytest-2 + cd "$builddir"-py3 + pytest-3 +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + cd "$builddir" + replaces="$pkgname" + _py python2 +} + +_py3() { + cd "$builddir" + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc ${python:6:1}" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="031c912dc8830bab70ebb48b253d47ef949818a9a49f9b8d38a2daed21dd27b295182641158578c4a1bfe4bf065968824430b4f4bf949ffdacb12bb99dae9119 SQLAlchemy-1.3.0.tar.gz" |