APKBUILD 1.08 KB
Newer Older
Peter Bui's avatar
Peter Bui committed
1
# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
Fabian Affolter's avatar
Fabian Affolter committed
2 3 4
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-tz
_pkgname=pytz
5
pkgver=2018.9
6
pkgrel=0
Fabian Affolter's avatar
Fabian Affolter committed
7 8 9 10
pkgdesc="A Python definitions of world timezone"
url="http://pytz.sourceforge.net/"
arch="noarch"
license="MIT"
11
options="!check"
12 13 14
depends=""
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
15
source="https://pypi.io/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
16
builddir="$srcdir/$_pkgname-$pkgver"
Fabian Affolter's avatar
Fabian Affolter committed
17 18

build() {
19
	cd "$builddir"
20
	python2 setup.py build
21
	python3 setup.py build
Fabian Affolter's avatar
Fabian Affolter committed
22 23 24
}

package() {
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
	mkdir -p "$pkgdir"
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_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"
Fabian Affolter's avatar
Fabian Affolter committed
45 46
}

47
sha512sums="c3dabe61d04539245761a5c4e3bfb614df1c3b8ccc2ffa1cf320c5ad642242c29b3321fe7855d32a2ae55c739acbbe8c0e1813df5b3c757b8f56fff910fee159  pytz-2018.9.tar.gz"