[arch-commits] Commit in python-hidapi/repos/community-x86_64 (4 files)
Morten Linderud
foxboron at archlinux.org
Wed Dec 2 18:27:43 UTC 2020
Date: Wednesday, December 2, 2020 @ 18:27:42
Author: foxboron
Revision: 769244
archrelease: copy trunk to community-x86_64
Added:
python-hidapi/repos/community-x86_64/PKGBUILD
(from rev 769243, python-hidapi/trunk/PKGBUILD)
python-hidapi/repos/community-x86_64/revert-hid_get_input_report.patch
(from rev 769243, python-hidapi/trunk/revert-hid_get_input_report.patch)
Deleted:
python-hidapi/repos/community-x86_64/PKGBUILD
python-hidapi/repos/community-x86_64/revert-hid_get_input_report.patch
-----------------------------------+
PKGBUILD | 89 ++++++++++----------
revert-hid_get_input_report.patch | 158 ++++++++++++++++++------------------
2 files changed, 124 insertions(+), 123 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-12-02 18:26:53 UTC (rev 769243)
+++ PKGBUILD 2020-12-02 18:27:42 UTC (rev 769244)
@@ -1,44 +0,0 @@
-# Maintainer: Morten Linderud <foxboron at archlinux.org>
-# Contributor: Timothy Redaelli <timothy.redaelli at gmail.com>
-# Contributor: Andy Weidenbaum <archbaum at gmail.com>
-# Contributor: Kevin Azzam <arch at kevin.azz.am>
-
-pkgname=python-hidapi
-_pipname=hidapi
-pkgver=0.10.0.1
-_pkgver=${pkgver%.*}.post${pkgver##*.}
-pkgrel=7
-arch=('x86_64')
-pkgdesc="A Cython interface to the hidapi from signal11/hidapi"
-url="https://github.com/trezor/cython-hidapi"
-depends=('python' 'hidapi')
-makedepends=('cython' 'python-setuptools' 'udev')
-license=('custom')
-source=("https://pypi.org/packages/source/${_pipname:0:1}/$_pipname/$_pipname-$_pkgver.tar.gz")
-sha512sums=('edd3fd0adf986add89721ff9cdf91d001024f9aceb93f4b3ff6d9d211fa93f301b0bacc6f2acebf81d1d70996fd977ee7fa5ba7dc9bfdc3ef2354de23f6be42a')
-
-build() {
- cd "$_pipname-$_pkgver"
-
- python setup.py build \
- --without-libusb --with-system-hidapi
-}
-
-check() {
- cd "$_pipname-$_pkgver"
-
- local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
- PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" python tests.py
-}
-
-package_python-hidapi() {
- cd "$_pipname-$_pkgver"
-
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build \
- --without-libusb --with-system-hidapi
-
- install -Dm 755 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
- install -Dm 755 LICENSE-bsd.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-bsd.txt
- install -Dm 755 LICENSE-gpl3.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-gpl3.txt
- install -Dm 755 LICENSE-orig.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-orig.txt
-}
Copied: python-hidapi/repos/community-x86_64/PKGBUILD (from rev 769243, python-hidapi/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-12-02 18:27:42 UTC (rev 769244)
@@ -0,0 +1,45 @@
+# Maintainer: Morten Linderud <foxboron at archlinux.org>
+# Contributor: Timothy Redaelli <timothy.redaelli at gmail.com>
+# Contributor: Andy Weidenbaum <archbaum at gmail.com>
+# Contributor: Kevin Azzam <arch at kevin.azz.am>
+
+pkgname=python-hidapi
+_pipname=hidapi
+pkgver=0.10.1
+#_pkgver=${pkgver%.*}.post${pkgver##*.}
+_pkgver="$pkgver"
+pkgrel=1
+arch=('x86_64')
+pkgdesc="A Cython interface to the hidapi from signal11/hidapi"
+url="https://github.com/trezor/cython-hidapi"
+depends=('python' 'hidapi')
+makedepends=('cython' 'python-setuptools' 'udev')
+license=('custom')
+source=("https://pypi.org/packages/source/${_pipname:0:1}/$_pipname/$_pipname-$_pkgver.tar.gz")
+sha512sums=('681e3691a4b05b13abc38d305c68e448728612442d0ef12ce54d12eeebee6e18d33566c462a276d18ce5e29fad208e6fcde49bbe4b162eae5cd72ce37dea880b')
+
+build() {
+ cd "$_pipname-$_pkgver"
+
+ python setup.py build \
+ --without-libusb --with-system-hidapi
+}
+
+check() {
+ cd "$_pipname-$_pkgver"
+
+ local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+ PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" python tests.py
+}
+
+package_python-hidapi() {
+ cd "$_pipname-$_pkgver"
+
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build \
+ --without-libusb --with-system-hidapi
+
+ install -Dm 755 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+ install -Dm 755 LICENSE-bsd.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-bsd.txt
+ install -Dm 755 LICENSE-gpl3.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-gpl3.txt
+ install -Dm 755 LICENSE-orig.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-orig.txt
+}
Deleted: revert-hid_get_input_report.patch
===================================================================
--- revert-hid_get_input_report.patch 2020-12-02 18:26:53 UTC (rev 769243)
+++ revert-hid_get_input_report.patch 2020-12-02 18:27:42 UTC (rev 769244)
@@ -1,79 +0,0 @@
-diff --unified --recursive --text package.orig/chid.pxd package.new/chid.pxd
---- package.orig/chid.pxd 2020-07-05 23:48:53.567649269 -0300
-+++ package.new/chid.pxd 2020-07-05 23:49:40.391130648 -0300
-@@ -29,7 +29,6 @@
- int hid_set_nonblocking(hid_device* device, int value)
- int hid_send_feature_report(hid_device* device, unsigned char *data, int length) nogil
- int hid_get_feature_report(hid_device* device, unsigned char *data, int length) nogil
-- int hid_get_input_report(hid_device* device, unsigned char *data, int length) nogil
-
- int hid_get_manufacturer_string(hid_device*, wchar_t *, size_t)
- int hid_get_product_string(hid_device*, wchar_t *, size_t)
-diff --unified --recursive --text package.orig/hid.pyx package.new/hid.pyx
---- package.orig/hid.pyx 2020-07-05 23:48:53.567649269 -0300
-+++ package.new/hid.pyx 2020-07-05 23:49:40.391130648 -0300
-@@ -206,30 +206,6 @@
- free(cbuff)
- return res
-
-- def get_input_report(self, int report_num, int max_length):
-- if self._c_hid == NULL:
-- raise ValueError('not open')
-- cdef hid_device * c_hid = self._c_hid
-- cdef unsigned char lbuff[16]
-- cdef unsigned char* cbuff
-- cdef size_t c_max_length = max_length
-- cdef int n
-- if max_length <= 16:
-- cbuff = lbuff
-- else:
-- cbuff = <unsigned char *>malloc(max_length)
-- cbuff[0] = report_num
-- with nogil:
-- n = hid_get_input_report(c_hid, cbuff, c_max_length)
-- res = []
-- if n < 0:
-- raise IOError('read error')
-- for i in range(n):
-- res.append(cbuff[i])
-- if max_length > 16:
-- free(cbuff)
-- return res
--
- def error(self):
- if self._c_hid == NULL:
- raise ValueError('not open')
-diff --unified --recursive --text package.orig/hidraw.pyx package.new/hidraw.pyx
---- package.orig/hidraw.pyx 2020-07-05 23:48:53.570982615 -0300
-+++ package.new/hidraw.pyx 2020-07-05 23:49:40.391130648 -0300
-@@ -206,30 +206,6 @@
- free(cbuff)
- return res
-
-- def get_input_report(self, int report_num, int max_length):
-- if self._c_hid == NULL:
-- raise ValueError('not open')
-- cdef hid_device * c_hid = self._c_hid
-- cdef unsigned char lbuff[16]
-- cdef unsigned char* cbuff
-- cdef size_t c_max_length = max_length
-- cdef int n
-- if max_length <= 16:
-- cbuff = lbuff
-- else:
-- cbuff = <unsigned char *>malloc(max_length)
-- cbuff[0] = report_num
-- with nogil:
-- n = hid_get_input_report(c_hid, cbuff, c_max_length)
-- res = []
-- if n < 0:
-- raise IOError('read error')
-- for i in range(n):
-- res.append(cbuff[i])
-- if max_length > 16:
-- free(cbuff)
-- return res
--
- def error(self):
- if self._c_hid == NULL:
- raise ValueError('not open')
Copied: python-hidapi/repos/community-x86_64/revert-hid_get_input_report.patch (from rev 769243, python-hidapi/trunk/revert-hid_get_input_report.patch)
===================================================================
--- revert-hid_get_input_report.patch (rev 0)
+++ revert-hid_get_input_report.patch 2020-12-02 18:27:42 UTC (rev 769244)
@@ -0,0 +1,79 @@
+diff --unified --recursive --text package.orig/chid.pxd package.new/chid.pxd
+--- package.orig/chid.pxd 2020-07-05 23:48:53.567649269 -0300
++++ package.new/chid.pxd 2020-07-05 23:49:40.391130648 -0300
+@@ -29,7 +29,6 @@
+ int hid_set_nonblocking(hid_device* device, int value)
+ int hid_send_feature_report(hid_device* device, unsigned char *data, int length) nogil
+ int hid_get_feature_report(hid_device* device, unsigned char *data, int length) nogil
+- int hid_get_input_report(hid_device* device, unsigned char *data, int length) nogil
+
+ int hid_get_manufacturer_string(hid_device*, wchar_t *, size_t)
+ int hid_get_product_string(hid_device*, wchar_t *, size_t)
+diff --unified --recursive --text package.orig/hid.pyx package.new/hid.pyx
+--- package.orig/hid.pyx 2020-07-05 23:48:53.567649269 -0300
++++ package.new/hid.pyx 2020-07-05 23:49:40.391130648 -0300
+@@ -206,30 +206,6 @@
+ free(cbuff)
+ return res
+
+- def get_input_report(self, int report_num, int max_length):
+- if self._c_hid == NULL:
+- raise ValueError('not open')
+- cdef hid_device * c_hid = self._c_hid
+- cdef unsigned char lbuff[16]
+- cdef unsigned char* cbuff
+- cdef size_t c_max_length = max_length
+- cdef int n
+- if max_length <= 16:
+- cbuff = lbuff
+- else:
+- cbuff = <unsigned char *>malloc(max_length)
+- cbuff[0] = report_num
+- with nogil:
+- n = hid_get_input_report(c_hid, cbuff, c_max_length)
+- res = []
+- if n < 0:
+- raise IOError('read error')
+- for i in range(n):
+- res.append(cbuff[i])
+- if max_length > 16:
+- free(cbuff)
+- return res
+-
+ def error(self):
+ if self._c_hid == NULL:
+ raise ValueError('not open')
+diff --unified --recursive --text package.orig/hidraw.pyx package.new/hidraw.pyx
+--- package.orig/hidraw.pyx 2020-07-05 23:48:53.570982615 -0300
++++ package.new/hidraw.pyx 2020-07-05 23:49:40.391130648 -0300
+@@ -206,30 +206,6 @@
+ free(cbuff)
+ return res
+
+- def get_input_report(self, int report_num, int max_length):
+- if self._c_hid == NULL:
+- raise ValueError('not open')
+- cdef hid_device * c_hid = self._c_hid
+- cdef unsigned char lbuff[16]
+- cdef unsigned char* cbuff
+- cdef size_t c_max_length = max_length
+- cdef int n
+- if max_length <= 16:
+- cbuff = lbuff
+- else:
+- cbuff = <unsigned char *>malloc(max_length)
+- cbuff[0] = report_num
+- with nogil:
+- n = hid_get_input_report(c_hid, cbuff, c_max_length)
+- res = []
+- if n < 0:
+- raise IOError('read error')
+- for i in range(n):
+- res.append(cbuff[i])
+- if max_length > 16:
+- free(cbuff)
+- return res
+-
+ def error(self):
+ if self._c_hid == NULL:
+ raise ValueError('not open')
More information about the arch-commits
mailing list