Browse Source

!254 invoke bash scripts without capturing output on compiling

Merge pull request !254 from liangyongxiong/fix-build
tags/v0.5.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
a01709e742
3 changed files with 8 additions and 14 deletions
  1. +4
    -0
      build/scripts/crc32.sh
  2. +1
    -2
      build/scripts/ui.sh
  3. +3
    -12
      setup.py

+ 4
- 0
build/scripts/crc32.sh View File

@@ -65,6 +65,10 @@ build_crc32() {
rm -f "$CRC32_OUTPUT_DIR/$CRC32_SO_FILE"

read -ra PYBIND11_INCLUDES <<<"$($PYTHON -m pybind11 --includes)"
if [ ! -n "${PYBIND11_INCLUDES[0]}" ]; then
echo "pybind11 is required"
exit 1
fi

c++ -O2 -O3 -shared -std=c++11 -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 \
-Wno-maybe-uninitialized -Wno-unused-parameter -Wall -Wl,-z,relro,-z,now,-z,noexecstack \


+ 1
- 2
build/scripts/ui.sh View File

@@ -25,6 +25,7 @@ build_ui() {
fi

rm -f package-lock.json
rm -rf node_modules
rm -rf dist
mkdir -p public/static/js
cp ../../third_party/hpcc/graphvizlib.wasm public/static/js
@@ -40,8 +41,6 @@ build_ui() {
echo "dist does not have file index.html, build failed"
exit 1
fi

rm -rf node_modules
}

build_ui

+ 3
- 12
setup.py View File

@@ -99,20 +99,11 @@ def run_script(script):
cmd = '/bin/bash {}'.format(script)
process = subprocess.Popen(
shlex.split(cmd),
shell=False,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT
shell=False
)

while True:
line = process.stdout.readline()
if not line and process.poll() is not None:
break
if line:
sys.stdout.write(line.decode())

if process.returncode:
rc = process.wait()
if rc:
sys.exit(1)




Loading…
Cancel
Save