PyVenv - provide Makefile building a virtual environment (#16)
* provide Make environment to create virtual Python environment * add magic folder to gitignore * README, add udev rule * Makefile - replace "source" with . for POSIC compatibility Co-authored-by: Felipe Martin Garcia <me@fmartingr.com> Co-authored-by: Sebastian Mangelsen (sebman) <sebastian.mangelsen@benify.com> Co-authored-by: Felipe Martin Garcia <me@fmartingr.com>
This commit is contained in:
parent
f7441a7ff4
commit
858fc0a331
|
@ -88,3 +88,4 @@ ENV/
|
||||||
|
|
||||||
# Rope project settings
|
# Rope project settings
|
||||||
.ropeproject
|
.ropeproject
|
||||||
|
.built/
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
all: test
|
||||||
|
|
||||||
|
venv: .built/venv
|
||||||
|
|
||||||
|
.built/venv: .built/
|
||||||
|
( \
|
||||||
|
python3 -m venv venv ;\
|
||||||
|
source venv/bin/activate ;\
|
||||||
|
pip install --upgrade pip ;\
|
||||||
|
pip install --upgrade -r requirements.txt ;\
|
||||||
|
touch $@ ;\
|
||||||
|
)
|
||||||
|
|
||||||
|
test: venv
|
||||||
|
( \
|
||||||
|
. venv/bin/activate ;\
|
||||||
|
python3 setup.py install ;\
|
||||||
|
luxa off ;\
|
||||||
|
sleep 1 ;\
|
||||||
|
luxa set --led=all ff0000 ;\
|
||||||
|
sleep 1 ;\
|
||||||
|
luxa set --led=all 00ff00 ;\
|
||||||
|
sleep 1 ;\
|
||||||
|
luxa set --led=all 0000ff ;\
|
||||||
|
sleep 1 ;\
|
||||||
|
luxa off ;\
|
||||||
|
)
|
||||||
|
|
||||||
|
.built/:
|
||||||
|
@mkdir -p $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf venv/
|
||||||
|
rm -rf .built/
|
16
README.md
16
README.md
|
@ -10,6 +10,22 @@ cd pyluxafor
|
||||||
python3 setup.py install
|
python3 setup.py install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Ensure that USB device gets proper permissions
|
||||||
|
|
||||||
|
Create UDEV rule in /etc/udev/rules.d/60-luxafor.rules with the following content
|
||||||
|
```
|
||||||
|
# add Luxafor LED flag
|
||||||
|
SUBSYSTEMS=="usb", ATTR{idVendor}=="04d8", ATTR{idProduct}=="f372", MODE:="0666"
|
||||||
|
```
|
||||||
|
|
||||||
|
Reload udev configuration files
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo udevadm control --reload && sudo udevadm trigger
|
||||||
|
```
|
||||||
|
|
||||||
|
Reinsert the Luxafor LED light.
|
||||||
|
|
||||||
## Using the CLI
|
## Using the CLI
|
||||||
|
|
||||||
Pyluxafor provides the `luxa` command to interact with the USB led in the same way as the library
|
Pyluxafor provides the `luxa` command to interact with the USB led in the same way as the library
|
||||||
|
|
Loading…
Reference in New Issue