git submodule init
git submodule update
mkdir build
mkdir -p build/tensoradapter/pytorch

if [[ "$OSTYPE" = "darwin"* ]]; then
	echo Copying prebuilt CPU binary...
	cp /tmp/libdgl.dylib build
	cp /tmp/tensoradapter_pytorch_cpu/*.dylib build/tensoradapter/pytorch
else
	if [[ $USE_CUDA = 'ON' ]]; then
		echo Copying prebuilt CUDA $CUDA_VER binary...
		cp /tmp/dgl_binaries/libdgl.so.cu$CUDA_VER build/libdgl.so
	else
		echo Copying prebuilt CPU binary...
		cp /tmp/dgl_binaries/libdgl.so.cpu build/libdgl.so
	fi
fi
cd python
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
