From 1cf5094bfdc70c60daf83f3b2972e2dea9b0c9b7 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Fri, 3 Nov 2023 19:51:26 +0100 Subject: [PATCH] install script removed --- .vscode/launch.json | 16 ++++++++++++++++ .vscode/settings.json | 14 ++++++++++++++ __install__.py | 41 ----------------------------------------- 3 files changed, 30 insertions(+), 41 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json delete mode 100644 __install__.py diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..c9e62e0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Verwendet IntelliSense zum Ermitteln möglicher Attribute. + // Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen. + // Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Main File execution", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/ambient_info.py", + "console": "integratedTerminal", + "justMyCode": true + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ee25f90 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "python.defaultInterpreterPath": "./venv/bin/python", + "autopep8.args": ["--max-line-length=150"], + "[python]": { + "python.formatting.provider": "none", + "editor.defaultFormatter": "ms-python.autopep8", + "editor.formatOnSave": true + }, + "editor.fontSize": 14, + "emmet.includeLanguages": { "django-html": "html" }, + "python.testing.pytestArgs": ["-v", "--cov", "--cov-report=xml", "__test__"], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} diff --git a/__install__.py b/__install__.py deleted file mode 100644 index f14d251..0000000 --- a/__install__.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/python -# -import os -import sys - -SERVICE_FILE = """ -[Unit] -Description=Smarthome Ambient Information Service -After=network-online.target -Wants=network-online.target -[Service] -User=%(UID)d -Group=%(GID)d -ExecStart=%(MY_PATH)s/ambient_info.sh -Type=simple -[Install] -WantedBy=default.target -""" - - -def help(): - print("Usage: prog ") - -if __name__ == "__main__": - if len(sys.argv) == 4: - try: - uid = int(sys.argv[1]) - gid = int(sys.argv[2]) - except ValueError: - help() - else: - if os.path.isdir(sys.argv[3]): - with open(os.path.join(sys.argv[3], 'ambient_info.service'), "w") as fh: - fh.write(SERVICE_FILE % { - "MY_PATH": os.path.dirname(os.path.abspath(__file__)), - "UID": uid, - "GID": gid}) - else: - help() - else: - help()