mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
333ffc4bcf
Credit: mars for making the shell POSIX compliant This embeds a blacklist of every mach command that needs to run with Python 2 directly in the mach driver itself. Initially this is every mach command. We then use a bit of shell to determine whether the command being run needs Python 2 or 3. While this approach may seem a bit hacky, it has several benefits: 1. No need to add complex machinery in mach's registration code. 2. No need to spawn two separate Python interpreters in the event a different Python from the original interpreter is needed. 3. Perf impact is negligible. 4. New commands are Python 3 by default. It is also only a temporary hack. Once all commands are running with Python 3, we can revert back to the original mach driver. Differential Revision: https://phabricator.services.mozilla.com/D36103 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
docs | ||
mach | ||
bash-completion.sh | ||
README.rst | ||
setup.py |
==== mach ==== Mach (German for *do*) is a generic command dispatcher for the command line. To use mach, you install the mach core (a Python package), create an executable *driver* script (named whatever you want), and write mach commands. When the *driver* is executed, mach dispatches to the requested command handler automatically. To learn more, read the docs in ``docs/``.