Date: Friday, April 7, 2023 @ 13:25:42
  Author: dvzrv
Revision: 1441197

upgpkg: python-btchip 0.1.32-3: Rebuild against Python 3.11.

Switch to PEP517.
Fix setup.py to contain valid version identifier in extras_require.
Add all required direct and optional dependencies.

Added:
  python-btchip/trunk/python-btchip-0.1.32-setup.patch
Modified:
  python-btchip/trunk/PKGBUILD

----------------------------------+
 PKGBUILD                         |   52 +++++++++++++++++++++++++++----------
 python-btchip-0.1.32-setup.patch |   12 ++++++++
 2 files changed, 50 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-07 13:22:18 UTC (rev 1441196)
+++ PKGBUILD    2023-04-07 13:25:42 UTC (rev 1441197)
@@ -1,26 +1,50 @@
-# Maintainer: Christian Rebischke <[email protected]>
+# Maintainer:
+# Contributor: Christian Rebischke <[email protected]>
 # Contributor: Timothy Redaelli <[email protected]>
 # Contributor: Andy Weidenbaum <[email protected]>
 
+_name=btchip-python
 pkgname=python-btchip
 pkgver=0.1.32
-pkgrel=2
+pkgrel=3
 pkgdesc="Python library to communicate with BTChip dongle"
-arch=('any')
-depends=('python-hidapi')
-makedepends=('python-setuptools')
-optdepends=('btchip-udev: access BTChip as non-root user')
+arch=(any)
 url="https://github.com/LedgerHQ/btchip-python";
-license=('Apache')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/LedgerHQ/btchip-python/archive/$pkgver.tar.gz";)
-sha512sums=('ec9218743fdb71af794bc8e3bf27c3c40bec5b4f90376288e360f4de004eb5acf85a5aaba06ec76c670b4f7e14281b8cc3c3b23f4348de6d65a4b978d7aa8acb')
+license=(Apache)
+depends=(
+  python
+  python-ecdsa
+  python-hidapi
+)
+makedepends=(
+  python-build
+  python-installer
+  python-setuptools
+  python-wheel
+)
+optdepends=(
+  'btchip-udev: access BTChip as non-root user'
+  'python-pyscard: for smartcard support'
+)
+source=(
+  $pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz
+  $pkgname-0.1.32-setup.patch
+)
+sha512sums=('ec9218743fdb71af794bc8e3bf27c3c40bec5b4f90376288e360f4de004eb5acf85a5aaba06ec76c670b4f7e14281b8cc3c3b23f4348de6d65a4b978d7aa8acb'
+            
'af5144a0cb50c2d92d920d714a81fe81a001fbf723abfa14a67d84b518e3fcde2152fad492dd3b97427c0ae4523b996c4effb33ff0fb6622e991f9352762b6dd')
+b2sums=('27971a6efc04836f44837997ecb3f31bb3ff425c0f3cd9a06e2189363f956b42e2867b2e0b9c45dda08e76e68707a915f56adc9b978a2b0afcc2a874fdfd75c9'
+        
'7506461601bcd98db5ff0da40452479771ad1226ebf5e4ebe28d5d09ee19b99c2d45e1ecec0a14324b5c3735db3a43ee754c3cdc464c97c860011806b9c23be5')
 
+prepare() {
+  patch -Np1 -d $_name-$pkgver -i ../$pkgname-0.1.32-setup.patch
+}
+
 build() {
-  cd "btchip-python-$pkgver"
-  python setup.py build
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
 }
 
-package_python-btchip() {
-  cd "btchip-python-$pkgver"
-  python setup.py install --root="$pkgdir" --optimize=1
+package() {
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
 }

Added: python-btchip-0.1.32-setup.patch
===================================================================
--- python-btchip-0.1.32-setup.patch                            (rev 0)
+++ python-btchip-0.1.32-setup.patch    2023-04-07 13:25:42 UTC (rev 1441197)
@@ -0,0 +1,12 @@
+diff -ruN a/setup.py b/setup.py
+--- a/setup.py 2021-02-09 19:03:55.000000000 +0100
++++ b/setup.py 2023-04-07 15:22:53.755022135 +0200
+@@ -17,7 +17,7 @@
+     packages=find_packages(),
+     install_requires=['hidapi>=0.7.99', 'ecdsa>=0.9'],
+     extras_require = {
+-      'smartcard': [ 'python-pyscard>=1.6.12-4build1' ]
++      'smartcard': [ 'python-pyscard>=1.6.12' ]
+     },
+     include_package_data=True,
+     zip_safe=False,

Reply via email to