gecko-dev/python
Gregory Szorc 80d6e033a7 Bug 1385381 - Detect and expose Python 3 to the build system; r=chmanchester
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
2017-07-27 21:19:25 -07: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 1387307 - Add FailedCommandError to mach r=gps 2017-08-08 12:10:10 -07:00
mozboot Backed out changeset 514cf1f55c6f (bug 1380639) 2017-08-07 13:23:35 +02:00
mozbuild Bug 1385381 - Detect and expose Python 3 to the build system; r=chmanchester 2017-07-27 21:19:25 -07:00
mozlint Bug 1387555 - [mozlint] Make use of quickfix when using --edit with vim/nvim, r=dylan 2017-08-09 10:03:02 -04:00
mozversioncontrol/mozversioncontrol Bug 1377216 - Use configure-derived VCS info to find repository; r=glandium 2017-07-18 15:46:47 -07:00
mach_commands.py Bug 1048446 - [python-test] Add 'sequential' key to python.ini manifests so tests can opt out of running in parallel, r=jmaher 2017-06-01 09:50:15 -04:00
moz.build Bug 1346025 - Move vendored python modules from /python to /third_party/python, r=ted 2017-05-25 11:48:03 -04: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