4 SCRIPT_DIR
=$
(cd $
(dirname "$0") && pwd -P)
5 WPT_ROOT
=$SCRIPT_DIR/..
12 VENV
=tools
/_virtualenv
15 # Create the virtualenv
16 if [ ! -d $VENV ]; then
17 if [ -z $PYTHON ]; then
20 if [ `python -c 'import sys; print(sys.version[0:3])'` == "2.7" ]; then
26 if [ -z $PYTHON ]; then
33 if [ -z $PYTHON ]; then
34 echo "Please ensure Python 2.7 is installed"
38 # The maximum Unicode code point is U+10FFFF = 1114111
39 if [ `$PYTHON -c 'import sys; print(sys.maxunicode)'` != "1114111" ]; then
40 echo "UCS-4 support for Python is required"
44 virtualenv
-p $PYTHON $VENV ||
{ echo "Please ensure virtualenv is installed"; exit 2; }
47 # Install dependencies
48 $VENV/bin
/pip
install -r requirements.txt
50 # Run the build script
51 $VENV/bin
/python tools
/build.py
"$@"