gecko-dev/python
Chris Manchester 08507804bf Bug 1336429 - Add the ability to build GN projects in the tree with mozbuild. r=gps
This commit adds a frontend construct, `GN_DIRS`, to facilitate building
gn projects with moz.build. Directories added to `GN_DIRS` get particular
treatment by two build backends added here as well, `GnConfigGen` and
`GnMozbuildWriter`.

The `GnConfigGen` backend runs `gn gen` for a gn project specified in
`GN_DIRS` and dumps this configuration as json, which is filtered to include
only those elements that will be needed by mozbuild. `gn gen` is run in
the context of a single build's configuration, so when adding or updating
a gn project it will be necessary to run this step with each supported
configuration.

The `GnMozbuildWriter` aggregates the config files generated by the
`GnConfigGen` backend, which it expects to find in the `gn-configs` directory
under the directory specified to `GN_DIRS`. The result is written to a set of
moz.build files suitable for building the project that are intended to be
checked in to the tree.

Once these moz.build files are checked in to the tree the project can be built
as any other directory: when using a general purpose build backend such as
RecursiveMake or FasterMake to build, entries in `GN_DIRS` will be treated as a
normal entries in `DIRS`.


MozReview-Commit-ID: KlHuP4DY2R4

--HG--
extra : rebase_source : b16079b3417bee3e58b0ecc8724b54c1b9d87d98
2017-12-07 15:58:18 -08:00
..
devtools/migrate-l10n Bug 1346025 - Move vendored python modules from /python to /third_party/python, r=ted 2017-05-25 11:48:03 -04:00
mach Bug 1415614 - Add an API to log all structured messages; r=mshal 2017-11-09 15:09:52 -08:00
mozboot Bug 1424439 - mozboot: Update to rust 1.22.0. r=nalexander 2017-12-08 16:42:28 -08:00
mozbuild Bug 1336429 - Add the ability to build GN projects in the tree with mozbuild. r=gps 2017-12-07 15:58:18 -08:00
mozlint Bug 1422302 - Create python/mozterm for sharing terminal blessings across modules r=gps 2017-12-04 09:38:24 -05:00
mozterm Bug 1422302 - Create python/mozterm for sharing terminal blessings across modules r=gps 2017-12-04 09:38:24 -05:00
mozversioncontrol Bug 1405588 - [mozversioncontrol] Use base_ref instead of upstream as default outgoing comparison on git, r=gps 2017-11-01 12:57:03 -04:00
mach_commands.py Bug 1414399 - [mozbuild/moztest] Move mozbuild.testing.TestResolver to moztest.resolve r=gps 2017-11-06 08:41:42 -05:00
moz.build Bug 1422302 - Create python/mozterm for sharing terminal blessings across modules r=gps 2017-12-04 09:38:24 -05:00
README Bug 1346025 - Move vendored python modules from /python to /third_party/python, r=ted 2017-05-25 11:48:03 -04:00

This directory contains common Python code.

The basic rule is that if Python code is cross-module (that's "module" in the
Mozilla meaning - as in "module ownership") and is MPL-compatible, it should
go here.

What should not go here:

* Vendored python modules (use third_party/python instead)
* Python that is not MPL-compatible (see other-licenses/)
* Python that has good reason to remain close to its "owning" (Mozilla)
  module (e.g. it is only being consumed from there).

Historical information can be found at
https://bugzilla.mozilla.org/show_bug.cgi?id=775243
https://bugzilla.mozilla.org/show_bug.cgi?id=1346025