1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-22 02:35:23 +03:00
aports/community/py3-pyserial/APKBUILD
psykose deb62258ec */*: set --skip-build for python installs
this marginally increases install speed by not checking if it needs a rebuild.
also remove --prefix=/usr as it defaults to /usr already.

might break a build or two, will fix later
2023-01-10 04:19:31 +01:00

40 lines
1.2 KiB
Text

# Contributor: Justin Berthault <justin.berthault@zaclys.net>
# Maintainer: Justin Berthault <justin.berthault@zaclys.net>
pkgname=py3-pyserial
pkgver=3.5
pkgrel=5
pkgdesc="Multiplatform Serial Port Module for Python"
url="https://github.com/pyserial/pyserial"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
makedepends="python3-dev"
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"