aboutsummaryrefslogblamecommitdiffstats
path: root/testing/py-arrow/APKBUILD
blob: b281b4a56c459b80ba47d36fabce862efb7098df (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                               
             
        
                                                                                
                                   
             
                    




































                                                                                                          
                                                                                                                                                                  
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-arrow
_pkgname=arrow
pkgver=0.10.0
pkgrel=2
pkgdesc="A Python library to create and manipulate dates, times, and timestamps"
url="https://arrow.readthedocs.io/"
arch="noarch"
license="Apache-2.0"
depends="py-dateutil"
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"
}

sha512sums="a2baa23f1424b21506f3b664f0ef02d09f91b9cfaf6e0badfa544f42c750ed51136ae0e8910ac24207c0265a1b233f10a6f3cbafee3124b5f5c4fd965cfd01c0  arrow-0.10.0.tar.gz"