瀏覽代碼

update paho to v2.0

master
Dirk Alders 9 月之前
父節點
當前提交
4afb781cf8
共有 2 個檔案被更改,包括 21 行新增5 行删除
  1. 20
    4
      init_venv
  2. 1
    1
      mqtt

+ 20
- 4
init_venv 查看文件

@@ -2,7 +2,23 @@
2 2
 #
3 3
 BASEPATH=`realpath $(dirname $0)`
4 4
 
5
-python3 -m venv $BASEPATH/venv
6
-$BASEPATH/venv/bin/pip install --upgrade pip
7
-find $BASEPATH -name requirements.txt | xargs -L 1 $BASEPATH/venv/bin/pip install -r
8
-$BASEPATH/venv/bin/pip list --outdated --format=json | jq -r '.[] | .name'|xargs -n1 $BASEPATH/venv/bin/pip install -U
5
+#
6
+# Create venv
7
+#
8
+if [[ ! -e $BASEPATH/venv ]]; then
9
+    python3 -m venv $BASEPATH/venv > /dev/null 2>&1
10
+    # $BASEPATH/venv/bin/pip install --upgrade pip
11
+    find $BASEPATH -name requirements.txt | xargs -L 1 $BASEPATH/venv/bin/pip install -r > /dev/null 2>&1
12
+    echo "venv changed"
13
+fi
14
+#
15
+# Update venv modules
16
+#
17
+for req_mod in $($BASEPATH/venv/bin/pip list --format=json | jq -r '.[] | .name'); do
18
+     $BASEPATH/venv/bin/pip install -U $req_mod | grep install > /dev/null 2>&1
19
+     if [[ "$?" -eq "0" ]]; then
20
+         echo $req_mod changed
21
+     fi
22
+
23
+done
24
+#|xargs -n1 $BASEPATH/venv/bin/pip install -U

+ 1
- 1
mqtt

@@ -1 +1 @@
1
-Subproject commit 1adfb0626e7777c6d29be65d4ad4ce2d57541301
1
+Subproject commit 328d3471a748472695a61193becdda76c7eefe69

Loading…
取消
儲存