summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMichael Laß2023-07-30 11:51:50 +0200
committerMichael Laß2023-07-30 14:08:45 +0200
commit1743f44c4e43ba4b6e5738908e66bdce85707372 (patch)
tree61f6046e19a56b84ad1c194951c21d7753580745 /PKGBUILD
parentbf57e4583940b272ede0380cc633f6201e7963cb (diff)
downloadaur-1743f44c4e43ba4b6e5738908e66bdce85707372.tar.gz
Use PEP 517 for building and installing
Additionally, switch to the source tarball from github because it includes the nose tests.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD17
1 files changed, 9 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7b395e97cc30..7aa3c31c9713 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,16 +8,17 @@
pkgname=python-pygatt
_module=pygatt
pkgver=4.0.5
-pkgrel=3
+pkgrel=4
pkgdesc="Python Bluetooth LE (Low Energy) and GATT Library"
url="https://github.com/peplin/pygatt"
-depends=('python-pexpect' 'python-pyserial')
license=('custom:partly Apache, partly MIT')
arch=('any')
-makedepends=('python-setuptools')
-source=("https://files.pythonhosted.org/packages/source/${_module::1}/$_module/$_module-$pkgver.tar.gz"
+depends=(python-pexpect python-pyserial)
+makedepends=(python-build python-installer python-wheel python-nose)
+checkdepends=(python-mock)
+source=(https://github.com/peplin/${_module}/archive/refs/tags/v${pkgver}.tar.gz
0001-Remove-dependency-on-enum-compat.patch)
-sha256sums=('7f4e0ec72f03533a3ef5fdd532f08d30ab7149213495e531d0f6580e9fcb1a7d'
+sha256sums=('fdfca26688b55f8d63800dbca6989bfbfff7796e0dcba3b020daffea34e9f224'
'1485111d418ac0812751426bbbec76ef56f8d79b7740f41009f7f6cb7f2a1e1a')
prepare() {
@@ -27,17 +28,17 @@ prepare() {
build() {
cd "${srcdir}/${_module}-${pkgver}"
- python setup.py build
+ python -m build --wheel --no-isolation
}
check() {
cd "${srcdir}/${_module}-${pkgver}"
- python setup.py check -m -s
+ nosetests
}
package() {
cd "${srcdir}/${_module}-${pkgver}"
- python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+ python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}