summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Lühne2017-11-18 22:19:30 +0100
committerPatrick Lühne2017-11-18 22:19:30 +0100
commit6f7404c01fca15d21b52d1c55d07273e385bfb69 (patch)
tree07cd3444be31267c2bd5e2f2893cf1892df4357d
downloadaur-6f7404c01fca15d21b52d1c55d07273e385bfb69.tar.gz
Initial commit of python-miio 0.3.1
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD29
-rw-r--r--cryptodome-typing.patch39
3 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..0def81d75dc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = python-miio
+ pkgdesc = Python library & console tool for controlling Xiaomi smart appliances
+ pkgver = 0.3.1
+ pkgrel = 1
+ url = https://github.com/rytilahti/python-miio
+ arch = any
+ license = custom
+ depends = python>=3.4
+ depends = python-android-backup-tools
+ depends = python-attrs
+ depends = python-click
+ depends = python-construct
+ depends = python-cryptography
+ depends = python-pycryptodomex
+ depends = python-pretty-cron
+ depends = python-pytz
+ depends = python-zeroconf
+ source = https://github.com/rytilahti/python-miio/archive/0.3.1.tar.gz
+ source = cryptodome-typing.patch
+ sha512sums = 324ecc5fa3d049c3d59529755575ed1d179193631b28eb0999c28c62ead85c6cf1604d35c97a186bd3521bb05cc72fdf9352c6aa527ed064404a7a3c3183a7ba
+ sha512sums = c3c402edba82a70a7a91d3250e4fed1ed4f1316ab7e785663994c8722107703461fda0ac55f33935d52be453498f3118d6d0c2bcfd4ee21415f867643a9c115c
+
+pkgname = python-miio
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..402a5cff01e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Patrick Lühne <patrick-arch@luehne.de>
+
+pkgname=python-miio
+pkgver=0.3.1
+pkgrel=1
+pkgdesc="Python library & console tool for controlling Xiaomi smart appliances"
+url="https://github.com/rytilahti/python-miio"
+arch=('any')
+license=('custom')
+depends=('python>=3.4' 'python-android-backup-tools' 'python-attrs' 'python-click' 'python-construct' 'python-cryptography' 'python-pycryptodomex' 'python-pretty-cron' 'python-pytz' 'python-zeroconf')
+source=("https://github.com/rytilahti/${pkgname}/archive/${pkgver}.tar.gz"
+ 'cryptodome-typing.patch')
+sha512sums=('324ecc5fa3d049c3d59529755575ed1d179193631b28eb0999c28c62ead85c6cf1604d35c97a186bd3521bb05cc72fdf9352c6aa527ed064404a7a3c3183a7ba'
+ 'c3c402edba82a70a7a91d3250e4fed1ed4f1316ab7e785663994c8722107703461fda0ac55f33935d52be453498f3118d6d0c2bcfd4ee21415f867643a9c115c')
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ patch -p1 -i ../../cryptodome-typing.patch
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ python setup.py build
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ python setup.py install --prefix=/usr --root="${pkgdir}"
+}
diff --git a/cryptodome-typing.patch b/cryptodome-typing.patch
new file mode 100644
index 00000000000..806156ed29a
--- /dev/null
+++ b/cryptodome-typing.patch
@@ -0,0 +1,39 @@
+diff -ura package.orig/miio/extract_tokens.py package.new/miio/extract_tokens.py
+--- package.orig/miio/extract_tokens.py 2017-11-18 19:21:38.466287415 +0100
++++ package.new/miio/extract_tokens.py 2017-11-18 19:19:14.968581127 +0100
+@@ -2,7 +2,7 @@
+ import click
+ import tempfile
+ import sqlite3
+-from Crypto.Cipher import AES
++from Cryptodome.Cipher import AES
+ from pprint import pformat as pf
+ import attr
+ from android_backup import AndroidBackup
+diff -ura package.orig/requirements.txt package.new/requirements.txt
+--- package.orig/requirements.txt 2017-11-02 08:22:30.000000000 +0100
++++ package.new/requirements.txt 2017-11-18 22:14:06.909084310 +0100
+@@ -3,7 +3,7 @@
+ pretty_cron
+ construct
+ zeroconf
+-pycrypto # for miio-extract-tokens
++pycryptodomex # for miio-extract-tokens
+ attrs
+ typing # for py3.4 support
+ pytz # for tz offset in vacuum
+diff -ura package.orig/setup.py package.new/setup.py
+--- package.orig/setup.py 2017-11-02 08:22:30.000000000 +0100
++++ package.new/setup.py 2017-11-18 22:13:56.895913715 +0100
+@@ -30,9 +30,9 @@
+ 'click',
+ 'cryptography',
+ 'pretty_cron',
+- 'typing',
++ 'typing; python_version < "3.5"',
+ 'zeroconf',
+- 'pycrypto',
++ 'pycryptodomex',
+ 'attrs',
+ 'android_backup',
+ 'pytz'],