Skip to content

Commit

Permalink
use python 3 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
renekliment committed Dec 15, 2018
1 parent 8cc9f02 commit 3f16665
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ In order to help troubleshooting, be sure to include the following information:
**Output of the [audio debugging script](https://github.com/alexa-pi/AlexaPi/wiki/Audio-setup-&-debugging#audio-debugging-script).**

**Your OS (including version) where you are running AlexaPi:**
_Note: Raspbian older than Stretch is not supported!_
```
```

Expand All @@ -17,7 +18,7 @@ In order to help troubleshooting, be sure to include the following information:
```

**Python release (`python2 --version`):**
**Python release (`python3 --version`):**
```
```
Expand Down
2 changes: 1 addition & 1 deletion src/debug.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ echo off
title AlexaPi for Windows
cls

python main.py -d
python3 main.py -d

pause
2 changes: 1 addition & 1 deletion src/scripts/AlexaPi.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ After=network.target network-online.target sound.target

[Service]
Type=simple
ExecStart=/usr/bin/python /opt/AlexaPi/src/main.py --daemon
ExecStart=/usr/bin/python3 /opt/AlexaPi/src/main.py --daemon

User=alexapi
Group=alexapi
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/inc/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ RUN_USER="alexapi"
HOME_DIR="/var/lib/AlexaPi"

function run_python {
python2 "$@"
python3 "$@"
}

function run_pip {
pip2 "$@"
pip3 "$@"
}

function init_classic {
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/inc/os/archlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

function install_os {
pacman -Sy
pacman -S base-devel git python2 python2-pip swig portaudio libpulse vlc sox libmad libid3tag gcc --noconfirm --needed
pacman -S base-devel git python python-pip swig portaudio libpulse vlc sox libmad libid3tag gcc --noconfirm --needed

install -Dm644 ./unit-overrides/force-python2.conf /etc/systemd/system/AlexaPi.service.d/force-python2.conf
systemctl daemon-reload
}

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/inc/os/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function install_os {
apt-get update
apt-get install curl git build-essential python-dev python-setuptools swig libpulse-dev portaudio19-dev libportaudio2 vlc-nox sox libsox-fmt-mp3 -y
apt-get install curl git build-essential python3-dev python3-setuptools swig libpulse-dev portaudio19-dev libportaudio2 vlc-nox sox libsox-fmt-mp3 -y
apt-get -y remove python-pip
run_python -m easy_install pip
}
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/initd_alexa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -e

NAME="AlexaPi"
PIDFILE="/run/$NAME/$NAME.pid"
DAEMON="/usr/bin/python /opt/AlexaPi/src/main.py"
DAEMON="/usr/bin/python3 /opt/AlexaPi/src/main.py"
DAEMON_OPTS="--daemon"
RUN_USER="alexapi"
RUN_GROUP="alexapi"
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ echo -------------------------------------------

echo Installing dependencies:

python -m pip install -r "%apath%requirements.txt"
python3 -m pip install -r "%apath%requirements.txt"

pause
cls
Expand All @@ -27,7 +27,7 @@ echo You HAVE TO set up Amazon keys in the config.yaml file now
echo ######################################################################################################
pause

start python.exe auth_web.py
start python3.exe auth_web.py

echo =====
echo Done!
Expand Down
5 changes: 0 additions & 5 deletions src/scripts/unit-overrides/force-python2.conf

This file was deleted.

2 changes: 1 addition & 1 deletion src/start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ echo off
title AlexaPi for Windows
cls

python main.py
python3 main.py

pause

0 comments on commit 3f16665

Please sign in to comment.