]> git.walde.dev - epaper_display/commitdiff
Add python venv setup
authorDustin Walde <redacted>
Wed, 1 Jan 2025 01:48:57 +0000 (17:48 -0800)
committerDustin Walde <redacted>
Wed, 1 Jan 2025 01:48:57 +0000 (17:48 -0800)
Update wiring pi build name update

.gitignore
scripts/install-WiringPi.sh
scripts/setup-venv.sh [new file with mode: 0644]

index 819685a751c3bc82bbc2da1239706a7296e1a36d..56aab81bb1c682a21559471a8ea31302c03ca337 100644 (file)
@@ -1,2 +1,3 @@
 reference/
 build/
+.venv/
index cc7658a7602bfa5455a1def90c49c0c7f24087fa..163daf6fa03eb17f6c96c9b0415d662d65513302 100644 (file)
@@ -8,10 +8,10 @@ pushd WiringPi || exit 66
 
 # build the package
 ./build debian || exit 1
-mv debian-template/wiringpi-*.deb .
+mv debian-template/wiringpi_*.deb .
 
 # install it
-sudo apt install ./wiringpi-*.deb
+sudo apt install ./wiringpi_*.deb
 popd || exit 67
 popd || exit 68
 
diff --git a/scripts/setup-venv.sh b/scripts/setup-venv.sh
new file mode 100644 (file)
index 0000000..1c31a93
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+VENV_PATH=.venv
+
+if [ ! -f "$VENV_PATH/pyvenv.cfg" ]; then
+  python -m venv .venv
+else
+  echo "Using existing venv"
+fi
+
+"$VENV_PATH/bin/pip" install \
+  Pillow \
+  spidev \
+  RPi.GPIO \
+  ;
+
+