# Contributor: ScrumpyJack # Maintainer: ScrumpyJack pkgname=py-rpigpio _pkgname=RPi.GPIO pkgver=0.6.5 pkgrel=0 pkgdesc="This package provides a class to control the GPIO on a Raspberry Pi." url="https://pypi.python.org/pypi/RPi.GPIO" arch="armhf armv7" license="MIT" makedepends="python2-dev python3-dev py-setuptools" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::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 python3 setup.py build } check() { cd "$builddir" python2 setup.py check python3 setup.py check } package() { 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" } sha512sums="1393f49715b9c2d693743f962f75c4129ed229c83f49f31b913af8eaddb94280884127b8815d5c1e8451c3764c86962763a611b19ebc4afe72ac5fea3b61817b py-rpigpio-0.6.5.tar.gz"