diff options
author | Alberto Fanjul | 2020-07-01 11:24:46 +0200 |
---|---|---|
committer | Alberto Fanjul | 2020-07-01 11:24:46 +0200 |
commit | 8e95cc34dc5b16cfe8c532afdc913d4897d4dd84 (patch) | |
tree | f70528ca7482dd43c5190fe8b03d772b407d0ede | |
parent | 3017d094bd857a09eae25a5fb3dc69a01d018b75 (diff) | |
download | aur-sjcam-git.tar.gz |
Fix warnings and force python2
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | Avoid-warning-with-beautifulsoup.patch | 25 | ||||
-rw-r--r-- | Force-run-under-python2.patch | 22 | ||||
-rw-r--r-- | PKGBUILD | 19 |
4 files changed, 67 insertions, 5 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Wed Jul 1 07:52:49 UTC 2020 +# Wed Jul 1 09:24:31 UTC 2020 pkgbase = sjcam-git pkgdesc = A python CLI tool for controlling SJCAM WiFi Sports Cameras pkgver = r23.b96760b @@ -14,7 +14,11 @@ pkgbase = sjcam-git conflicts = sjcam replaces = sjcam source = sjcam-git::git+https://github.com/AdamLaurie/sjcam + source = Avoid-warning-with-beautifulsoup.patch + source = Force-run-under-python2.patch md5sums = SKIP + md5sums = 3cb7c894c3610c1893d9c1be246bff94 + md5sums = d7bb9be4165e48a51f4e52d99e2a386b pkgname = sjcam-git diff --git a/Avoid-warning-with-beautifulsoup.patch b/Avoid-warning-with-beautifulsoup.patch new file mode 100644 index 000000000000..7712fdc4d350 --- /dev/null +++ b/Avoid-warning-with-beautifulsoup.patch @@ -0,0 +1,25 @@ +From bbc7da208ccf2fbb6bafa5b1a07e6e141cbe8e09 Mon Sep 17 00:00:00 2001 +From: Alberto Fanjul <albertofanjul@gmail.com> +Date: Wed, 1 Jul 2020 11:10:28 +0200 +Subject: [PATCH] Avoid warning with beautifulsoup + +--- + sj4000.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sj4000.py b/sj4000.py +index b5d66e7..282822e 100755 +--- a/sj4000.py ++++ b/sj4000.py +@@ -215,7 +215,7 @@ class camera: + return False, 'Timeout!' + if resp.status_code != 200: + return False, resp +- soup= BeautifulSoup(resp.text) ++ soup= BeautifulSoup(resp.text, features="lxml") + try: + table= soup.findChildren('table')[0] + except: +-- +2.27.0 + diff --git a/Force-run-under-python2.patch b/Force-run-under-python2.patch new file mode 100644 index 000000000000..e9ef72af9668 --- /dev/null +++ b/Force-run-under-python2.patch @@ -0,0 +1,22 @@ +From 354e53021e7cd374f5cf24de603b976a25cb6976 Mon Sep 17 00:00:00 2001 +From: Alberto Fanjul <albertofanjul@gmail.com> +Date: Wed, 1 Jul 2020 11:10:46 +0200 +Subject: [PATCH] Force run under python2 + +--- + sjcam | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sjcam b/sjcam +index dac447d..72277eb 100755 +--- a/sjcam ++++ b/sjcam +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/env python2 + + # sjcam - SJCAM WiFi Camera CLI utility - control SJCAM sports cameras over WiFi connection + # +-- +2.27.0 + @@ -15,13 +15,24 @@ replaces=(sjcam) backup=() options=() install= -source=("$pkgname::git+https://github.com/AdamLaurie/sjcam") +source=("$pkgname::git+https://github.com/AdamLaurie/sjcam" + "Avoid-warning-with-beautifulsoup.patch" + "Force-run-under-python2.patch" +) noextract=() -md5sums=('SKIP') +md5sums=('SKIP' + '3cb7c894c3610c1893d9c1be246bff94' + 'd7bb9be4165e48a51f4e52d99e2a386b') # Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for # a description of each element in the source array. +prepare() { + cd "$srcdir/${pkgname}" + patch -p1 -i "$srcdir/Avoid-warning-with-beautifulsoup.patch" + patch -p1 -i "$srcdir/Force-run-under-python2.patch" +} + pkgver() { cd "$srcdir/${pkgname}" @@ -34,10 +45,10 @@ pkgver() { build() { cd "$srcdir/${pkgname}" - python setup.py build + python2 setup.py build } package() { cd "$srcdir/${pkgname}" - python setup.py install --root="$pkgdir" --optimize=1 --skip-build + python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build } |