aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-rpigpio/APKBUILD
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2017-12-29 14:15:29 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2017-12-29 14:15:34 +0000
commit7bb766d0b0da9a1787b8a60f04b8b95ea6635297 (patch)
tree0d4d0c86ab706f3cab16b4f628994a57b8c8ca60 /community/py-rpigpio/APKBUILD
parentdf99ec2c94df93240b572f0b51809dd42b10eb89 (diff)
downloadaports-7bb766d0b0da9a1787b8a60f04b8b95ea6635297.tar.bz2
aports-7bb766d0b0da9a1787b8a60f04b8b95ea6635297.tar.xz
community/py-rpigpio: upgrade to 0.6.3, added py2/py3 package. Fixes #8278
Diffstat (limited to 'community/py-rpigpio/APKBUILD')
-rw-r--r--community/py-rpigpio/APKBUILD43
1 files changed, 34 insertions, 9 deletions
diff --git a/community/py-rpigpio/APKBUILD b/community/py-rpigpio/APKBUILD
index 60bf781010..cfac0a1235 100644
--- a/community/py-rpigpio/APKBUILD
+++ b/community/py-rpigpio/APKBUILD
@@ -2,27 +2,52 @@
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=py-rpigpio
_pkgname=RPi.GPIO
-pkgver=0.6.2
-pkgrel=1
+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"
-depends="python2"
-makedepends="python2-dev py-setuptools"
+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 || return 1
+ 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"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="9db86fd5f3bae872de9dbb068ee0b096 py-rpigpio-0.6.2.tar.gz"
-sha256sums="82acff0ef6bbe3cdf6f4dbdd73d96add5294bb94baf7f51c1d901861af3c2392 py-rpigpio-0.6.2.tar.gz"
-sha512sums="a6fbea51ffd07d33425f66deb1afcd7c3c7334d9e8a7c7ff793fc41e11a744e31003b9553384f0ac29da6576a071caae269ae6f1a681a9ebc5f7914955d84de1 py-rpigpio-0.6.2.tar.gz"
+sha512sums="b2fd08d9db1a2d58bdfed9d27c279d1f8c5cb6923ebd61253dae257b7271a7c5dec2271d6a426c9d1c67fc0444e18057e2e12ed8c3aa0f3d847291ba64beccf4 py-rpigpio-0.6.3.tar.gz"