We need to call sphinx-build indirectly so tox-current-env is able to find it and to run the proper version. --- sphinx_issues-5.0.0/tests/test_sphinx_issues.py.orig +++ sphinx_issues-5.0.0/tests/test_sphinx_issues.py @@ -312,7 +312,9 @@ """Ensure that a simulated complete sphinx run works as expected""" subprocess.run( [ - Path(sys.executable).parent.joinpath("sphinx-build"), + Path(sys.executable).parent.joinpath("python"), + "-m", + "sphinx.cmd.build", "-b", "html", "-W", # turn warnings into errors