Commit Graph

1 Commits (main)

Author SHA1 Message Date
Tim Swast 35a2bf9d90
python: publish sphinx docs to read the docs
Background:

This is a follow-up to the PR that adds sphinx docs.

Read the Docs is a hosting platform for documentation, primarily Python
docs. It supports builds at commit time as well as at specific git
labels to support versioned docs. I have claimed the
protobuf.readthedocs.io project and can add any Googlers who need access
to be able to configure and trigger builds.
https://readthedocs.org/projects/protobuf/builds/ It's also relatively
easy to create a new project to test the documentation builds from a
fork, such as https://readthedocs.org/projects/tswast-protobuf/builds/

About this change:

Once web hooks are configured, Read the Docs will automatically build
the docs for the latest changes on the master branch.

I needed to update `python/setup.py` to support installation from the
root of the repository because Read the Docs does not `cd python` before
installing the protobuf package with `setup.py install`. To support
this, I updated the file paths to use the absolute path to files. The
`__file__` special variable comes in handy for this, as it provides the
path to the `setup.py` file.

A banner is added to the docs when published to readthedocs. This links
to the official documentation and the future home of the stable API
reference on googleapis.dev.
2020-02-28 13:36:50 -06:00