summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f5ca4e67f809ce9835351ced64cd52e2c1f078aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Maintainer: Luis Martinez <luis dot martinez at tuta dot io>
# Contributor: Patrick L├╝hne <patrick-arch@luehne.de>

pkgname=python-miio
pkgver=0.5.6
pkgrel=2
pkgdesc="Python library & console tool for controlling Xiaomi smart appliances"
url="https://github.com/rytilahti/python-miio"
arch=('any')
license=('GPL3')
depends=('python>=3.6' 'python-appdirs' 'python-attrs' 'python-click>=7'
         'python-construct' 'python-croniter' 'python-cryptography'
         'python-netifaces' 'python-pytz' 'python-tqdm' 'python-yaml' 'python-zeroconf')
optdepends=('python-android-backup-tools: Android backup extraction support')
makedepends=('python-dephell')
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('c1f94d0129cf1992dbf4d27ab0bae56c0bccb9be62ae51593f3a49dc7bd90209839188f498dad97778b3c0321506b372c3e9af2f5ec72db01b867cfe2de4848e')

prepare() {
	cd "$pkgname-$pkgver"
	dephell deps convert --from pyproject.toml --to setup.py
}

build() {
	cd "$pkgname-$pkgver"
	python setup.py build
}

package() {
	cd "$pkgname-$pkgver"
	python setup.py install --prefix=/usr --optimize=1 --root="${pkgdir}" --skip-build
	install -D -m644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}"
}