gecko-dev/python
Mike Hommey 8afaba2056 Bug 1575760 - Make mach vendor rust create a .cargo/config and check it in the tree. r=nalexander
Maybe back when .cargo/config.in was added, the directory indicated for
vendored crates needed to be absolute. That is at least not the case
with the current supported versions of rust.

The current setup has a few caveats:
- .cargo/config.in has shown to become stale (it currently contains
  multiple unused entries)
- non-gecko build tasks have to generate a .cargo/config on their own if
  they want to use vendored crates
- in turn, non-gecko build tasks that don't, may unknowingly get their
  dependencies from crates.io (see the recent attempt at moving
  geckodriver builds to a separate task).

By checking in a .cargo/config file, we can alleviate the last two, but
that comes at the price of `cargo update` not wanting to act when
.cargo/config exists, because of the source replacement configuration.

But rust vendor gently generates a suitable configuration on its own, so
we can use that to generate a .cargo/config automatically. Which
addresses the first caveat of the current setup. That leaves us with
`cargo update` not working out of the box, but that just requires people
running it to manually remove .cargo/config first. Which is arguably
what rust wants you to do in the first place. It's kind of incidental
that we started with a .cargo/config.in rather than .cargo/config.

Now, while a simple .cargo/config works, that's not enough for the case
where the objdir doesn't live inside the source directory. In that case
cargo looks for the configuration from the objdir, and fails to find it.
So we still need a .cargo/config.in, which we generate with a little
trick.

Differential Revision: https://phabricator.services.mozilla.com/D43012

--HG--
rename : .cargo/config.in => .cargo/config
extra : moz-landing-system : lando
2019-08-26 22:20:32 +00:00
..
devtools/migrate-l10n Bug 1559975 - fix python2 linter errors for python/devtools r=ahal 2019-07-16 17:46:08 +00:00
docs
gdbpp/gdbpp Bug 1564314 - Make linters happy with the gdbpp code. r=nalexander 2019-07-11 18:19:44 +00:00
l10n Bug 1321281, add test framework for Fluent migration recipes, r=flod,ahal 2019-08-08 11:54:30 +00:00
mach Bug 1473498 - Fix Python 3 environment variables with subprocess r=glandium 2019-07-30 21:35:53 +00:00
mozboot Bug 1575249 - Ride along: remove +x permissions on source files r=Ehsan 2019-08-21 09:57:03 +00:00
mozbuild Bug 1575760 - Make mach vendor rust create a .cargo/config and check it in the tree. r=nalexander 2019-08-26 22:20:32 +00:00
mozlint Bug 1512487 - Part 2: Add "global" lint type. r=ahal 2019-08-02 20:34:09 +00:00
mozrelease
mozterm
mozversioncontrol Bug 1561632 - Back out bug 1554987. r=ahal 2019-06-28 15:58:36 +00:00
safety
mach_commands.py Bug 1557278 - Avoid implicit conversion to Unicode when rewriting log lines. r=ahal 2019-06-06 16:46:40 +00:00
moz.build Bug 1575375 - Always include mozbuild/mozpack tests. r=nalexander 2019-08-21 03:05:09 +00: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