Skip to content
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

Failure building 2.7 docs on Windows #66727

Closed
terryjreedy opened this issue Oct 2, 2014 · 5 comments
Closed

Failure building 2.7 docs on Windows #66727

terryjreedy opened this issue Oct 2, 2014 · 5 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 22537
Nosy @birkenfeld, @terryjreedy, @ned-deily, @ezio-melotti

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 = None
closed_at = <Date 2014-10-02.06:27:25.637>
created_at = <Date 2014-10-02.03:09:34.843>
labels = ['type-bug', 'docs']
title = 'Failure building 2.7 docs on Windows'
updated_at = <Date 2014-10-02.16:24:54.207>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2014-10-02.16:24:54.207>
actor = 'terry.reedy'
assignee = 'docs@python'
closed = True
closed_date = <Date 2014-10-02.06:27:25.637>
closer = 'python-dev'
components = ['Documentation', 'Devguide']
creation = <Date 2014-10-02.03:09:34.843>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 22537
keywords = []
message_count = 5.0
messages = ['228152', '228154', '228160', '228161', '228237']
nosy_count = 6.0
nosy_names = ['georg.brandl', 'terry.reedy', 'ned.deily', 'ezio.melotti', 'docs@python', 'python-dev']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue22537'
versions = ['Python 2.7']

@terryjreedy
Copy link
Member Author

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
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.

@terryjreedy terryjreedy added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Oct 2, 2014
@ned-deily
Copy link
Member

Your analysis is correct: you now do need to use a 2.7 sphinx to build 2.7 docs. It looks like you may be using a 3.4 version of pip. However you invoke python2.7, try "python -m pip install sphinx".

@birkenfeld
Copy link
Member

you now do need

You always did :)

However, it should not be a problem to make the extensions 2.x and 3.x compatible in both branches.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Oct 2, 2014

New changeset fd2530294d50 by Georg Brandl in branch '2.7':
Closes bpo-22537: Make sphinx extensions compatible with Python 2 or 3, like in the 3.x branches
https://hg.python.org/cpython/rev/fd2530294d50

@python-dev python-dev mannequin closed this as completed Oct 2, 2014
@terryjreedy
Copy link
Member Author

Works great. Thanks.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants