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
mach
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
README
mach_commands.py
moz.build Bug 1422302 - Create python/mozterm for sharing terminal blessings across modules r=gps 2017-12-04 09:38:24 -05:00

README

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