diff --git a/tools/pylib/_boutcore_build/.gitignore b/tools/pylib/_boutcore_build/.gitignore
index 87395877d0c5f3c95b8460772c9ad7c6536bf0cc..089f20eebd59f7f51a1320ace8d2245d1fce1e32 100644
--- a/tools/pylib/_boutcore_build/.gitignore
+++ b/tools/pylib/_boutcore_build/.gitignore
@@ -4,6 +4,7 @@ helper.h
 resolve_enum.pxd
 boutcpp.pxd
 setup.py
+setup.cfg
 boutcore.cpp
 \#*#
 .#*
diff --git a/tools/pylib/_boutcore_build/Makefile b/tools/pylib/_boutcore_build/Makefile
index f4aca9d519c80422647bc5b45541fdfe0f8a7376..b3bd8c04b5904cc23832a72689e4a9de3f9741bb 100644
--- a/tools/pylib/_boutcore_build/Makefile
+++ b/tools/pylib/_boutcore_build/Makefile
@@ -9,7 +9,7 @@ helper.cxx:helper.cxx.in
 boutcpp.pxd:boutcpp.pxd.in
 
 TOGEN=setup.py boutcore.pyx resolve_enum.pxd helper.cxx helper.h boutcpp.pxd setup.cfg
-$(TOGEN): Makefile $(BOUT_TOP)/make.config $(BOUT_TOP)/bin/bout-config common.sh
+$(TOGEN): Makefile $(BOUT_TOP)/make.config $(BOUT_TOP)/bin/bout-config common.sh helper.py $(TOGEN:%=%.in)
 	@echo "  Generating $@"
 	@PATH=$(BOUT_TOP)/bin:$$PATH PY=$(PY) bash $@.in > $@.tmp \
 		|| (fail=$$?; echo "touch $@ to ignore failed generation" ; exit $$fail)
diff --git a/tools/pylib/_boutcore_build/build-wheels.sh b/tools/pylib/_boutcore_build/build-wheels.sh
index 88052293aa478ce666df1155092d0a5a85275086..cf990715457aed2d90c43651c2bd358f5cc7a39e 100644
--- a/tools/pylib/_boutcore_build/build-wheels.sh
+++ b/tools/pylib/_boutcore_build/build-wheels.sh
@@ -35,5 +35,11 @@ done
 
 for PYBIN in /opt/python/*/bin/; do
     "${PYBIN}/pip" install $NAME --no-index -f /io/wheelhouse
-    (cd "$HOME"; "${PYBIN}/nosetests" $NAME)
+    if test -e "${PYBIN}/nosetests"
+    then
+	(
+	    cd "$HOME"
+	    "${PYBIN}/nosetests" $NAME
+	)
+    fi
 done
diff --git a/tools/pylib/_boutcore_build/setup.cfg.in b/tools/pylib/_boutcore_build/setup.cfg.in
index 2240c2a65797656fdfd54361baadbca32f99441a..465b468f7e3048958efada367d304adff3e65ee0 100644
--- a/tools/pylib/_boutcore_build/setup.cfg.in
+++ b/tools/pylib/_boutcore_build/setup.cfg.in
@@ -1,5 +1,5 @@
 version=$(git tag -l --points-at HEAD)
-if ! $version ; then
+if ! test $version ; then
     version=$(PYTHONPATH=.. $PY -c "import boutconfig ; print(boutconfig.config['version'])").dev$(git log --oneline |wc -l)
 fi
 cat <<EOF