[New-bugs-announce] [issue22537] Failure building 2.7 docs on Windows

Terry J. Reedy report at bugs.python.org
Thu Oct 2 05:09:34 CEST 2014

New submission from Terry J. Reedy:

I was able to build docs of all versions with the old system.  When 3.4 was changed to the new system, 'pip install sphinx' installed everything needed so that 'sphinx-build -bhtml . build/html'  in .../Doc (Devguide 7.5.2) works for 3.4 (and 3.5).  "PYTHON=C:\programs\python27\python.exe" does not seem to matter.

After the recent conversion for 2.7, that command and 'make html' (devguide 7.5.1) do not work for 2.7. The devguide instructions are version-independent, but the reality does not seem to be.  Both commands give this.

Running Sphinx v1.2.2

Configuration error:
There is a syntax error in your configuration file: invalid syntax (patchlevel.py, line 71)
Did you change the syntax from 2.x to 3.x?

tools/patchlevel.py. line 71, is "print x'.  When I added ()s, this error goes away and I get

Running Sphinx v1.2.2

Exception occurred:
  File "F:\Python\dev\2\py27\Doc\tools\pyspecific.py", line 247, in <module>
    import suspicious
  File "F:\Python\dev\2\py27\Doc\tools\suspicious.py", line 57
    detect_all = re.compile(ur'''
    ::(?=[^=])|            # two :: (but NOT ::=)
    :[a-zA-Z][a-zA-Z0-9]+| # :foo
    `|                     # ` (seldom used by itself)
    (?<!\.)\.\.[ \t]*\w+:  # .. foo: (but NOT ... else:)
    ''', re.UNICODE | re.VERBOSE).finditer

SyntaxError: invalid syntax

I expect the problem is the 'ur' prefix, invalid in 3.4+.

I tried to install a 2.7 version of sphinx, but pip refuses.

C:\Programs\Python27>pip install sphinx
Requirement already satisfied (use --upgrade to upgrade): sphinx in c:\programs\python34\lib\site-packages

So I don't know how to sensibly proceed without disabling 3.x builds.

assignee: docs at python
components: Devguide, Documentation
messages: 228152
nosy: docs at python, ezio.melotti, georg.brandl, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Failure building 2.7 docs on Windows
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list