diff options
9 files changed, 272 insertions, 228 deletions
diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0001-Remove-python-venv.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0001-Remove-python-venv.patch index c03bccd3da..43994e0cac 100644 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0001-Remove-python-venv.patch +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0001-Remove-python-venv.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6272f36080bd440a5825b526f4c06223c5bb9fbb Mon Sep 17 00:00:00 2001 | 1 | From 07fce2101d83b5334de78e661ba0361c2874ebdf Mon Sep 17 00:00:00 2001 |
2 | From: Alistair Francis <alistair.francis@wdc.com> | 2 | From: Alistair Francis <alistair.francis@wdc.com> |
3 | Date: Mon, 18 Mar 2019 16:30:45 -0700 | 3 | Date: Mon, 18 Mar 2019 16:30:45 -0700 |
4 | Subject: [PATCH 1/5] Remove python venv | 4 | Subject: [PATCH 1/5] Remove python venv |
@@ -9,75 +9,77 @@ python and pip pacakges. | |||
9 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | 9 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> |
10 | Upstream-Status: Inappropriate [embedded specific] | 10 | Upstream-Status: Inappropriate [embedded specific] |
11 | --- | 11 | --- |
12 | dev_setup.sh | 36 ------------------------------------ | 12 | dev_setup.sh | 39 --------------------------------------- |
13 | start-mycroft.sh | 13 ------------- | 13 | start-mycroft.sh | 13 ------------- |
14 | venv-activate.sh | 44 +------------------------------------------- | 14 | venv-activate.sh | 44 +------------------------------------------- |
15 | 3 files changed, 1 insertion(+), 92 deletions(-) | 15 | 3 files changed, 1 insertion(+), 95 deletions(-) |
16 | 16 | ||
17 | diff --git a/dev_setup.sh b/dev_setup.sh | 17 | diff --git a/dev_setup.sh b/dev_setup.sh |
18 | index e0b07bf25cf..aed54b2167a 100755 | 18 | index cf81ed25f0f..99a44bfd8a7 100755 |
19 | --- a/dev_setup.sh | 19 | --- a/dev_setup.sh |
20 | +++ b/dev_setup.sh | 20 | +++ b/dev_setup.sh |
21 | @@ -310,18 +310,6 @@ function install_deps() { | 21 | @@ -338,18 +338,6 @@ ${YELLOW}Make sure to manually install:$BLUE git python3 python-setuptools pytho |
22 | fi | 22 | fi |
23 | } | 23 | } |
24 | 24 | ||
25 | -VIRTUALENV_ROOT=${VIRTUALENV_ROOT:-"${TOP}/.venv"} | 25 | -VIRTUALENV_ROOT=${VIRTUALENV_ROOT:-"${TOP}/.venv"} |
26 | - | 26 | - |
27 | -function install_venv() { | 27 | -function install_venv() { |
28 | - ${opt_python} -m venv "${VIRTUALENV_ROOT}/" --without-pip | 28 | - $opt_python -m venv "${VIRTUALENV_ROOT}/" --without-pip |
29 | - # Force version of pip for reproducability, but there is nothing special | 29 | - # Force version of pip for reproducability, but there is nothing special |
30 | - # about this version. Update whenever a new version is released and | 30 | - # about this version. Update whenever a new version is released and |
31 | - # verified functional. | 31 | - # verified functional. |
32 | - curl https://bootstrap.pypa.io/3.3/get-pip.py | "${VIRTUALENV_ROOT}/bin/python" - 'pip==18.0.0' | 32 | - curl https://bootstrap.pypa.io/3.3/get-pip.py | "${VIRTUALENV_ROOT}/bin/python" - 'pip==18.0.0' |
33 | - # Function status depending on if pip exists | 33 | - # Function status depending on if pip exists |
34 | - [ -x "${VIRTUALENV_ROOT}/bin/pip" ] | 34 | - [[ -x ${VIRTUALENV_ROOT}/bin/pip ]] |
35 | -} | 35 | -} |
36 | - | 36 | - |
37 | install_deps | 37 | install_deps |
38 | 38 | ||
39 | # Configure to use the standard commit template for | 39 | # Configure to use the standard commit template for |
40 | @@ -355,15 +343,7 @@ else | 40 | @@ -383,17 +371,6 @@ else |
41 | fi | 41 | fi |
42 | fi | 42 | fi |
43 | 43 | ||
44 | -if [ ! -x "${VIRTUALENV_ROOT}/bin/activate" ] ; then | 44 | -if [[ ! -x ${VIRTUALENV_ROOT}/bin/activate ]] ; then |
45 | - if ! install_venv ; then | 45 | - if ! install_venv ; then |
46 | - echo "Failed to set up virtualenv for mycroft, exiting setup." | 46 | - echo 'Failed to set up virtualenv for mycroft, exiting setup.' |
47 | - exit 1 | 47 | - exit 1 |
48 | - fi | 48 | - fi |
49 | -fi | 49 | -fi |
50 | - | 50 | - |
51 | # Start the virtual environment | 51 | -# Start the virtual environment |
52 | -source "${VIRTUALENV_ROOT}/bin/activate" | 52 | -source "${VIRTUALENV_ROOT}/bin/activate" |
53 | cd "${TOP}" | 53 | -cd "$TOP" |
54 | 54 | - | |
55 | # Install pep8 pre-commit hook | 55 | # Install pep8 pre-commit hook |
56 | @@ -380,22 +360,6 @@ fi | 56 | HOOK_FILE='./.git/hooks/pre-commit' |
57 | if [[ -n $INSTALL_PRECOMMIT_HOOK ]] || grep -q 'MYCROFT DEV SETUP' $HOOK_FILE; then | ||
58 | @@ -408,22 +385,6 @@ fi | ||
57 | 59 | ||
58 | PYTHON=$( python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))" ) | 60 | PYTHON=$(python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))") |
59 | 61 | ||
60 | -# Add mycroft-core to the virtualenv path | 62 | -# Add mycroft-core to the virtualenv path |
61 | -# (This is equivalent to typing 'add2virtualenv $TOP', except | 63 | -# (This is equivalent to typing 'add2virtualenv $TOP', except |
62 | -# you can't invoke that shell function from inside a script) | 64 | -# you can't invoke that shell function from inside a script) |
63 | -VENV_PATH_FILE="${VIRTUALENV_ROOT}/lib/$PYTHON/site-packages/_virtualenv_path_extensions.pth" | 65 | -VENV_PATH_FILE="${VIRTUALENV_ROOT}/lib/$PYTHON/site-packages/_virtualenv_path_extensions.pth" |
64 | -if [ ! -f "$VENV_PATH_FILE" ] ; then | 66 | -if [[ ! -f $VENV_PATH_FILE ]] ; then |
65 | - echo "import sys; sys.__plen = len(sys.path)" > "$VENV_PATH_FILE" || return 1 | 67 | - echo 'import sys; sys.__plen = len(sys.path)' > "$VENV_PATH_FILE" || return 1 |
66 | - echo "import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)" >> "$VENV_PATH_FILE" || return 1 | 68 | - echo "import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)" >> "$VENV_PATH_FILE" || return 1 |
67 | -fi | 69 | -fi |
68 | - | 70 | - |
69 | -if ! grep -q "$TOP" $VENV_PATH_FILE ; then | 71 | -if ! grep -q "$TOP" $VENV_PATH_FILE ; then |
70 | - echo "Adding mycroft-core to virtualenv path" | 72 | - echo 'Adding mycroft-core to virtualenv path' |
71 | - sed -i.tmp '1 a\ | 73 | - sed -i.tmp '1 a\ |
72 | -'"$TOP"' | 74 | -'"$TOP"' |
73 | -' "${VENV_PATH_FILE}" | 75 | -' "$VENV_PATH_FILE" |
74 | -fi | 76 | -fi |
75 | - | 77 | - |
76 | # install required python modules | 78 | # install required python modules |
77 | if ! pip install -r requirements.txt ; then | 79 | if ! pip install -r requirements.txt ; then |
78 | echo "Warning: Failed to install all requirements. Continue? y/N" | 80 | echo 'Warning: Failed to install all requirements. Continue? y/N' |
79 | diff --git a/start-mycroft.sh b/start-mycroft.sh | 81 | diff --git a/start-mycroft.sh b/start-mycroft.sh |
80 | index b9514a61ba5..64e0216a62f 100755 | 82 | index 0f88430982e..3aed2f189d4 100755 |
81 | --- a/start-mycroft.sh | 83 | --- a/start-mycroft.sh |
82 | +++ b/start-mycroft.sh | 84 | +++ b/start-mycroft.sh |
83 | @@ -20,7 +20,6 @@ script=${0} | 85 | @@ -20,7 +20,6 @@ script=${0} |
@@ -130,7 +132,7 @@ index b9514a61ba5..64e0216a62f 100755 | |||
130 | "sdkdoc") | 132 | "sdkdoc") |
131 | - source-venv | 133 | - source-venv |
132 | cd doc | 134 | cd doc |
133 | make ${opt} | 135 | make ${_params} |
134 | cd .. | 136 | cd .. |
135 | diff --git a/venv-activate.sh b/venv-activate.sh | 137 | diff --git a/venv-activate.sh b/venv-activate.sh |
136 | index d1e7bcb44e7..10b46d4de3b 100644 | 138 | index d1e7bcb44e7..10b46d4de3b 100644 |
@@ -188,5 +190,5 @@ index d1e7bcb44e7..10b46d4de3b 100644 | |||
188 | 190 | ||
189 | main $@ | 191 | main $@ |
190 | -- | 192 | -- |
191 | 2.21.0 | 193 | 2.23.0 |
192 | 194 | ||
diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0002-dev_setup.sh-Remove-the-git-dependency.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0002-dev_setup.sh-Remove-the-git-dependency.patch new file mode 100644 index 0000000000..dd2431fdf9 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0002-dev_setup.sh-Remove-the-git-dependency.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 88696037af52d6a7f57bc0fb82598de1a25365cc Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Fri, 29 Mar 2019 16:09:57 -0700 | ||
4 | Subject: [PATCH 2/5] dev_setup.sh: Remove the git dependency | ||
5 | |||
6 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | --- | ||
9 | dev_setup.sh | 16 ---------------- | ||
10 | 1 file changed, 16 deletions(-) | ||
11 | |||
12 | diff --git a/dev_setup.sh b/dev_setup.sh | ||
13 | index 99a44bfd8a7..672b27080c2 100755 | ||
14 | --- a/dev_setup.sh | ||
15 | +++ b/dev_setup.sh | ||
16 | @@ -340,10 +340,6 @@ ${YELLOW}Make sure to manually install:$BLUE git python3 python-setuptools pytho | ||
17 | |||
18 | install_deps | ||
19 | |||
20 | -# Configure to use the standard commit template for | ||
21 | -# this repo only. | ||
22 | -git config commit.template .gitmessage | ||
23 | - | ||
24 | # Check whether to build mimic (it takes a really long time!) | ||
25 | build_mimic='n' | ||
26 | if [[ $opt_forcemimicbuild == true ]] ; then | ||
27 | @@ -371,18 +367,6 @@ else | ||
28 | fi | ||
29 | fi | ||
30 | |||
31 | -# Install pep8 pre-commit hook | ||
32 | -HOOK_FILE='./.git/hooks/pre-commit' | ||
33 | -if [[ -n $INSTALL_PRECOMMIT_HOOK ]] || grep -q 'MYCROFT DEV SETUP' $HOOK_FILE; then | ||
34 | - if [[ ! -f $HOOK_FILE ]] || grep -q 'MYCROFT DEV SETUP' $HOOK_FILE; then | ||
35 | - echo 'Installing PEP8 check as precommit-hook' | ||
36 | - echo "#! $(which python)" > $HOOK_FILE | ||
37 | - echo '# MYCROFT DEV SETUP' >> $HOOK_FILE | ||
38 | - cat ./scripts/pre-commit >> $HOOK_FILE | ||
39 | - chmod +x $HOOK_FILE | ||
40 | - fi | ||
41 | -fi | ||
42 | - | ||
43 | PYTHON=$(python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))") | ||
44 | |||
45 | # install required python modules | ||
46 | -- | ||
47 | 2.23.0 | ||
48 | |||
diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0002-pip-requirements-Remove-ones-installed-by-OE.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0002-pip-requirements-Remove-ones-installed-by-OE.patch deleted file mode 100644 index ca79d00b42..0000000000 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0002-pip-requirements-Remove-ones-installed-by-OE.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | From 142bc3912ea9e1a4ecf4db0e2bec3049aa416464 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Tue, 19 Mar 2019 13:32:54 -0700 | ||
4 | Subject: [PATCH 2/5] pip requirements: Remove ones installed by OE | ||
5 | |||
6 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | --- | ||
9 | requirements.txt | 14 -------------- | ||
10 | test-requirements.txt | 1 - | ||
11 | 2 files changed, 15 deletions(-) | ||
12 | |||
13 | diff --git a/requirements.txt b/requirements.txt | ||
14 | index 7e4faf48182..29536e990ac 100644 | ||
15 | --- a/requirements.txt | ||
16 | +++ b/requirements.txt | ||
17 | @@ -1,20 +1,10 @@ | ||
18 | -six==1.10.0 | ||
19 | -requests==2.20.0 | ||
20 | gTTS==2.0.3 | ||
21 | gTTS-token==1.1.3 | ||
22 | -PyAudio==0.2.11 | ||
23 | pyee==5.0.0 | ||
24 | SpeechRecognition==3.8.1 | ||
25 | -tornado==4.5.3 | ||
26 | websocket-client==0.54.0 | ||
27 | requests-futures==0.9.5 | ||
28 | -pyalsaaudio==0.8.2 | ||
29 | xmlrunner==1.7.7 | ||
30 | -pyserial==3.0 | ||
31 | -psutil==5.2.1 | ||
32 | -pocketsphinx==0.1.0 | ||
33 | -inflection==0.3.1 | ||
34 | -pillow==4.1.1 | ||
35 | python-dateutil==2.6.0 | ||
36 | pychromecast==0.7.7 | ||
37 | python-vlc==1.1.2 | ||
38 | @@ -26,10 +16,6 @@ msm==0.7.3 | ||
39 | msk==0.3.12 | ||
40 | adapt-parser==0.3.2 | ||
41 | padatious==0.4.6 | ||
42 | -fann2==1.0.7 | ||
43 | padaos==0.1.9 | ||
44 | precise-runner==0.2.1 | ||
45 | petact==0.1.2 | ||
46 | - | ||
47 | -# dev setup tools | ||
48 | -pep8==1.7.0 | ||
49 | diff --git a/test-requirements.txt b/test-requirements.txt | ||
50 | index 8ada8157c95..eb4e364a9b4 100644 | ||
51 | --- a/test-requirements.txt | ||
52 | +++ b/test-requirements.txt | ||
53 | @@ -1,6 +1,5 @@ | ||
54 | pep8==1.7.0 | ||
55 | coveralls==1.5.0 | ||
56 | -pytest==3.5.0 | ||
57 | pytest-cov==2.5.1 | ||
58 | cov-core==1.15.0 | ||
59 | mock==2.0.0 | ||
60 | -- | ||
61 | 2.21.0 | ||
62 | |||
diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0003-dev_setup.sh-Remove-the-TERM-dependency.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0003-dev_setup.sh-Remove-the-TERM-dependency.patch new file mode 100644 index 0000000000..a4290d1cda --- /dev/null +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0003-dev_setup.sh-Remove-the-TERM-dependency.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 5ef52cdea278a1dff966a912549cb6708f2cb699 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Tue, 17 Sep 2019 11:31:47 -0700 | ||
4 | Subject: [PATCH 3/5] dev_setup.sh: Remove the TERM dependency | ||
5 | |||
6 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
7 | --- | ||
8 | dev_setup.sh | 12 ------------ | ||
9 | 1 file changed, 12 deletions(-) | ||
10 | |||
11 | diff --git a/dev_setup.sh b/dev_setup.sh | ||
12 | index 672b27080c2..72f734f36bf 100755 | ||
13 | --- a/dev_setup.sh | ||
14 | +++ b/dev_setup.sh | ||
15 | @@ -115,18 +115,6 @@ function get_YN() { | ||
16 | done | ||
17 | } | ||
18 | |||
19 | -# If tput is available and can handle multiple colors | ||
20 | -if found_exe tput ; then | ||
21 | - if [[ $(tput colors) != "-1" ]]; then | ||
22 | - GREEN=$(tput setaf 2) | ||
23 | - BLUE=$(tput setaf 4) | ||
24 | - CYAN=$(tput setaf 6) | ||
25 | - YELLOW=$(tput setaf 3) | ||
26 | - RESET=$(tput sgr0) | ||
27 | - HIGHLIGHT=$YELLOW | ||
28 | - fi | ||
29 | -fi | ||
30 | - | ||
31 | # Run a setup wizard the very first time that guides the user through some decisions | ||
32 | if [[ ! -f .dev_opts.json && -z $CI ]] ; then | ||
33 | echo " | ||
34 | -- | ||
35 | 2.23.0 | ||
36 | |||
diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0004-dev_setup.sh-Remove-the-git-dependency.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0004-dev_setup.sh-Remove-the-git-dependency.patch deleted file mode 100644 index b7ca16013f..0000000000 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0004-dev_setup.sh-Remove-the-git-dependency.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From a480dde949f820fda6e46c13261883e851f5a430 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Fri, 29 Mar 2019 16:09:57 -0700 | ||
4 | Subject: [PATCH 4/5] dev_setup.sh: Remove the git dependency | ||
5 | |||
6 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | --- | ||
9 | dev_setup.sh | 16 ---------------- | ||
10 | 1 file changed, 16 deletions(-) | ||
11 | |||
12 | diff --git a/dev_setup.sh b/dev_setup.sh | ||
13 | index dd391181f19..c6aa783e1ef 100755 | ||
14 | --- a/dev_setup.sh | ||
15 | +++ b/dev_setup.sh | ||
16 | @@ -312,10 +312,6 @@ function install_deps() { | ||
17 | |||
18 | install_deps | ||
19 | |||
20 | -# Configure to use the standard commit template for | ||
21 | -# this repo only. | ||
22 | -git config commit.template .gitmessage | ||
23 | - | ||
24 | # Check whether to build mimic (it takes a really long time!) | ||
25 | build_mimic="n" | ||
26 | if [[ ${opt_forcemimicbuild} == true ]] ; then | ||
27 | @@ -346,18 +342,6 @@ fi | ||
28 | # Start the virtual environment | ||
29 | cd "${TOP}" | ||
30 | |||
31 | -# Install pep8 pre-commit hook | ||
32 | -if [ -z ${INSTALL_PRECOMMIT_HOOK} ] ; then | ||
33 | - HOOK_FILE="./.git/hooks/pre-commit" | ||
34 | - if [ ! -f ${HOOK_FILE} ] || grep -q "MYCROFT DEV SETUP" ${HOOK_FILE} ; then | ||
35 | - echo "Installing PEP8 check as precommit-hook" | ||
36 | - echo "#! $( which python3 )" > ${HOOK_FILE} | ||
37 | - echo "# MYCROFT DEV SETUP" >> ${HOOK_FILE} | ||
38 | - cat ./scripts/pre-commit >> ${HOOK_FILE} | ||
39 | - chmod +x ${HOOK_FILE} | ||
40 | - fi | ||
41 | -fi | ||
42 | - | ||
43 | PYTHON=$( python3 -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))" ) | ||
44 | |||
45 | # install required python modules | ||
46 | -- | ||
47 | 2.21.0 | ||
48 | |||
diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0004-pip-requirements-Don-t-install-requirements-with-pip.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0004-pip-requirements-Don-t-install-requirements-with-pip.patch new file mode 100644 index 0000000000..3063e7f8d7 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0004-pip-requirements-Don-t-install-requirements-with-pip.patch | |||
@@ -0,0 +1,103 @@ | |||
1 | From ac749f2512e8d121e8a64a8d5e6f226f16735dda Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Tue, 19 Mar 2019 13:32:54 -0700 | ||
4 | Subject: [PATCH 4/5] pip requirements: Don't install requirements with pip | ||
5 | |||
6 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | --- | ||
9 | dev_setup.sh | 15 +-------------- | ||
10 | requirements.txt | 36 ------------------------------------ | ||
11 | test-requirements.txt | 7 ------- | ||
12 | 3 files changed, 1 insertion(+), 57 deletions(-) | ||
13 | delete mode 100644 requirements.txt | ||
14 | delete mode 100644 test-requirements.txt | ||
15 | |||
16 | diff --git a/dev_setup.sh b/dev_setup.sh | ||
17 | index 72f734f36bf..b5ca6851631 100755 | ||
18 | --- a/dev_setup.sh | ||
19 | +++ b/dev_setup.sh | ||
20 | @@ -357,19 +357,6 @@ fi | ||
21 | |||
22 | PYTHON=$(python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))") | ||
23 | |||
24 | -# install required python modules | ||
25 | -if ! pip install -r requirements.txt ; then | ||
26 | - echo 'Warning: Failed to install all requirements. Continue? y/N' | ||
27 | - read -n1 continue | ||
28 | - if [[ $continue != 'y' ]] ; then | ||
29 | - exit 1 | ||
30 | - fi | ||
31 | -fi | ||
32 | - | ||
33 | -if ! pip install -r test-requirements.txt ; then | ||
34 | - echo "Warning test requirements wasn't installed, Note: normal operation should still work fine..." | ||
35 | -fi | ||
36 | - | ||
37 | SYSMEM=$(free | awk '/^Mem:/ { print $2 }') | ||
38 | MAXCORES=$(($SYSMEM / 512000)) | ||
39 | MINCORES=1 | ||
40 | @@ -426,4 +413,4 @@ if [[ ! -w /var/log/mycroft/ ]] ; then | ||
41 | fi | ||
42 | |||
43 | #Store a fingerprint of setup | ||
44 | -md5sum requirements.txt test-requirements.txt dev_setup.sh > .installed | ||
45 | +md5sum dev_setup.sh > .installed | ||
46 | diff --git a/requirements.txt b/requirements.txt | ||
47 | deleted file mode 100644 | ||
48 | index 0140d5465dc..00000000000 | ||
49 | --- a/requirements.txt | ||
50 | +++ /dev/null | ||
51 | @@ -1,36 +0,0 @@ | ||
52 | -six==1.10.0 | ||
53 | -cryptography==2.6.1 | ||
54 | -requests==2.20.0 | ||
55 | -gTTS==2.0.3 | ||
56 | -gTTS-token==1.1.3 | ||
57 | -PyAudio==0.2.11 | ||
58 | -pyee==5.0.0 | ||
59 | -SpeechRecognition==3.8.1 | ||
60 | -tornado==4.5.3 | ||
61 | -websocket-client==0.54.0 | ||
62 | -requests-futures==0.9.5 | ||
63 | -pyalsaaudio==0.8.2 | ||
64 | -xmlrunner==1.7.7 | ||
65 | -pyserial==3.0 | ||
66 | -psutil==5.2.1 | ||
67 | -pocketsphinx==0.1.0 | ||
68 | -inflection==0.3.1 | ||
69 | -pillow==4.1.1 | ||
70 | -python-dateutil==2.6.0 | ||
71 | -pychromecast==3.2.2 | ||
72 | -python-vlc==1.1.2 | ||
73 | -google-api-python-client==1.6.4 | ||
74 | -fasteners==0.14.1 | ||
75 | -PyYAML==3.13 | ||
76 | - | ||
77 | -msm==0.8.3 | ||
78 | -msk==0.3.13 | ||
79 | -adapt-parser==0.3.3 | ||
80 | -padatious==0.4.6 | ||
81 | -fann2==1.0.7 | ||
82 | -padaos==0.1.9 | ||
83 | -precise-runner==0.2.1 | ||
84 | -petact==0.1.2 | ||
85 | - | ||
86 | -# dev setup tools | ||
87 | -pep8==1.7.0 | ||
88 | diff --git a/test-requirements.txt b/test-requirements.txt | ||
89 | deleted file mode 100644 | ||
90 | index fd129e3f66d..00000000000 | ||
91 | --- a/test-requirements.txt | ||
92 | +++ /dev/null | ||
93 | @@ -1,7 +0,0 @@ | ||
94 | -pycodestyle===2.5.0 | ||
95 | -coveralls==1.5.0 | ||
96 | -pytest==3.5.0 | ||
97 | -pytest-cov==2.5.1 | ||
98 | -cov-core==1.15.0 | ||
99 | -sphinx==1.8.2 | ||
100 | -sphinx-rtd-theme==0.4.2 | ||
101 | -- | ||
102 | 2.23.0 | ||
103 | |||
diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0003-Use-python3-and-pip3-instead-of-python-and-pip.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0005-Use-python3-and-pip3-instead-of-python-and-pip.patch index a1f04b4b47..189b686c9c 100644 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0003-Use-python3-and-pip3-instead-of-python-and-pip.patch +++ b/meta-multimedia/recipes-multimedia/mycroft/files/0005-Use-python3-and-pip3-instead-of-python-and-pip.patch | |||
@@ -1,19 +1,19 @@ | |||
1 | From 87b94e54fefa1f83b41030444fc87b421c97b2c5 Mon Sep 17 00:00:00 2001 | 1 | From 9a0bd09706da3949db17ea7272d6647a487bb6ad Mon Sep 17 00:00:00 2001 |
2 | From: Alistair Francis <alistair.francis@wdc.com> | 2 | From: Alistair Francis <alistair.francis@wdc.com> |
3 | Date: Tue, 19 Mar 2019 13:38:44 -0700 | 3 | Date: Tue, 19 Mar 2019 13:38:44 -0700 |
4 | Subject: [PATCH 3/5] Use python3 and pip3 instead of python and pip | 4 | Subject: [PATCH 5/5] Use python3 and pip3 instead of python and pip |
5 | 5 | ||
6 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | 6 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> |
7 | Upstream-Status: Inappropriate [embedded specific] | 7 | Upstream-Status: Inappropriate [embedded specific] |
8 | --- | 8 | --- |
9 | bin/mycroft-cli-client | 2 +- | 9 | bin/mycroft-cli-client | 2 +- |
10 | bin/mycroft-pip | 2 +- | 10 | bin/mycroft-pip | 2 +- |
11 | bin/mycroft-say-to | 2 +- | 11 | bin/mycroft-say-to | 2 +- |
12 | bin/mycroft-skill-testrunner | 4 ++-- | 12 | bin/mycroft-skill-testrunner | 4 ++-- |
13 | bin/mycroft-speak | 2 +- | 13 | bin/mycroft-speak | 2 +- |
14 | dev_setup.sh | 10 +++++----- | 14 | dev_setup.sh | 6 +++--- |
15 | scripts/install-pocketsphinx.sh | 2 +- | 15 | scripts/install-pocketsphinx.sh | 2 +- |
16 | 7 files changed, 12 insertions(+), 12 deletions(-) | 16 | 7 files changed, 10 insertions(+), 10 deletions(-) |
17 | 17 | ||
18 | diff --git a/bin/mycroft-cli-client b/bin/mycroft-cli-client | 18 | diff --git a/bin/mycroft-cli-client b/bin/mycroft-cli-client |
19 | index f40a316e3f6..de2040d9e67 100755 | 19 | index f40a316e3f6..de2040d9e67 100755 |
@@ -38,15 +38,15 @@ index a42b16b847a..81bd5bfb3cf 100755 | |||
38 | +pip3 $@ | 38 | +pip3 $@ |
39 | \ No newline at end of file | 39 | \ No newline at end of file |
40 | diff --git a/bin/mycroft-say-to b/bin/mycroft-say-to | 40 | diff --git a/bin/mycroft-say-to b/bin/mycroft-say-to |
41 | index 964e16eb0c5..5575969715c 100755 | 41 | index 4ae597f3062..8bb4039996d 100755 |
42 | --- a/bin/mycroft-say-to | 42 | --- a/bin/mycroft-say-to |
43 | +++ b/bin/mycroft-say-to | 43 | +++ b/bin/mycroft-say-to |
44 | @@ -22,4 +22,4 @@ DIR="$( pwd )" | 44 | @@ -26,4 +26,4 @@ set -- "${1:-$(</dev/stdin)}" "${@:2}" |
45 | source "$DIR/../venv-activate.sh" -q | ||
46 | 45 | ||
47 | # Send a message to be spoken | 46 | # Send a message to be spoken |
48 | -output=$(python -m mycroft.messagebus.send "recognizer_loop:utterance" "{\"utterances\": [\"$@\"], \"lang\": \"en-us\"}") | 47 | data="$@" |
49 | +output=$(python3 -m mycroft.messagebus.send "recognizer_loop:utterance" "{\"utterances\": [\"$@\"], \"lang\": \"en-us\"}") | 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\"}") | ||
50 | diff --git a/bin/mycroft-skill-testrunner b/bin/mycroft-skill-testrunner | 50 | diff --git a/bin/mycroft-skill-testrunner b/bin/mycroft-skill-testrunner |
51 | index 9699a4d138f..282f5ca65b0 100755 | 51 | index 9699a4d138f..282f5ca65b0 100755 |
52 | --- a/bin/mycroft-skill-testrunner | 52 | --- a/bin/mycroft-skill-testrunner |
@@ -63,60 +63,46 @@ index 9699a4d138f..282f5ca65b0 100755 | |||
63 | fi | 63 | fi |
64 | \ No newline at end of file | 64 | \ No newline at end of file |
65 | diff --git a/bin/mycroft-speak b/bin/mycroft-speak | 65 | diff --git a/bin/mycroft-speak b/bin/mycroft-speak |
66 | index 51facf29189..c65556f1173 100755 | 66 | index d80f0e75b13..9448ea3400f 100755 |
67 | --- a/bin/mycroft-speak | 67 | --- a/bin/mycroft-speak |
68 | +++ b/bin/mycroft-speak | 68 | +++ b/bin/mycroft-speak |
69 | @@ -22,4 +22,4 @@ DIR="$( pwd )" | 69 | @@ -24,4 +24,4 @@ source "$DIR/../venv-activate.sh" -q |
70 | source "$DIR/../venv-activate.sh" -q | ||
71 | 70 | ||
72 | # Send a message to be spoken | 71 | # Send a message to be spoken |
73 | -output=$(python -m mycroft.messagebus.send "speak" "{\"utterance\": \"$@\"}") | 72 | data="$@" |
74 | \ No newline at end of file | 73 | -output=$(python -m mycroft.messagebus.send "speak" "{\"utterance\": \"$data\"}") |
75 | +output=$(python3 -m mycroft.messagebus.send "speak" "{\"utterance\": \"$@\"}") | 74 | +output=$(python3 -m mycroft.messagebus.send "speak" "{\"utterance\": \"$data\"}") |
76 | \ No newline at end of file | ||
77 | diff --git a/dev_setup.sh b/dev_setup.sh | 75 | diff --git a/dev_setup.sh b/dev_setup.sh |
78 | index aed54b2167a..dd391181f19 100755 | 76 | index b5ca6851631..fcd0834669f 100755 |
79 | --- a/dev_setup.sh | 77 | --- a/dev_setup.sh |
80 | +++ b/dev_setup.sh | 78 | +++ b/dev_setup.sh |
81 | @@ -48,7 +48,7 @@ param="" | 79 | @@ -48,7 +48,7 @@ param='' |
82 | 80 | ||
83 | for var in "$@" ; do | 81 | for var in "$@" ; do |
84 | # Check if parameter should be read | 82 | # Check if parameter should be read |
85 | - if [[ ${param} == "python" ]] ; then | 83 | - if [[ $param == 'python' ]] ; then |
86 | + if [[ ${param} == "python3" ]] ; then | 84 | + if [[ $param == 'python3' ]] ; then |
87 | opt_python=${var} | 85 | opt_python=$var |
88 | param="" | 86 | param="" |
89 | continue | 87 | continue |
90 | @@ -351,17 +351,17 @@ if [ -z ${INSTALL_PRECOMMIT_HOOK} ] ; then | 88 | @@ -75,7 +75,7 @@ for var in "$@" ; do |
91 | HOOK_FILE="./.git/hooks/pre-commit" | 89 | opt_skipmimicbuild=true |
92 | if [ ! -f ${HOOK_FILE} ] || grep -q "MYCROFT DEV SETUP" ${HOOK_FILE} ; then | ||
93 | echo "Installing PEP8 check as precommit-hook" | ||
94 | - echo "#! $( which python )" > ${HOOK_FILE} | ||
95 | + echo "#! $( which python3 )" > ${HOOK_FILE} | ||
96 | echo "# MYCROFT DEV SETUP" >> ${HOOK_FILE} | ||
97 | cat ./scripts/pre-commit >> ${HOOK_FILE} | ||
98 | chmod +x ${HOOK_FILE} | ||
99 | fi | 90 | fi |
100 | fi | 91 | if [[ $var == '-p' || $var == '--python' ]] ; then |
101 | 92 | - param='python' | |
102 | -PYTHON=$( python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))" ) | 93 | + param='python3' |
103 | +PYTHON=$( python3 -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))" ) | 94 | fi |
95 | done | ||
104 | 96 | ||
105 | # install required python modules | 97 | @@ -355,7 +355,7 @@ else |
106 | -if ! pip install -r requirements.txt ; then | ||
107 | +if ! pip3 install -r requirements.txt ; then | ||
108 | echo "Warning: Failed to install all requirements. Continue? y/N" | ||
109 | read -n1 continue | ||
110 | if [[ "$continue" != "y" ]] ; then | ||
111 | @@ -369,7 +369,7 @@ if ! pip install -r requirements.txt ; then | ||
112 | fi | 98 | fi |
113 | fi | 99 | fi |
114 | 100 | ||
115 | -if ! pip install -r test-requirements.txt ; then | 101 | -PYTHON=$(python -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))") |
116 | +if ! pip3 install -r test-requirements.txt ; then | 102 | +PYTHON=$(python3 -c "import sys;print('python{}.{}'.format(sys.version_info[0], sys.version_info[1]))") |
117 | echo "Warning test requirements wasn't installed, Note: normal operation should still work fine..." | ||
118 | fi | ||
119 | 103 | ||
104 | SYSMEM=$(free | awk '/^Mem:/ { print $2 }') | ||
105 | MAXCORES=$(($SYSMEM / 512000)) | ||
120 | diff --git a/scripts/install-pocketsphinx.sh b/scripts/install-pocketsphinx.sh | 106 | diff --git a/scripts/install-pocketsphinx.sh b/scripts/install-pocketsphinx.sh |
121 | index 44d329b7985..d45f5c22747 100755 | 107 | index 44d329b7985..d45f5c22747 100755 |
122 | --- a/scripts/install-pocketsphinx.sh | 108 | --- a/scripts/install-pocketsphinx.sh |
@@ -131,5 +117,5 @@ index 44d329b7985..d45f5c22747 100755 | |||
131 | 117 | ||
132 | if [ "$1" = "-q" ] ; then | 118 | if [ "$1" = "-q" ] ; then |
133 | -- | 119 | -- |
134 | 2.21.0 | 120 | 2.23.0 |
135 | 121 | ||
diff --git a/meta-multimedia/recipes-multimedia/mycroft/files/0005-dev_setup.sh-Remove-the-test-setup-dependency.patch b/meta-multimedia/recipes-multimedia/mycroft/files/0005-dev_setup.sh-Remove-the-test-setup-dependency.patch deleted file mode 100644 index 5ae8683764..0000000000 --- a/meta-multimedia/recipes-multimedia/mycroft/files/0005-dev_setup.sh-Remove-the-test-setup-dependency.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 7fc38ae0dec30789fa0d365f1764f4950b700a98 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Tue, 2 Apr 2019 16:52:44 -0700 | ||
4 | Subject: [PATCH 5/5] dev_setup.sh: Remove the test setup dependency | ||
5 | |||
6 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | |||
9 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
10 | --- | ||
11 | dev_setup.sh | 4 ---- | ||
12 | 1 file changed, 4 deletions(-) | ||
13 | |||
14 | diff --git a/dev_setup.sh b/dev_setup.sh | ||
15 | index c6aa783e1ef..bcfaa0c16c2 100755 | ||
16 | --- a/dev_setup.sh | ||
17 | +++ b/dev_setup.sh | ||
18 | @@ -353,10 +353,6 @@ if ! pip3 install -r requirements.txt ; then | ||
19 | fi | ||
20 | fi | ||
21 | |||
22 | -if ! pip3 install -r test-requirements.txt ; then | ||
23 | - echo "Warning test requirements wasn't installed, Note: normal operation should still work fine..." | ||
24 | -fi | ||
25 | - | ||
26 | SYSMEM=$( free | awk '/^Mem:/ { print $2 }' ) | ||
27 | MAXCORES=$(($SYSMEM / 512000)) | ||
28 | MINCORES=1 | ||
29 | -- | ||
30 | 2.21.0 | ||
31 | |||
diff --git a/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.2.3.bb b/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb index b03a90083c..54c06f5b6b 100644 --- a/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.2.3.bb +++ b/meta-multimedia/recipes-multimedia/mycroft/mycroft_19.8.1.bb | |||
@@ -6,13 +6,13 @@ SECTION = "multimedia" | |||
6 | LICENSE = "Apache-2.0" | 6 | LICENSE = "Apache-2.0" |
7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=79aa497b11564d1d419ee889e7b498f6" | 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=79aa497b11564d1d419ee889e7b498f6" |
8 | 8 | ||
9 | SRCREV = "4b45db34ecd95b62ef2b66a8e5180c66ca791a21" | 9 | SRCREV = "913f29d3d550637934f9abf43a097eb2c30d76fc" |
10 | SRC_URI = "git://github.com/MycroftAI/mycroft-core.git;branch=master \ | 10 | SRC_URI = "git://github.com/MycroftAI/mycroft-core.git;branch=master \ |
11 | file://0001-Remove-python-venv.patch \ | 11 | file://0001-Remove-python-venv.patch \ |
12 | file://0002-pip-requirements-Remove-ones-installed-by-OE.patch \ | 12 | file://0002-dev_setup.sh-Remove-the-git-dependency.patch \ |
13 | file://0003-Use-python3-and-pip3-instead-of-python-and-pip.patch \ | 13 | file://0003-dev_setup.sh-Remove-the-TERM-dependency.patch \ |
14 | file://0004-dev_setup.sh-Remove-the-git-dependency.patch \ | 14 | file://0004-pip-requirements-Don-t-install-requirements-with-pip.patch \ |
15 | file://0005-dev_setup.sh-Remove-the-test-setup-dependency.patch \ | 15 | file://0005-Use-python3-and-pip3-instead-of-python-and-pip.patch \ |
16 | file://dev_opts.json \ | 16 | file://dev_opts.json \ |
17 | file://mycroft-setup.service \ | 17 | file://mycroft-setup.service \ |
18 | file://mycroft.service \ | 18 | file://mycroft.service \ |
@@ -49,20 +49,30 @@ FILES_${PN} += "${libdir}/mycroft" | |||
49 | 49 | ||
50 | RDEPENDS_${PN} = "python3" | 50 | RDEPENDS_${PN} = "python3" |
51 | 51 | ||
52 | # Install as many Python packages as we can. | 52 | RDEPENDS_${PN} += "python3-requests python3-pillow \ |
53 | # We don't yet have all the packages in meta-python. | ||
54 | # Install as many as we can and we will install the rest on the target with pip. | ||
55 | # TODO: Add all the remaining packages and remove pip | ||
56 | RDEPENDS_${PN} += "python3-pip \ | ||
57 | python3-requests python3-pillow \ | ||
58 | python3-tornado python3-pyyaml \ | 53 | python3-tornado python3-pyyaml \ |
59 | python3-pyalsaaudio python3-inflection \ | 54 | python3-pyalsaaudio python3-inflection \ |
60 | python3-pyserial python3-psutil \ | 55 | python3-pyserial python3-psutil \ |
61 | python3-pyaudio python3-fann2 \ | 56 | python3-pyaudio python3-fann2 \ |
62 | python3-pocketsphinx \ | 57 | python3-pocketsphinx \ |
63 | python3-xxhash \ | 58 | python3-xxhash python3-pako \ |
59 | python3-six python3-cryptography \ | ||
60 | python3-requests-futures \ | ||
61 | python3-xmlrunner python3-fasteners \ | ||
62 | python3-python-vlc \ | ||
63 | python3-padatious python3-padaos \ | ||
64 | python3-petact python3-precise-runner \ | ||
65 | python3-pulsectl python3-pychromecast \ | ||
66 | python3-msm python3-msk \ | ||
67 | python3-websocket-client \ | ||
68 | python3-google-api-python-client \ | ||
64 | " | 69 | " |
65 | 70 | ||
71 | # These packages need to be installed on the target | ||
72 | # python3-speechrecognition python3-pyee==5.0.0 python3-six==1.10.0 | ||
73 | # python3-websocket-client==0.54.0 python3-gtts python3-gtts-token | ||
74 | # python3-python-dateutil python3-adapt-parser python3-lazy | ||
75 | |||
66 | # Mycroft uses Alsa, PulseAudio and Flac | 76 | # Mycroft uses Alsa, PulseAudio and Flac |
67 | RDEPENDS_${PN} += "alsa-utils alsa-plugins alsa-tools" | 77 | RDEPENDS_${PN} += "alsa-utils alsa-plugins alsa-tools" |
68 | RDEPENDS_${PN} += "pulseaudio pulseaudio-misc pulseaudio-server" | 78 | RDEPENDS_${PN} += "pulseaudio pulseaudio-misc pulseaudio-server" |