Skip to content

Commit

Permalink
dont sudo activate
Browse files Browse the repository at this point in the history
  • Loading branch information
s-martin committed Oct 22, 2023
1 parent 6fa77cc commit 84128dd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion components/rfid-reader/PN532/setup_pn532.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi
printf "Installing Python requirements for PN532...\n"
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
sudo python3 -m venv .venv
sudo source .venv/bin/activate
source .venv/bin/activate
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${JUKEBOX_HOME_DIR}"/components/rfid-reader/PN532/requirements.txt

printf "Configure RFID reader in Phoniebox...\n"
Expand Down
2 changes: 1 addition & 1 deletion components/rfid-reader/RC522/setup_rc522.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ question "Continue"
printf "Installing Python requirements for RC522...\n"
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
sudo python3 -m venv .venv
sudo source .venv/bin/activate
source .venv/bin/activate
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${JUKEBOX_HOME_DIR}"/components/rfid-reader/RC522/requirements.txt

printf "Activating SPI...\n"
Expand Down
4 changes: 2 additions & 2 deletions scripts/RegisterDevice.py.Multi
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def setupPN532():
print("Installing Python requirements for PN532...\n")
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
runCmd("sudo python3 -m venv .venv")
runCmd("sudo source .venv/bin/activate")
runCmd("source .venv/bin/activate")
runCmd("sudo python3 -m pip install --upgrade --force-reinstall "
"-q -r {}/components/rfid-reader/PN532/requirements.txt".format(JUKEBOX_HOME_DIR))
print("Done")
Expand All @@ -49,7 +49,7 @@ def setupMFRC522():
print("Installing Python requirements for RC522...\n")
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
runCmd("sudo python3 -m venv .venv")
runCmd("sudo source .venv/bin/activate")
runCmd("source .venv/bin/activate")
runCmd("sudo python3 -m pip install --upgrade --force-reinstall "
"-q -r {}/components/rfid-reader/RC522/requirements.txt".format(JUKEBOX_HOME_DIR))
print("Done")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,15 +873,15 @@ install_main() {
# Install necessary Python packages
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
sudo python3 -m venv .venv
sudo source .venv/bin/activate
source .venv/bin/activate
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements-spotify.txt
fi

# Install more required packages
echo "Installing additional Python packages..."
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
sudo python3 -m venv .venv
sudo source .venv/bin/activate
source .venv/bin/activate
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements.txt

samba_config
Expand Down Expand Up @@ -1018,7 +1018,7 @@ install_main() {
if [[ "${GPIOconfig}" == "YES" ]]; then
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
sudo python3 -m venv .venv
sudo source .venv/bin/activate
source .venv/bin/activate
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements-GPIO.txt
sudo systemctl enable phoniebox-gpio-control.service
if [[ ! -f "${jukebox_dir}"/settings/gpio_settings.ini ]]; then
Expand Down
6 changes: 3 additions & 3 deletions scripts/installscripts/buster-install-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -874,15 +874,15 @@ install_main() {
# Install necessary Python packages
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
sudo python3 -m venv .venv
sudo source .venv/bin/activate
source .venv/bin/activate
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements-spotify.txt
fi

# Install more required packages
echo "Installing additional Python packages..."
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
sudo python3 -m venv .venv
sudo source .venv/bin/activate
source .venv/bin/activate
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements.txt

samba_config
Expand Down Expand Up @@ -1019,7 +1019,7 @@ install_main() {
if [[ "${GPIOconfig}" == "YES" ]]; then
# Use a venv as Bookworm implemented PEP668 https://stackoverflow.com/a/75696359
sudo python3 -m venv .venv
sudo source .venv/bin/activate
source .venv/bin/activate
sudo python3 -m pip install --upgrade --force-reinstall -q -r "${jukebox_dir}"/requirements-GPIO.txt
sudo systemctl enable phoniebox-gpio-control.service
if [[ ! -f "${jukebox_dir}"/settings/gpio_settings.ini ]]; then
Expand Down

0 comments on commit 84128dd

Please sign in to comment.