Import xattr with sudo early on

xattr fails to import due to being unable to build cffi bindings unless
it is imported as root beforehand.

Depends-On: I6a9d64277974933ae9b7bbe2a40b8a0eb0fa8c6a

Change-Id: I835e55bbafc7e0640987e6f3c8ee0c873f875ee0
Closes-Bug: #1451992
diff --git a/stack.sh b/stack.sh
index e5ee0dc..3925bb0 100755
--- a/stack.sh
+++ b/stack.sh
@@ -708,6 +708,12 @@
 # Pre-build some problematic wheels
 if [[ -n ${WHEELHOUSE:-} && ! -d ${WHEELHOUSE:-} ]]; then
     source $TOP_DIR/tools/build_wheels.sh
+
+    # Due to https://bugs.launchpad.net/swift/+bug/1451992 we have to import
+    # this package with root once so the CFFI bindings can be built. We have
+    # to therefore install it so we can import it.
+    pip_install xattr
+    sudo python -c "import xattr"
 fi