build.sh 332 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. basedir="$(dirname "$0")"
  3. [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir"
  4. set -e
  5. if ! [ -x "$basedir/setup.py" ]; then
  6. echo "basedir sanity check failed"
  7. exit 1
  8. fi
  9. cd "$basedir"
  10. rm -rf build
  11. rm -f cms_cython
  12. export CFLAGS="$CFLAGS -O3"
  13. python3 ./setup.py build
  14. ln -s build/lib.*-3*/cms_cython .