# Contributor: Fabian Affolter # Maintainer: Fabian Affolter pkgname=py-sqlalchemy-utils _pkgname=SQLAlchemy-Utils pkgver=0.32.9 pkgrel=0 pkgdesc="A provider for custom data types and various utility functions for SQLAlchemy" url="http://sqlalchemy-utils.readthedocs.io/" arch="noarch" license="BSD" depends="py-anyjson py-babel py-arrow py-intervals py-phonenumbers py-passlib py-colour py-enum34 py-dateutil py-furl py-cryptography" makedepends="python2-dev python3-dev py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="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 python3 setup.py build || return 1 } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="58d81cc05dc6eca9233c7aa32d8e3af2 SQLAlchemy-Utils-0.32.9.tar.gz" sha256sums="28f95bc156c7673cf5ae697315b2b64640c65d0db20afbe38c0154640fac75fd SQLAlchemy-Utils-0.32.9.tar.gz" sha512sums="bc2c6c67de086f4fefb44f83e15f5174fc5c0a231bc92a13515d22804a9e521b61c7b4406fc89458c78a69264edccb07a17dbbf89c3ec50ab9b3374bc8b9349d SQLAlchemy-Utils-0.32.9.tar.gz"