From 7e0909a8b77a9fa26b84625844c0c8f3591a6d24 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Fri, 23 May 2025 18:25:36 -0500 Subject: [PATCH] [DOCS] Wheel building Add wheel building instructions --- python/README.md | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/python/README.md b/python/README.md index 54f1ad1fa..9c5aceb29 100644 --- a/python/README.md +++ b/python/README.md @@ -1,18 +1,40 @@ # Theengs Decoder -## dependencies -Building this module it requires scikit-build and cmake, if not already installed you will need to open a terminal and execute: -``` -pip install scikit-build -apt-get install cmake -``` - -## installation - -From a terminal cd to this folder and execute: -``` -python setup.py install --user -``` +## Installation + +* Create a virtual environment +`python3 -m venv theengs-venv` + +* Activate the virtual environment +`source theengs-venv/bin/activate` + +* Install and upgrade pip +`python3 -m pip install --upgrade pip` + +* Install dependencies +`pip3 install setuptools setuptools_scm cmake==3.25.0 wheel scikit-build ninja` + +* Clone Theengs Decoder +`git clone --recursive https://github.com/Theengs/decoder.git` + +* cd to python folder inside the repository +`cd decoder/python` + +* Copy sources inside the build repository +`cp -r ../src .` + +* Build wheel +`python3 setup.py bdist_wheel` + +* Install +`cd ..` +`pip3 install python/dist/*.whl` + +* Verify installation +`python3 -c "from TheengsDecoder import decodeBLE; print('Successfully imported decodeBLE from PR_build.yml')"` + +You should see: +`Successfully imported decodeBLE from PR_build.yml` ## using