In order to be able to reference standard python documentation I have added to my config file the following:
import os
import sys
sys.path.insert(0, 'C:/ProgramData/Anaconda3/lib/site-packages')
sys.path.insert(0, os.path.abspath('../..'))
master_doc = 'index'
extensions = ['sphinx.ext.intersphinx']
intersphinx_mapping = {'python': ('https://docs.python.org/3.6', None)}
I have a rst file that makes reference to a python function as:
See :py:func:`io.open`.
When the documentation is built, it correctly recognizes io.open
as an external function, creates a link, and when I pass the mouse over it shows the message (in Python 3.6), so I believe it is somehow working.
However, the link that it uses is:
file:///C:/mylib/docs/build/python/library/io.html#io.open
instead of:
https://docs.python.org/3.6/library/io.html#io.open
Am I missing something extra in the config? What am I doing wrong?