# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-py
_pkgname=py
pkgver=1.4.23
pkgrel=1
pkgdesc="A Python library with cross-python path, ini-parsing, io, code, log facilities"
url="http://pylib.readthedocs.org/en/latest/"
arch="noarch"
license="MIT"
depends="python2"
depends_dev=""
makedepends="python2-dev py-setuptools"
install=""
subpackages=""
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	python2 setup.py build || return 1
}

package() {
	cd "$_builddir"
	python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
}

md5sums="b40aea711eeb8adba0c44f0b750a3205  py-1.4.23.tar.gz"
sha256sums="ba8f2a3894caf1121799a2b239d67873a56bd0dfa24e1673d92990a8ae7370ca  py-1.4.23.tar.gz"
sha512sums="1a38edb1855094a76362eff2afd370eca9ac796ee75a101bd4c3d566a8c75064a790f2032b4ea958f16836e22bea83a53ee9adbb7ca200b0ecb64677fec08515  py-1.4.23.tar.gz"
