ソースを参照

install script removed

master
Dirk Alders 1年前
コミット
1cf5094bfd
3個のファイルの変更30行の追加41行の削除
  1. 16
    0
      .vscode/launch.json
  2. 14
    0
      .vscode/settings.json
  3. 0
    41
      __install__.py

+ 16
- 0
.vscode/launch.json ファイルの表示

@@ -0,0 +1,16 @@
1
+{
2
+    // Verwendet IntelliSense zum Ermitteln möglicher Attribute.
3
+    // Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
4
+    // Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
5
+    "version": "0.2.0",
6
+    "configurations": [
7
+        {
8
+            "name": "Python: Main File execution",
9
+            "type": "python",
10
+            "request": "launch",
11
+            "program": "${workspaceFolder}/ambient_info.py",
12
+            "console": "integratedTerminal",
13
+            "justMyCode": true
14
+        }
15
+    ]
16
+}

+ 14
- 0
.vscode/settings.json ファイルの表示

@@ -0,0 +1,14 @@
1
+{
2
+  "python.defaultInterpreterPath": "./venv/bin/python",
3
+  "autopep8.args": ["--max-line-length=150"],
4
+  "[python]": {
5
+    "python.formatting.provider": "none",
6
+    "editor.defaultFormatter": "ms-python.autopep8",
7
+    "editor.formatOnSave": true
8
+  },
9
+  "editor.fontSize": 14,
10
+  "emmet.includeLanguages": { "django-html": "html" },
11
+  "python.testing.pytestArgs": ["-v", "--cov", "--cov-report=xml", "__test__"],
12
+  "python.testing.unittestEnabled": false,
13
+  "python.testing.pytestEnabled": true
14
+}

+ 0
- 41
__install__.py ファイルの表示

@@ -1,41 +0,0 @@
1
-#!/bin/python
2
-#
3
-import os
4
-import sys
5
-
6
-SERVICE_FILE = """
7
-[Unit]
8
-Description=Smarthome Ambient Information Service
9
-After=network-online.target
10
-Wants=network-online.target
11
-[Service]
12
-User=%(UID)d
13
-Group=%(GID)d
14
-ExecStart=%(MY_PATH)s/ambient_info.sh
15
-Type=simple
16
-[Install]
17
-WantedBy=default.target
18
-"""
19
-
20
-
21
-def help():
22
-    print("Usage: prog <UID> <GID> <TARGET_PATH>")
23
-
24
-if __name__ == "__main__":
25
-    if len(sys.argv) == 4:
26
-        try:
27
-            uid = int(sys.argv[1])
28
-            gid = int(sys.argv[2])
29
-        except ValueError:
30
-            help()
31
-        else:
32
-            if os.path.isdir(sys.argv[3]):
33
-                with open(os.path.join(sys.argv[3], 'ambient_info.service'), "w") as fh:
34
-                    fh.write(SERVICE_FILE % {
35
-                        "MY_PATH": os.path.dirname(os.path.abspath(__file__)),
36
-                        "UID": uid,
37
-                        "GID": gid})
38
-            else:
39
-                help()
40
-    else:
41
-        help()

読み込み中…
キャンセル
保存