message: add python and os information in environment capture script
diff: @@ -33,15 +33,61 @@ python_bin_path=$(which python || which python3 || die "Cannot find Python binar
  {
  echo
  - echo "== cat /etc/issue ==============================================="
  - uname -a
  - uname=`uname -s`
  - if [ "$(uname)" == "Darwin" ]; then
  - echo Mac OS X `sw_vers -productVersion`
  - elif [ "$(uname)" == "Linux" ]; then
  - cat /etc/*release | grep VERSION
  - fi
  +echo '== check python ==================================================='
  +} >> ${OUTPUT_FILE}
  +
  +cat <<EOF > /tmp/check_python.py
  +import platform
  +
  +print("""python version: %s
  +python branch: %s
  +python build version: %s
  +python compiler version: %s
  +python implementation: %s
  +""" % (
  +platform.python_version(),
  +platform.python_branch(),
  +platform.python_build(),
  +platform.python_compiler(),
  +platform.python_implementation(),
  +))
  +EOF
  +${python_bin_path} /tmp/check_python.py 2>&1 >> ${OUTPUT_FILE}
  +{
  +echo
  +echo '== check os platform ==============================================='
  +} >> ${OUTPUT_FILE}
  +
  +cat <<EOF > /tmp/check_os.py
  +import platform
  +
  +print("""os: %s
  +os kernel version: %s
  +os release version: %s
  +os platform: %s
  +linux distribution: %s
  +linux os distribution: %s
  +mac version: %s
  +uname: %s
  +architecture: %s
  +machine: %s
  +""" % (
  +platform.system(),
  +platform.version(),
  +platform.release(),
  +platform.platform(),
  +platform.linux_distribution(),
  +platform.dist(),
  +platform.mac_ver(),
  +platform.uname(),
  +platform.architecture(),
  +platform.machine(),
  +))
  +EOF
  +${python_bin_path} /tmp/check_os.py 2>&1 >> ${OUTPUT_FILE}
  +
  +{
  echo
  echo '== are we in docker ============================================='
  num=`cat /proc/1/cgroup | grep docker | wc -l`;
  @@ -55,10 +101,6 @@ python_bin_path=$(which python || which python3 || die "Cannot find Python binar
  echo '== compiler ====================================================='
  c++ --version 2>&1
  - echo
  - echo '== uname -a ====================================================='
  - uname -a
  -
  echo
  echo '== check pips ==================================================='
  pip list 2>&1 | grep "proto\|numpy\|tensorflow"
  