# Contributor: ScrumpyJack # Maintainer: ScrumpyJack pkgname=py-rpigpio _pkgname=RPi.GPIO pkgver=0.6.3 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" 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" depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" ## remove if arch isn't noarch install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="b2fd08d9db1a2d58bdfed9d27c279d1f8c5cb6923ebd61253dae257b7271a7c5dec2271d6a426c9d1c67fc0444e18057e2e12ed8c3aa0f3d847291ba64beccf4 py-rpigpio-0.6.3.tar.gz"