aboutsummaryrefslogtreecommitdiffstats
path: root/python/mach_bootstrap.py
Commit message (Collapse)AuthorAgeFilesLines
* bootstrap: Add a `--skip-platform` option (#32176)Martin Robinson2024-04-291-1/+3
| | | | This allows installign `taplo` and `crown` when you are installing dependencies manually.
* mach: Don't print anything when deps are up-to-date (#31128)Martin Robinson2024-01-181-2/+0
| | | | | I added this print statement, but after using `mach` for a while with it, I think it is far too chatty. This change just removes the line. Information is only printed when dependencies are installed.
* bootstrap: Improve pip dependency resolution (#31026)Martin Robinson2024-01-151-27/+38
| | | | | | | | | | | | | We can now use the "new" pip resolver which should prevent the installation of conflicting packages. Also, take this opportunity to make bootstrap more resilient. Hash all dependencies to detect situations where a newer marker file has been installed, but for an older branch. This should ensure that dependencies are up to date even when switching back and forth between older and new branches. This also updates some dependencies to be the same as the ones used for WPT tests, which is an issue caught be the resolver. Fixes #10611.
* deps: Raise the Python requirement to 3.10 (#31088)Martin Robinson2024-01-151-3/+3
| | | This will allow us to use the pip's new dependency resolver.
* bootstrap: Adding more output when installing dependencies (#31003)Martin Robinson2024-01-051-29/+9
| | | | | | | It's often the case (especially with the taplo installation and on Windows) that bootstrap is doing lots of stuff in the background for a long amount of time. Without output it's hard to tell what exactly is going on. This change adds more output to this process as well as removing some Pythong 2.x era code.
* tidy: A few small improvements and fixes (#30941)Martin Robinson2024-01-021-2/+4
| | | | | | | | | | 1. Make the tidy output easier to follow 2. Integrate the WPT manifest cleanliness step into tidy itself and don't run it if nothing has changed in the WPT directory. 3. Fix an issue where Python test requirements were not installed, which could cause issues with some modules not being found. Fixes #30002.
* Replace virtualenv with Python's built-in venv (#30377)Corey Farwell2023-12-071-42/+34
| | | | | | | | | | | | | | | | | | * Replace virtualenv with Python's built-in venv. * Apply Delan's suggestions and make a couple small fixes - Fix a tidy warning about directories that don't exist - Use shutil instead of the redundant get_exec_path - Miscellaneous cleanups * Fix typo in environment variable * fix bug where pip still tries to the wrong site-packages --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com>
* Remove `__future__` imports that are no longer necessary (#30661)Martin Robinson2023-11-021-2/+0
| | | These are no longer necessary as we always use Python 3.
* Vendor `mozdebug` and stop using `distutils` (#30659)Martin Robinson2023-10-311-0/+1
| | | | | | The version of `mozdebug` installable via pip is two years old and Mozilla is slow to release new versions. It also uses `distutils` which doesn't work on newer Python versions. Vendor it and stop using `distutils` there.
* mach: use `importlib` module instead of `imp` (#30645)Mukilan Thiyagarajan2023-10-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mach: use `importlib` module instead of `imp` `imp` module has been deprecated since python 3.4 and has been removed in 3.12. The recommended alternative is to use the `importlib` module that was introduced in python 3.1 This is required to fix the CI failures in macos builds since GitHub runner images for macos-13 now use python 3.12 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * mach: use `importlib` module instead of `imp` `imp` module has been deprecated since python 3.4 and has been removed in 3.12. The recommended alternative is to use the `importlib` module that was introduced in python 3.1 This is required to fix the CI failures in macos builds since GitHub runner images for macos-13 now use python 3.12 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* Stop using distutils (#30638)Martin Robinson2023-10-281-2/+1
| | | | This is removed from Python 3.12 so we can no longer rely on it. All of this functionality is either in `setuptools` or `shutil`.
* Remove Gecko-specific Python bootstrap logic (#30041)Martin Robinson2023-07-281-41/+11
| | | | | | Servo is no longer completely vendored into Gecko. Instead parts of Gecko are vendored into Servo. This change removes Python mach bootstrap code that was written to accommodate the previous situation. It's no longer necessary.
* Windows bootstrap supportMartin Robinson2023-07-031-6/+1
|
* Update scripts to reflect new WPT directory nameMartin Robinson2023-06-261-8/+2
|
* Allow building on paths with Unicode charactersMartin Robinson2023-06-221-10/+0
| | | | | This now works since the upgrade to Python 3, so we can remove this code which prevents mach from running in these situations.
* Convert tidy to a non-egg Python packageMartin Robinson2023-06-151-1/+0
| | | | | | | | | | | It seems that servo-tidy is only used by webrender in my GitHub searches. WebRender could simply use `rustfmt` and the tidy on pypi hasn't been updated since 2018. Converting tidy to a normal Python package removes the maintenance burden of continually fixing the easy install configuration. Fixes #29094. Fixes #29334.
* Start organizing platform-specific Python codeMartin Robinson2023-05-191-14/+19
| | | | | | This starts to split platform-specific Python code into its own module, which should help to tidy up our mach commands and make things more reusable.
* Run WPT sync nightly on GitHub Actioncybai2022-08-161-1/+0
|
* Vendor mach-1.0.0.Josh Matthews2021-12-211-0/+1
|
* mach: cleanup after dropping Python 2 supportDavid Heidelberg2021-07-191-3/+3
| | | | Signed-off-by: David Heidelberg <david@ixit.cz>
* Fix remaining flake8 warningsKagami Sascha Rosylight2020-06-211-2/+2
|
* Write subprocess stdout/stderr logs to raw stdout buffer when using Python3marmeladema2019-12-101-2/+11
|
* Allow to run mach with Python3 (>=3.5)marmeladema2019-12-091-4/+5
|
* Generate per python version virtualenvmarmeladema2019-12-091-1/+1
|
* mach bootstrap factor out common is_firefox checkJosh Mcguigan2019-10-281-7/+7
|
* mach activate virtual env for bootstrapJosh Mcguigan2019-10-281-0/+8
|
* Replace call to execfile(...) by call to exec(compile(open(...)))marmeladema2019-10-201-1/+1
| | | | This is done in order to be compatible with Python3
* Explicitly provide module names to mach so it doesn't try to autogenerate themManish Goregaokar2019-05-061-1/+5
| | | | This works around https://bugzilla.mozilla.org/show_bug.cgi?id=1549636
* Don't assume the user's environment in mach_bootstrap.TheGoddessInari2019-04-011-12/+7
| | | | | | | | On Windows with multiple Pythons installed, this was causing python2.7 to bootstrap a 3.7 virtualenv that it couldn't make use of. PIP_NAMES wasn't used at all, and VIRTUALENV_NAMES ends up being unused now.
* Update MPL license to https (part 1)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Allow bootstrap to be run before anything else is installedManish Goregaokar2018-09-111-0/+18
|
* removed sys.platform check & consolidated the pip invocationsMatthew Young2018-06-061-16/+1
| | | | | | | | The sys.platform check in need_pip_upgrade was doing effectively the same pip invocation regardless of what platform we were evaluating to. Additionally, removed some duplicate definitions of the python variable which was already in scope higher up in the function.
* Fix for pip invocation when setting up virtual environment during buildMatthew Young2018-06-061-1/+1
|
* Upgrade pip properly on windows.Josh Matthews2018-05-151-5/+12
|
* Don't suppress errors when executing mach bootstrap processes.Josh Matthews2018-05-141-1/+1
| | | Omitting an argument to sys.exit causes it to default to 0, so buildbot doesn't report it as an error.
* Add wptserve into python import paths.Xidorn Quan2018-03-071-5/+16
|
* Enable pip output in mach_bootstrap.pySimon Wörner2017-11-241-2/+2
|
* Redirect stdout and stderr to file to avoid deadlockSimon Wörner2017-11-241-23/+26
|
* Use upstream wptrunner from web-platform-tests.Josh Matthews2017-10-051-1/+1
|
* Update mach bootstrap for changes to wpt harness path in geckoJames Graham2017-06-051-11/+18
| | | | | | Gecko is now using the wpt harness under the wpt tools directory rather than a copy in an adjacent directory. Therefore the path to the requirements files, and the required model paths, have changed.
* Remove more deprecated Windows GNU code/docsAneesh Agrawal2017-04-161-10/+1
|
* Find WPT files in Firefox repositoryGregory Szorc2017-02-031-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | The Servo repository is now (mostly) vendored in the Firefox Mercurial repository. For size and duplication reasons, the tests/wpt directory is not included in the vendored copy. This causes problems when running `mach` from the Firefox repository because `mach` references pip requirements files and module search paths from WPT. This commit adds code to detect when Servo's mach is running from a Firefox source tree and to resolve WPT paths to the Firefox location if appropriate. This enables `mach` to "just work" when running from the servo/ directory in the Firefox repository. The file looked for to identify the Firefox repository is identical to what Firefox's `mach` script uses. A potential issue with using Firefox's WPT files is that they may be different from those in the Servo repository and this could lead to differences in behavior - possibly even an error when loading/running `mach`. However, the behavior before this commit was that Servo's `mach` never worked in the Firefox repository (due to missing WPT files). And post-commit it does. So this seems like a "perfect is the enemy of good" scenario.
* Add a Salt bootstrapperAneesh Agrawal2017-01-171-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Salt bootstrapper invokes Salt during `./mach bootstrap` to install Servo's build dependencies. It uses salt-call pinned to the same version of Salt as used in saltfs. Currently, the implementation uses gitfs and reads directly from the master branch of the saltfs repo; in the future this should be changed when the relevant Salt states are moved in-tree as part of Dockerization for TaskCluster. We have not Salted our Windows machines, so the existing Windows bootstrappers are retained. Currently this is only tested on Ubuntu Trusty. Salt uses various system python libraries, including `python-apt` on Debian-based OSes to interact with apt. `python-apt` does not seem to be installable via a requirements.txt file, and the versions available on PyPI are far behind the versions installed on actual Ubuntu machines. Additionally, adding `python-apt` as an unconditional python dependency would add bloat for users of other OSes, and lead to more churn as additional OSes are supported. However, as `python-apt` is already installed via apt on these machines, we can allow Salt to instead use the module by using `--system-site-packages` for the python virtualenv. We also add the `-I` flag to `pip install` to ensure we have a local, untouched copy of any other python packages used. However, because this prints system-level Python packages in scope, it slightly breaks isolation, so it is important to always pin all dependencies in the requirements files.
* Commit that fixes the issue #11074 by upgrading pip whenever virtualenv is ↵Peter2016-12-031-0/+17
| | | | created.
* Fix test-wpt and test-css for Windows.Jack Moffitt2016-11-161-7/+15
| | | | | | In addition to minor changes for Windows, this forces Windows Python to be used for all Windows builds (instead of using Windows Python only for pc-windows-msvc builds).
* Warn and exit mach if it detects MinGW PythonUK9922016-10-101-0/+8
|
* Minor cleanup of mach and bootstrap scriptRavi Shankar2016-09-011-37/+31
|
* Ensure that we get python and pip from virtualenvRavi Shankar2016-09-011-7/+8
|
* Allow running WPT in FirefoxJ. Ryan Stinnett2016-07-211-0/+1
|
* Auto merge of #10618 - zwn:fix-windows-build, r=larsbergstrombors-servo2016-07-171-2/+5
|\ | | | | | | | | | | | | | | | | | | | | Ensure virtualenv activates Fixes #10595. For more info see #10595 or the commit message. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10618) <!-- Reviewable:end -->