This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Doc/Makefile should have $PYTHON=python2
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: berker.peksag, docs@python, eric.araujo, maker, ned.deily
Priority: normal Keywords: patch

Created on 2012-10-14 22:15 by maker, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue16236.patch maker, 2012-10-14 22:16 review
Messages (5)
msg172931 - (view) Author: Michele Orrù (maker) * Date: 2012-10-14 22:15
On Arch/Linux, running `make html` fails with

$ make html
mkdir -p build/html build/doctrees
python tools/sphinx-build.py -b html -d build/doctrees -D latex_paper_size=  . build/html 
Traceback (most recent call last):
  File "tools/sphinx-build.py", line 27, in <module>
    from sphinx import main
  File "/..../cpython/Doc/tools/sphinx/__init__.py", line 44
    except ImportError, err:
                      ^
SyntaxError: invalid syntax
make: *** [build] Error 1

That is because sphinx needs python version 2 to run; but `python` is symlinked to python3 on my platform. We should replace $PYTHON with python2, which AFAIS here[0], it would point to the correct version.

[0] http://hg.python.org/cpython/file/5fc6f47974db/Makefile.pre.in#l808
msg172941 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-10-15 02:42
The patch should not unconditionally use `python2` since many distributions do not yet install a `python2` link to the interpreter nor is there one when running python2.7 from a build directory.  The Makefile could conditionally try `python2` and then fall back to `python`.
msg173347 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-10-19 16:42
Yes, please don’t break many OSes for the sake of one.
msg173377 - (view) Author: Michele Orrù (maker) * Date: 2012-10-20 09:22
> The patch should not unconditionally use `python2` since many distributions do not yet install a `python2` link 
> to the interpreter nor is there one when running python2.7 from a build directory.  The Makefile could 
> conditionally try `python2` and then fall back to `python`.
Sorry, I did not know that some OSes could not have the `python2` symlink, I just watched if there was on the Makefile. 


> Yes, please don’t break many OSes for the sake of one.

Concerning this, we should do a proper configure script. Do you think that's worth it, E`ric?  
```
Real configure scripts are generally much more complicated than this, since they may deal with systems where $PATH is not delimited by colons; or systems where executable programs may have optional extensions like .EXE; or $PATH variables that have the current working directory included in them as an empty string; etc. 
````
-- http://mywiki.wooledge.org/BashFAQ/081
msg216332 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2014-04-15 16:39
You can now build the Python documentation with using Python 3. See msg216161 in issue 10224 for more information.
History
Date User Action Args
2022-04-11 14:57:37adminsetgithub: 60440
2014-04-15 16:39:54berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg216332

resolution: out of date
stage: resolved
2012-10-20 09:22:39makersetmessages: + msg173377
2012-10-19 16:42:10eric.araujosetnosy: + eric.araujo
messages: + msg173347
2012-10-15 02:42:38ned.deilysetnosy: + ned.deily

messages: + msg172941
versions: + Python 2.7, - Python 3.1, Python 3.5
2012-10-14 22:17:48makersetassignee: docs@python

components: + Documentation, - Interpreter Core
nosy: + docs@python
2012-10-14 22:16:06makersetfiles: + issue16236.patch
keywords: + patch
2012-10-14 22:15:17makercreate