mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
80d6e033a7
Various people want to start experimenting with Python 3 in the build system and in related tools (like mach). We want to make it easy to find and use an appropriate Python 3 binary. This commit introduces a generic function for finding a Python 3 binary and resolving its version. We use the new code in configure to set PYTHON3 and PYTHON3_VERSION subst entries for later consultation. We also expose a cached attribute on the base class used by many mach and build system types to return a Python 3 executable's info. By default, we only find Python 3.5+. From my experience, Python 3.5 was the first Python 3 where it was reasonable to write code that supports both Python 2 and 3 (mainly due to the restoration of the % operator on bytes types). We could probably support Python 3.4 in the build system. But for now I'd like to see if we can get away with 3.5+. MozReview-Commit-ID: BlwCJ3kkjY9 --HG-- extra : rebase_source : b00464972183ef1a97a0b5d888520be425717ae7 |
||
---|---|---|
.. | ||
devtools/migrate-l10n | ||
mach | ||
mozboot | ||
mozbuild | ||
mozlint | ||
mozversioncontrol/mozversioncontrol | ||
mach_commands.py | ||
moz.build | ||
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