diff --git a/cobra/log.py b/cobra/log.py index cd27fb22..04c517fc 100644 --- a/cobra/log.py +++ b/cobra/log.py @@ -120,6 +120,8 @@ def emit(self, record): if not self.is_tty: if message and message[0] == "\r": message = message[1:] + if sys.version > '3': + message = message.decode() stream.write(message) else: self.output_colorized(message) diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..1394f28d --- /dev/null +++ b/install.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +OS=`uname -s` +if [ ${OS} == "Darwin" ];then + brew install grep findutils flex phantomjs +elif [ ${OS} == "Linux" ];then + source /etc/os-release + case $ID in + debian|ubuntu|devuan) + sudo apt-get install flex bison phantomjs + ;; + centos|fedora|rhel) + yumdnf="yum" + if test "$(echo "$VERSION_ID >= 22" | bc)" -ne 0; + then + yumdnf="dnf" + fi + sudo $yumdnf install -y flex bison phantomjs + ;; + *) + exit 1 + ;; + esac +else + echo "Other OS: ${OS}" +fi + +SHELL_FOLDER=$(dirname "$0") +pip3 install -r $SHELL_FOLDER/requirements.txt \ No newline at end of file