aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-sqlalchemy-utils/APKBUILD
blob: 1178182c027f05bfaf4b70b2f5400ab120c06a9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
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"