# Contributor: Justin Berthault # Maintainer: Justin Berthault pkgname=py3-pyserial pkgver=3.5 pkgrel=6 pkgdesc="Multiplatform Serial Port Module for Python" url="https://github.com/pyserial/pyserial" arch="noarch" license="BSD-3-Clause" depends="python3" makedepends="python3-dev" 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 } check() { python3 test/run_all_tests.py } package() { 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"