Fix build without sphinx installed
Build fixes
Merge branch 'master' into 1.7