aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-pyserial/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-pyserial/APKBUILD')
-rw-r--r--community/py3-pyserial/APKBUILD22
1 files changed, 18 insertions, 4 deletions
diff --git a/community/py3-pyserial/APKBUILD b/community/py3-pyserial/APKBUILD
index 9d3fc212729..f2070332c17 100644
--- a/community/py3-pyserial/APKBUILD
+++ b/community/py3-pyserial/APKBUILD
@@ -1,17 +1,20 @@
# Contributor: Justin Berthault <justin.berthault@zaclys.net>
-# Maintainer: Justin Berthault <justin.berthault@zaclys.net>
+# Maintainer:
pkgname=py3-pyserial
pkgver=3.5
-pkgrel=1
+pkgrel=7
pkgdesc="Multiplatform Serial Port Module for Python"
url="https://github.com/pyserial/pyserial"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
-makedepends="python3-dev"
+makedepends="python3-dev py3-setuptools"
+subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/p/pyserial/pyserial-$pkgver.tar.gz"
builddir="$srcdir/"pyserial-$pkgver
+replaces="py3-serial" # For transitions from the old duplicated package
+
build() {
python3 setup.py build
}
@@ -21,7 +24,18 @@ check() {
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ local pyver
+ python3 setup.py install --skip-build --root="$pkgdir"
+
+ # provide access to tools
+ mkdir -p "$pkgdir"/usr/bin
+ pyver="$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
+ for app in miniterm.py list_ports.py; do
+ chmod +x "$pkgdir"/usr/lib/python$pyver/site-packages/serial/tools/$app
+ ln -s \
+ /usr/lib/python$pyver/site-packages/serial/tools/$app \
+ "$pkgdir"/usr/bin/$app
+ done
}
sha512sums="c8df5e50d952d5a6dcf1d9253a6ba953e9763c545a867da66c22c90dfa015aba0194f2a8f29a229d0a5f4dc8bfeeaaab8bcfda4066ed78a18b151bc05e6ae327 pyserial-3.5.tar.gz"