diff options
author | David Runge | 2023-04-07 13:25:42 +0000 |
---|---|---|
committer | Carl Smedstad | 2024-12-30 15:08:04 +0100 |
commit | a328e6e65bb4faddb11647e6cbd9c2fca91a9d3d (patch) | |
tree | aa53ac6d4fd617f81e184b2e194651dee385546a | |
parent | 9ecb63fef324a8a7edaa2bc178f53146f9660071 (diff) | |
download | aur-a328e6e65bb4faddb11647e6cbd9c2fca91a9d3d.tar.gz |
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.
-rw-r--r-- | PKGBUILD | 52 | ||||
-rw-r--r-- | python-btchip-0.1.32-setup.patch | 12 |
2 files changed, 50 insertions, 14 deletions
@@ -1,26 +1,50 @@ -# Maintainer: Christian Rebischke <chris.rebischke@archlinux.org> +# Maintainer: +# Contributor: Christian Rebischke <chris.rebischke@archlinux.org> # Contributor: Timothy Redaelli <timothy.redaelli@gmail.com> # Contributor: Andy Weidenbaum <archbaum@gmail.com> +_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 } diff --git a/python-btchip-0.1.32-setup.patch b/python-btchip-0.1.32-setup.patch new file mode 100644 index 000000000000..fd81136a9f25 --- /dev/null +++ b/python-btchip-0.1.32-setup.patch @@ -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, |