aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-firmata
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py-firmata')
-rw-r--r--testing/py-firmata/APKBUILD52
1 files changed, 31 insertions, 21 deletions
diff --git a/testing/py-firmata/APKBUILD b/testing/py-firmata/APKBUILD
index fce08db73c..0749131307 100644
--- a/testing/py-firmata/APKBUILD
+++ b/testing/py-firmata/APKBUILD
@@ -2,40 +2,50 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-firmata
_pkgname=pyFirmata
-pkgver=1.0.2
+pkgver=1.0.3
pkgrel=0
-pkgdesc="A Python interface for the Firmata procotol"
+pkgdesc="Python interface for the Firmata procotol"
url="https://github.com/tino/pyFirmata"
arch="noarch"
license="MIT"
-depends="python2 py-serial"
+depends="python2 python3 py-serial"
depends_dev=""
-makedepends="python2-dev py-setuptools"
+makedepends="python2-dev python3-dev py-setuptools"
install=""
-subpackages=""
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+options="!check" # upstream provides no testsuite
-_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
-}
-
+_builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$_builddir"
- python2 setup.py build || return 1
+ python2 setup.py build
+ python3 setup.py build
}
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"
+ 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="fddd3d9882cb0a672f15877c9e1c17a9 pyFirmata-1.0.2.tar.gz"
-sha256sums="81bc2704109161cee7c4c0544578be044a4be31d86fcb157c7bc53484015b634 pyFirmata-1.0.2.tar.gz"
-sha512sums="ff9eed2ca0e53010bd21cfbdbaa6f874cc2fd2431f8e5871de1f2c1168fd5cfb4a340425d116bb997fd04a067b74f4573c009588c553eadabd2d3698db5c6cb5 pyFirmata-1.0.2.tar.gz"
+sha512sums="9a5986d417447503c39e0497881592cecc38b423c55a627a38b398952cec7469e143ecbf1a82f9cd20ad93c7956ec06553f28e708419f05bb3c1d120961aa1b9 pyFirmata-1.0.3.tar.gz"