Commit 59118575 authored by Nelso Jost's avatar Nelso Jost
Browse files

FIX: pip selection; NEW: board model selection prompt

parent 2b7a1855
......@@ -64,16 +64,16 @@ uninstall: undeploy-logger clean-venv clean-ino
apt-install:
sudo apt-get install python python3 python3-pip supervisor python-pip
@ echo "Finding pip3 binary.."
$(eval PIP3 := $(shell dpkg -L python3-pip | tail -1))
$(eval PIP3 := $(shell dpkg -L python3-pip | grep /usr/bin/pip | tail -1))
@ echo "PIP3=$(PIP3)"
$(eval PIP2 := $(shell dpkg -L python-pip | tail -1))
$(eval PIP2 := $(shell dpkg -L python-pip | grep /usr/bin/pip | tail -1))
@ echo "PIP2=$(PIP2)"
sudo $(PIP3) install -v virtualenv
sudo $(PIP2) install -v ino
setup: apt-install venv
venv: clean-venv
venv:
@ echo "-------------------------------------------------------"
virtualenv -v --python='python${PYVER}' ${VENV}
@ echo "Virtualenv with 'python${PYVER}' interpreter was created at ${VENV}"
......@@ -94,10 +94,12 @@ build:
mkdir -p ${INODIR}
mkdir -p ${INODIR}/src/ ${INODIR}/lib/
cp -rf meteorolog/. ${INODIR}/src/
ino list-models
@ echo "Getting board model from settings.yaml"
$(eval MODEL := $(shell cd logger && ../${VENV}/bin/python -c "from app import Meteorologger; print(Meteorologger().CFG['ARDUINO']['BOARD_MODEL'])"))
@ echo "MODEL = ${MODEL}"
cd ${INODIR}/ && ino build -m $(MODEL)
@ echo ""
@ read -p "Type your board model (or hit ENTER to proceed with '${MODEL}'): " MODEL_CONF; \
cd ${INODIR}/ && ino build -m $${MODEL_CONF:-${MODEL}}
upload:
@ echo "Getting board model from settings.yaml"
......@@ -108,7 +110,16 @@ upload:
serial:
${VENV}/bin/ipython -i logger/init_serial.py
bu: build upload
bu:
mkdir -p ${INODIR}
mkdir -p ${INODIR}/src/ ${INODIR}/lib/
cp -rf meteorolog/. ${INODIR}/src/
ino list-models
@ echo "Getting board model from settings.yaml"
$(eval MODEL := $(shell cd logger && ../${VENV}/bin/python -c "from app import Meteorologger; print(Meteorologger().CFG['ARDUINO']['BOARD_MODEL'])"))
@ echo ""
@ read -p "Type your board model (or hit ENTER to proceed with '${MODEL}'): " MODEL_CONF; \
cd ${INODIR}/ && ino build -m $${MODEL_CONF:-${MODEL}} && ino upload -m $${MODEL_CONF:-${MODEL}}
bus: build upload serial
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment