Commit Graph

12 Commits

Author SHA1 Message Date
Andreas Tolfsen
ecf92f380d Bug 1223459: Serve documentation over HTTP in mach doc
Introduces new flag --http [ADDRESS] that spins up an HTTPD serving
`outdir'.  By default it will spin up a server on 0.0.0.0:6666.

r=ahal
2015-11-10 20:37:38 +00:00
Andrew Halberstadt
3db94658ce Bug 1220789 - Generalize |mach build-doc| for any arbitrary sphinx projects; rename to |mach doc|, r=gps
Now, running |mach doc <path/to/project>| will generate the sphinx based docs of the project and open them
in the default browser. Mulitple doc paths can be supplied at a time. E.g:
./mach doc testing/mozbase
2015-11-03 15:39:50 -05:00
Gregory Szorc
d993a444fa Bug 1176642 - Use absolute_import in mach_commands.py files; r=glandium
This removes ambiguity as to which modules are being imported, making
import slightly faster as Python doesn't need to test so many
directories for file presence.

All files should already be using absolute imports because mach command
modules aren't imported to the package they belong to: they instead
belong to the "mach" package. So relative imports shouldn't have been
used.
2015-06-21 17:39:09 -07:00
Gregory Szorc
0222a3a19c Bug 1176642 - Remove unused imports; r=glandium 2015-06-25 12:16:38 -07:00
Gregory Szorc
b4eda56fb0 Bug 1115278 - Move Sphinx documentation staging into Sphinx extension; r=glandium
Previously, code for staging the Sphinx documentation from moz.build
metadata lived in a mach command and in the moztreedocs module. This
patch moves the invocation to the Sphinx extension.

When the code is part of the Sphinx extension, it will run when executed
with sphinx-build. This is a prerequisite to getting RTD working, since
sphinx-build is the only supported entrypoint for generating
documentation there.

With this patch, we can now invoke sphinx-build to build the
documentation. The `mach build-docs` command is no longer needed.
2014-12-24 09:46:41 -08:00
Gregory Szorc
b0f977d4ef Bug 1115278 - Move Sphinx build scanning into moztreedocs; r=glandium
In order for Sphinx documentation to work with Read The Docs, we need
the code for scanning the build config for Sphinx documentation to live
in an importable module. This patch moves some code from the
|build-docs| mach command into an importable module.
2014-12-23 22:53:50 -08:00
Gregory Szorc
c531a71019 Bug 1091722 - Don't require configure before generating docs; r=glandium
Ever since Sphinx variable reading operates at the AST level (bug
1071012), we don't technically need a fully configured environment in
order to generate the documentation!

This patch stubs out the config environment object with a fake one that
provides the only needed context to generate the Sphinx docs. This
allows us to build the Sphinx docs on a fresh clone of the tree with no
configure and with no object directory.
2014-10-30 10:37:00 -07:00
Gregory Szorc
7737017be8 Bug 1091722 - Use Read The Docs theme for Sphinx; r=glandium
Read the Docs has a lovely Sphinx theme that beats the pants off the
built-in and default theme. And since it looks like MDN's Sphinx theme
is dead in the water, this gets us a nice UI win until the MDN theme
comes back from the dead.
2014-10-30 10:09:29 -07:00
Gregory Szorc
92a507f3f6 Bug 1071012 - Extract Sphinx variables via AST reading; r=glandium
The in-tree Sphinx docs have been broken since bug 1041941 because
processing moz.build files outside their context doesn't work.
Specifically, templates aren't loaded (because this information usually
comes from a parent moz.build file). A new execution mode is needed.

I tried to implement a proper execution mode. However, I kept running
into walls. While we should strive for a proper execution mode, this can
be a follow-up, tracked in bug 1058359.

This patch implements extraction of Sphinx variables from ast walking.
It is extremely low-level and definitely a one-off. But it solves the
problem at hand: |mach build-docs| will work after this patch is
applied.
2014-10-07 10:36:27 -07:00
Mike Hommey
5d1665ee5e Bug 1053140 part 3 - Separate out sandbox infrastructure from moz.build variables storage. r=gps 2014-08-15 13:52:18 +09:00
Gregory Szorc
b74f148f41 Bug 949906 - Add a callback to modify evaluated moz.build sandboxes, fix Sphinx docs; r=glandium 2013-12-13 16:06:53 +09:00
Gregory Szorc
71001b1f06 Bug 939367 - Allow Sphinx docs to come from all over the tree; r=glandium 2013-11-20 12:37:22 -08:00