You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
assignee=Noneclosed_at=<Date2013-10-13.20:19:42.317>created_at=<Date2013-10-13.19:09:31.192>labels= ['docs']
title='sphinx is not py3k compatible'updated_at=<Date2013-10-13.20:42:23.748>user='https://github.com/kousu'
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 44exceptImportError, err:
^SyntaxError: invalid syntaxmake: *** [build] Error 1
I edited the Makefile to say PYTHON = python2
and then it worked. Is the assumption that python2 is still supposed to be the default python everywhere? Is python 3 not able to build itself yet?
[kousu@galleon Doc]$ pacman -Qi python
Name : python
Version : 3.3.2-2
Description : Next generation of the python high-level scripting language
Architecture : x86_64
URL : http://www.python.org/
Licenses : custom
Groups : None
Provides : python3
Depends On : expat bzip2 gdbm openssl libffi zlib
Optional Deps : tk: for tkinter [installed]
sqlite [installed]
Required By : cython ipython ktoblzcheck libreoffice-common python-cairo python-dateutil python-dbus python-markupsafe
python-numpy python-pyparsing python-pytz python-pyzmq python-setuptools python-sip python-six python-sympy
python-tornado python-xdg ranger youtube-dl
Optional For : systemd
Conflicts With : None
Replaces : python3
Installed Size : 86980.00 KiB
Packager : Bart
Build Date : Fri Sep 6 03:31:57 2013
Install Date : Tue Sep 17 10:29:36 2013
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
ifsys.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 variableto 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.
Is the assumption that python2 is still supposed to be the default python everywhere?
Is python 3 not able to build itself yet?
You can manually install Sphinx >=1.1 (preferably >=1.2.*) (and its dependencies) using Python 3, and directly call sphinx-build from so installed Sphinx, instead of using make.
Activity
kousu commentedon Oct 13, 2013
I'm running Arch. I just checked out python's hg and tried to build the docs, and found that I couldn't:
I edited the Makefile to say PYTHON = python2
and then it worked. Is the assumption that python2 is still supposed to be the default python everywhere? Is python 3 not able to build itself yet?
[kousu@galleon Doc]$ pacman -Qi python
Name : python
Version : 3.3.2-2
Description : Next generation of the python high-level scripting language
Architecture : x86_64
URL : http://www.python.org/
Licenses : custom
Groups : None
Provides : python3
Depends On : expat bzip2 gdbm openssl libffi zlib
Optional Deps : tk: for tkinter [installed]
sqlite [installed]
Required By : cython ipython ktoblzcheck libreoffice-common python-cairo python-dateutil python-dbus python-markupsafe
python-numpy python-pyparsing python-pytz python-pyzmq python-setuptools python-sip python-six python-sympy
python-tornado python-xdg ranger youtube-dl
Optional For : systemd
Conflicts With : None
Replaces : python3
Installed Size : 86980.00 KiB
Packager : Bart
Build Date : Fri Sep 6 03:31:57 2013
Install Date : Tue Sep 17 10:29:36 2013
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
ezio-melotti commentedon Oct 13, 2013
This is a duplicate of bpo-10224.
kousu commentedon Oct 13, 2013
I see that in Doc/tools/sphinx-build.py there is this check:
But I never saw this and had to debug it myself. I submit the attached patch as a solution.
birkenfeld commentedon Oct 13, 2013
Looks ok for now.
python-dev commentedon Oct 13, 2013
New changeset 6e65ee2a0073 by Georg Brandl in branch '3.3':
Closes bpo-19248: actually check for Python 3.x in tools/sphinx-build.py.
http://hg.python.org/cpython/rev/6e65ee2a0073
Arfrever commentedon Oct 13, 2013
You can manually install Sphinx >=1.1 (preferably >=1.2.*) (and its dependencies) using Python 3, and directly call
sphinx-buildfrom so installed Sphinx, instead of usingmake.