From 9538aca9d046569ab03cd3ec13b02ae2860838a0 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Thu, 25 Feb 2021 10:53:53 +0100 Subject: [PATCH] adding xlib to dependencies, optimizing shell scripts --- pyproject.toml | 3 ++- tools/build.sh | 2 +- tools/create_env.sh | 1 - tools/create_zip.sh | 1 - tools/run_settings.sh | 1 - tools/run_tests.sh | 1 - 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c92e346fd9..da86fbf590 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,12 +39,13 @@ jinxed = [ { version = "^1.0.1", markers = "sys_platform == 'darwin'" }, { version = "^1.0.1", markers = "sys_platform == 'linux'" } ] +python3-xlib = { version="*", markers = "sys_platform == 'linux'"} [tool.poetry.dev-dependencies] flake8 = "^3.7" autopep8 = "^1.4" coverage = "*" -cx_freeze = "~6.5" +cx_freeze = "^6.5" jedi = "^0.13" Jinja2 = "^2.11" pycodestyle = "^2.5.0" diff --git a/tools/build.sh b/tools/build.sh index 43f341e6c6..d3e4769c4f 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -69,7 +69,7 @@ detect_python () { python_version="$(python3 <<< ${version_command})" oIFS="$IFS" IFS=. - set -- "$python_version" + set -- $python_version IFS="$oIFS" if [ "$1" -ge "3" ] && [ "$2" -ge "6" ] ; then if [ "$2" -gt "7" ] ; then diff --git a/tools/create_env.sh b/tools/create_env.sh index 81ee5dd68a..8d3b3b393c 100755 --- a/tools/create_env.sh +++ b/tools/create_env.sh @@ -76,7 +76,6 @@ detect_python () { else echo -e "${BIWhite}[${RST} ${BIGreen}$1.$2${RST} ${BIWhite}]${RST}" fi - PYTHON="python3" else command -v python3 >/dev/null 2>&1 || { echo -e "${BIRed}$1.$2$ - ${BIRed}FAILED${RST} ${BIYellow}Version is old and unsupported${RST}"; return 1; } fi diff --git a/tools/create_zip.sh b/tools/create_zip.sh index 633f874921..839b1c4827 100755 --- a/tools/create_zip.sh +++ b/tools/create_zip.sh @@ -75,7 +75,6 @@ detect_python () { else echo -e "${BIWhite}[${RST} ${BIGreen}$1.$2${RST} ${BIWhite}]${RST}" fi - PYTHON="python3" else command -v python3 >/dev/null 2>&1 || { echo -e "${BIRed}$1.$2$ - ${BIRed}FAILED${RST} ${BIYellow}Version is old and unsupported${RST}"; return 1; } fi diff --git a/tools/run_settings.sh b/tools/run_settings.sh index 23a98cdd91..99148456c0 100755 --- a/tools/run_settings.sh +++ b/tools/run_settings.sh @@ -75,7 +75,6 @@ detect_python () { else echo -e "${BIWhite}[${RST} ${BIGreen}$1.$2${RST} ${BIWhite}]${RST}" fi - PYTHON="python3" else command -v python3 >/dev/null 2>&1 || { echo -e "${BIRed}$1.$2$ - ${BIRed}FAILED${RST} ${BIYellow}Version is old and unsupported${RST}"; return 1; } fi diff --git a/tools/run_tests.sh b/tools/run_tests.sh index 81fa28b5f7..df001dce97 100755 --- a/tools/run_tests.sh +++ b/tools/run_tests.sh @@ -71,7 +71,6 @@ detect_python () { IFS="$oIFS" if [ "$1" -ge "3" ] && [ "$2" -ge "6" ] ; then echo -e "${BIWhite}[${RST} ${BIGreen}$1.$2${RST} ${BIWhite}]${RST}" - PYTHON="python3" else command -v python3 >/dev/null 2>&1 || { echo -e "${BIRed}FAILED${RST} ${BIYellow} Version [${RST}${BICyan}$1.$2${RST}]${BIYellow} is old and unsupported${RST}"; return 1; } fi