1From 86a1d18d96f827baa0c1029c85a53fc89d436e17 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair.francis@wdc.com>
3Date: Tue, 19 Mar 2019 13:38:44 -0700
4Subject: [PATCH 6/7] Use python3 and pip3 instead of python and pip
5
6Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
7Upstream-Status: Inappropriate [embedded specific]
8---
9 bin/mycroft-cli-client          | 2 +-
10 bin/mycroft-pip                 | 2 +-
11 bin/mycroft-say-to              | 2 +-
12 bin/mycroft-skill-testrunner    | 4 ++--
13 bin/mycroft-speak               | 2 +-
14 dev_setup.sh                    | 6 +++---
15 scripts/install-pocketsphinx.sh | 2 +-
16 7 files changed, 10 insertions(+), 10 deletions(-)
17
18diff --git a/bin/mycroft-cli-client b/bin/mycroft-cli-client
19index f40a316e3f6..de2040d9e67 100755
20--- a/bin/mycroft-cli-client
21+++ b/bin/mycroft-cli-client
22@@ -21,4 +21,4 @@ DIR="$( dirname "$SOURCE" )"
23 source "$DIR/../venv-activate.sh" -q
24
25 # Invoke the Command Line Interface
26-python -m mycroft.client.text $@
27+python3 -m mycroft.client.text $@
28diff --git a/bin/mycroft-pip b/bin/mycroft-pip
29index a42b16b847a..81bd5bfb3cf 100755
30--- a/bin/mycroft-pip
31+++ b/bin/mycroft-pip
32@@ -21,4 +21,4 @@ DIR="$( dirname "$SOURCE" )"
33 source "$DIR/../venv-activate.sh" -q
34
35 # Install pip packages within the Mycroft venv
36-pip $@
37\ No newline at end of file
38+pip3 $@
39\ No newline at end of file
40diff --git a/bin/mycroft-say-to b/bin/mycroft-say-to
41index 4ae597f3062..8bb4039996d 100755
42--- a/bin/mycroft-say-to
43+++ b/bin/mycroft-say-to
44@@ -26,4 +26,4 @@ set -- "${1:-$(</dev/stdin)}" "${@:2}"
45
46 # Send a message to be spoken
47 data="$@"
48-output=$(python -m mycroft.messagebus.send "recognizer_loop:utterance"  "{\"utterances\": [\"$data\"], \"lang\": \"en-us\"}")
49+output=$(python3 -m mycroft.messagebus.send "recognizer_loop:utterance"  "{\"utterances\": [\"$data\"], \"lang\": \"en-us\"}")
50diff --git a/bin/mycroft-skill-testrunner b/bin/mycroft-skill-testrunner
51index 9699a4d138f..282f5ca65b0 100755
52--- a/bin/mycroft-skill-testrunner
53+++ b/bin/mycroft-skill-testrunner
54@@ -22,7 +22,7 @@ source "$DIR/../venv-activate.sh" -q
55
56 # Invoke the individual skill tester
57 if [ "$#" -eq 0 ] ; then
58-    python -m test.integrationtests.skills.runner .
59+    python3 -m test.integrationtests.skills.runner .
60 else
61-    python -m test.integrationtests.skills.runner $@
62+    python3 -m test.integrationtests.skills.runner $@
63 fi
64\ No newline at end of file
65diff --git a/bin/mycroft-speak b/bin/mycroft-speak
66index d80f0e75b13..9448ea3400f 100755
67--- a/bin/mycroft-speak
68+++ b/bin/mycroft-speak
69@@ -24,4 +24,4 @@ source "$DIR/../venv-activate.sh" -q
70
71 # Send a message to be spoken
72 data="$@"
73-output=$(python -m mycroft.messagebus.send "speak"  "{\"utterance\": \"$data\"}")
74+output=$(python3 -m mycroft.messagebus.send "speak"  "{\"utterance\": \"$data\"}")
75diff --git a/dev_setup.sh b/dev_setup.sh
76index be4a19de0c3..2d9e17ddfd6 100755
77--- a/dev_setup.sh
78+++ b/dev_setup.sh
79@@ -48,7 +48,7 @@ param=''
80
81 for var in "$@" ; do
82     # Check if parameter should be read
83-    if [[ $param == 'python' ]] ; then
84+    if [[ $param == 'python3' ]] ; then
85         opt_python=$var
86         param=""
87         continue
88@@ -75,7 +75,7 @@ for var in "$@" ; do
89         opt_skipmimicbuild=true
90     fi
91     if [[ $var == '-p' || $var == '--python' ]] ; then
92-        param='python'
93+        param='python3'
94     fi
95 done
96
97@@ -349,7 +349,7 @@ else
98     fi
99 fi
100
101-PYTHON=$(python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))")
102+PYTHON=$(python3 -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))")
103
104 SYSMEM=$(free | awk '/^Mem:/ { print $2 }')
105 MAXCORES=$(($SYSMEM / 512000))
106diff --git a/scripts/install-pocketsphinx.sh b/scripts/install-pocketsphinx.sh
107index 44d329b7985..d45f5c22747 100755
108--- a/scripts/install-pocketsphinx.sh
109+++ b/scripts/install-pocketsphinx.sh
110@@ -47,7 +47,7 @@ function install_pocketsphinx() {
111
112     # build and install pocketsphinx python bindings
113     cd ${TOP}/pocketsphinx-python
114-    python setup.py install
115+    python3 setup.py install
116 }
117
118 if [ "$1" = "-q" ] ; then
119--
1202.23.0
121
122