From 78c155208e29e7f57193a3ce839323257aa28b60 Mon Sep 17 00:00:00 2001 From: Sebastian Lenzlinger Date: Wed, 17 Jul 2024 11:58:16 +0200 Subject: [PATCH] Add install instructions to Readme --- .gitignore | 2 ++ code/iottb-project/README.md | 28 ++++++++++++++++++++++++++++ code/iottb-project/requirements.txt | 9 +++++++++ 3 files changed, 39 insertions(+) create mode 100644 code/iottb-project/requirements.txt diff --git a/.gitignore b/.gitignore index 666a253..5874b89 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ iottb.egg-info logs/ *.pyc .obsidian +dist/ +build/ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 diff --git a/code/iottb-project/README.md b/code/iottb-project/README.md index d7a21e2..ac7a312 100644 --- a/code/iottb-project/README.md +++ b/code/iottb-project/README.md @@ -1,4 +1,32 @@ # Iottb + +## Installation +There are a few different ways to install `iottb`. + +In Linux, to install to a users local bin directory using poetry or pip: +- Move into the project root `cd path/to/iottb-project`, so that you are in the directory which contains the `pyproject.toml` file. +```bash +poetry install --editable +# or with pip +pip install -e . +``` +Currently this is the recommended method. +Alternatively install with pip into any activated environment: +```bash +pip install -r requirements.txt +``` + +It is possible to make a single executable for you machine wich you can just put in your path using pyinstaller. +1. Install pyinstaller +```bash +pip install pyinstaller +``` +2. Make the executable +```bash +pyinstaller --onefile iottb/main.py +``` +To be able to run it as `iottb` rename it to `iottb` and put it somewhere on your PATH. +Currently this method has bugs, since some python standard library names do not seem to be compiled into the executable. ## Basic Invocation ## Configuration diff --git a/code/iottb-project/requirements.txt b/code/iottb-project/requirements.txt new file mode 100644 index 0000000..6d281ad --- /dev/null +++ b/code/iottb-project/requirements.txt @@ -0,0 +1,9 @@ +click-option-group==0.5.6 ; python_version >= "3.12" and python_version < "4" \ + --hash=sha256:38a26d963ee3ad93332ddf782f9259c5bdfe405e73408d943ef5e7d0c3767ec7 \ + --hash=sha256:97d06703873518cc5038509443742b25069a3c7562d1ea72ff08bfadde1ce777 +click==8.1.7 ; python_version >= "3.12" and python_version < "4.0" \ + --hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \ + --hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de +colorama==0.4.6 ; python_version >= "3.12" and python_version < "4.0" and platform_system == "Windows" \ + --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \ + --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6