crownstone / bluenet

Bluenet is the in-house firmware on Crownstone hardware. Functions: switching, dimming, energy monitoring, presence detection, indoor localization, switchcraft.
https://crownstone.rocks
91 stars 62 forks source link

Python virtualenv #141

Closed mrquincle closed 2 years ago

mrquincle commented 2 years ago

Guides user through the use of python virtualenv when -DPYTHON_SETUP_VENV=ON is being used.

mrquincle commented 2 years ago

Individual commits contain most of the reasoning, for example:

https://github.com/crownstone/bluenet/pull/141/commits/c47cf58c8b1c0a47f6d039dedd2d238cbb66955d https://github.com/crownstone/bluenet/pull/141/commits/757964f1e9d20fbca283c54dd3a20960ded30087

ArrowAcrobatics commented 2 years ago

Tested:


cmake .. -DPYTHON_SETUP_VENV=ON -DBOARD_TARGET=my_board
cd ./my_board
make python_setup_venv
source $REPO/tools/python/crownstone_env/bin/activate```

This indeed installs and activates a venv.

Questions, notes, etc.:
- I mis an option for automatically installing the crownstone-python-lib-* libraries. (Either editable from custom locations for development or default pip releases for 'end'-users) This could be a make target if you wish.
- Do all board configs install a venv in the same location? Is this intended?
- I'm missing documentation on these build/install/config features :-)
ArrowAcrobatics commented 2 years ago

The new automated test setup doesn't complete succesfully yet. As that is a new feature I'd say, OK. When the tests run correctly you can merge without an extra review iteration.

mrquincle commented 2 years ago

Need to find a way to run this self-hosted runner on a separate machine, will merge into master now.