New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sphinx is not py3k compatible #63447
Comments
I'm running Arch. I just checked out python's hg and tried to build the docs, and found that I couldn't: $ cd cpython/doc
$ make update
[lots of output stripped]
$ make pydoc-topics
mkdir -p build/pydoc-topics build/doctrees
python tools/sphinx-build.py -b pydoc-topics -d build/doctrees -D latex_paper_size= . build/pydoc-topics
Traceback (most recent call last):
File "tools/sphinx-build.py", line 27, in <module>
from sphinx import main
File "/home/kousu/pro/cpython/Doc/tools/sphinx/__init__.py", line 44
except ImportError, err:
^
SyntaxError: invalid syntax
make: *** [build] Error 1 I edited the Makefile to say PYTHON = python2 [kousu@galleon Doc]$ pacman -Qi python |
This is a duplicate of bpo-10224. |
I see that in Doc/tools/sphinx-build.py there is this check: if sys.version_info[:3] < (2, 4, 0):
sys.stderr.write("""\
Error: Sphinx needs to be executed with Python 2.4 or newer (not 3.0 though).
(If you run this from the Makefile, you can set the PYTHON variable
to the path of an alternative interpreter executable, e.g.,
``make html PYTHON=python2.5``).
""") But I never saw this and had to debug it myself. I submit the attached patch as a solution. |
Looks ok for now. |
New changeset 6e65ee2a0073 by Georg Brandl in branch '3.3': |
You can manually install Sphinx >=1.1 (preferably >=1.2.*) (and its dependencies) using Python 3, and directly call |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: