[arch-commits] Commit in python-hidapi/repos/community-x86_64 (3 files)

Morten Linderud foxboron at gemini.archlinux.org
Fri Nov 5 20:44:02 UTC 2021


    Date: Friday, November 5, 2021 @ 20:44:02
  Author: foxboron
Revision: 1037287

archrelease: copy trunk to community-x86_64

Added:
  python-hidapi/repos/community-x86_64/PKGBUILD
    (from rev 1037286, python-hidapi/trunk/PKGBUILD)
Deleted:
  python-hidapi/repos/community-x86_64/PKGBUILD
  python-hidapi/repos/community-x86_64/revert-hid_get_input_report.patch

-----------------------------------+
 PKGBUILD                          |   90 ++++++++++++++++++------------------
 revert-hid_get_input_report.patch |   79 -------------------------------
 2 files changed, 45 insertions(+), 124 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-05 20:43:56 UTC (rev 1037286)
+++ PKGBUILD	2021-11-05 20:44:02 UTC (rev 1037287)
@@ -1,45 +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.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
-}

Copied: python-hidapi/repos/community-x86_64/PKGBUILD (from rev 1037286, python-hidapi/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-11-05 20:44:02 UTC (rev 1037287)
@@ -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.11.0.2
+_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=('5365299ef8488561a82d2a2c911523c5d34e260f8068b4d4d26e912b6e348b328229498f0ee38d1eb9c81a969e9f91ffc7a0b9a60359f4e9d0511f8937e5ff21')
+
+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	2021-11-05 20:43:56 UTC (rev 1037286)
+++ revert-hid_get_input_report.patch	2021-11-05 20:44:02 UTC (rev 1037287)
@@ -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')



More information about the arch-commits mailing list