aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-usb/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-usb/APKBUILD')
-rw-r--r--community/py3-usb/APKBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/community/py3-usb/APKBUILD b/community/py3-usb/APKBUILD
new file mode 100644
index 00000000000..19de1756165
--- /dev/null
+++ b/community/py3-usb/APKBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
+pkgname=py3-usb
+_pkgname=pyusb
+pkgver=1.2.1
+pkgrel=3
+pkgdesc="easy USB devices communication in Python3"
+url="https://github.com/pyusb/pyusb"
+arch="noarch"
+license="BSD-3-Clause"
+depends="python3 libusb"
+makedepends="py3-setuptools py3-setuptools_scm"
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
+ "
+builddir="$srcdir"/$_pkgname-$pkgver
+
+replaces="py-usb" # Backwards compatibility
+provides="py-usb=$pkgver-r$pkgrel" # Backwards compatibility
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ cd tests
+ python3 testall.py || return 0 # usb /dev not mounted in CI
+}
+
+package() {
+ python3 setup.py install --skip-build --root="$pkgdir"
+}
+
+sha512sums="
+51d0c1165540afa21d6d0ab7315ac77b08083d1cb8e502173dfb1766bc542173f9d7b0070fd14bc71d147e31c3f0780b277093791a7c82485962a04ec62bf0f1 py3-usb-1.2.1.tar.gz
+"