diff --git a/configure.sh b/configure.sh
index c3832636cb596211e42475717ef0640eedba8326..ee7a23be0d4a7488e0397afbf95815ff2252fd03 100755
--- a/configure.sh
+++ b/configure.sh
@@ -18,6 +18,9 @@ CURPWD=$(pwd)
 cd "$(dirname "$0")"
 ROOTPATH=$(pwd)
 
+# this is needed for mock
+pip install --upgrade setuptools
+
 ./get_nwjs.sh $1
 if [ $? -ne 0 ]; then
     exit 1
diff --git a/setup.py b/setup.py
index db9c015242b75efac9c2ad0939829148af243a51..597294570d926cece1de2ed5755d27a4df99401f 100644
--- a/setup.py
+++ b/setup.py
@@ -41,6 +41,7 @@ INSTALL_REQUIRES = [
     'psutil',
     'ws4py',
     'certifi',
+    'mock',
 ]
 
 EXTRAS_REQUIRES = {