@staticmethod def find_sphinx_build(): # Work our way down from the most explicit, to least explicit. for ver in xrange(3, -1, -1): ver_info = '.'.join(str(x) for x in sys.version_info[:ver]) for gentoo_renaming in ('', 'python'): p = subprocess.Popen( ['which', 'sphinx-build-%s%s' % (gentoo_renaming, ver_info)], stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, _ = p.communicate() if p.wait() == 0: return stdout.decode().strip() raise Exception("Couldn't find sphinx-build w/in PATH=%r" % os.environ.get('PATH')) which is 1) terribly ugly, 2) is completely broken on non-Gentoo, 3) is completely broken with python-exec:2. You should really trust the wrapper choosing the correct version. Or *at least* fallback to plain 'sphinx-build' when all your attempts fail.
This is fixed in 0.5.3.