# Contributor: Fabian Affolter # Maintainer: Fabian Affolter pkgname=py-astral _pkgname=astral pkgver=1.3.4 pkgrel=1 pkgdesc="Calculations for the position of the sun and moon" url="https://pypi.python.org/pypi/astral/" arch="noarch" license="ASL 2.0" depends="py-tz" 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.zip" 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="b1b5738b4237bf9e8813f1f2ffd64452 astral-1.3.4.zip" sha256sums="e4bbd7748835cd76809ec06852c2a0afd44ecbb1873351a31f0dbb78f44f2de3 astral-1.3.4.zip" sha512sums="a9c0bd91f03594715f5e4eb58bed6c7b444d789d42917b587b8e97c871255e53ae602538b8ecb684de1f77171725fd9ad8ba2de15410ec0df514ea16c1e7e5ea astral-1.3.4.zip"