aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Auto merge of #29970 - mrobinson:remove-uwp, r=jdmbors-servo2023-07-051-32/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove UWP / Hololens support <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they remove a feature. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Remove UWP / Hololens supportMartin Robinson2023-07-051-32/+1
| |
* | Collect android build setup into two methodsMartin Robinson2023-07-051-38/+198
|/ | | | | | | | | | This is small refactor which tries to isolate all of the Android setup into a couple methods, so that it is easier to reason about in the scripts. This doesn't change any behavior but does fix a few small linting errors in the existing code. Note: The Android build is currently broken and this change doesn't fix it. It shouldn't break it any more though.
* Windows bootstrap supportMartin Robinson2023-07-031-10/+2
|
* Update mozangleMartin Robinson2023-07-011-3/+1
| | | | | This should allow servo to take advantage of faster compilation speeds on Windows.
* Update mozangle, cc, and cmakeMartin Robinson2023-06-301-6/+6
| | | | | | | | | This also moves some environment variable configuration to the shared `build_env()` method, because previously clang was only being chosen for running `./mach build` and not `./mach test-unit` which was leading to rebuilds and thus build failures when running `test-unit`. I guess the cmake crate does not expect the compiler to change between subsequent runs.
* Auto merge of #29917 - mrobinson:more-environment-cleanup, r=jdmbors-servo2023-06-241-24/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up environment variables in `command_base.py` - The `HOST_FILE` setting is completely unused by the code. - Remove some likely Python 2 compatibility code. - Remove things pertaining to Ubuntu 16.04 which is EOL. - Remove a workaround for MacOS which no longer applies. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they mostly remove dead build script code. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Clean up environment variables inn `command_base.py`Martin Robinson2023-06-221-24/+1
| | | | | | | | | | | | | | - The `HOST_FILE` setting is completely unused by the code. - Remove some likely Python 2 compatibility code. - Remove things pertaining to Ubuntu 16.04 which is EOL. - Remove a workaround for MacOS which no longer applies.
* | Update command_base.pySamson2023-06-241-1/+1
| | | | | | Fixup for https://github.com/servo/servo/pull/29912#issuecomment-1605347271
* | Don't explicitly disable gold on WindowsMartin Robinson2023-06-221-2/+1
|/ | | | | This seems to be working fine now on CI, so I think we can remove this workaround.
* Simplify the build instructionsMartin Robinson2023-06-211-2/+2
| | | | | | | | | - Add a chocolatey configuration that installs all dependencies and split the instructions into a normal and manual installation section. In addition fix a warning print statement for the Windows build that would trigger a Python exception. - Simplify the build instructions in the README and move all manual setup details to: https://github.com/servo/servo/wiki/Building
* Clean up rustdoc runMartin Robinson2023-06-201-7/+3
| | | | | | | | | 1. The options specified in `rustdoc-with-private` are essentially the default now so we can remove this script. 2. `./mach browse-doc` is redundant with `./mach doc --open` which uses the underlying cargo functionality to browse the documentation. Fixes #29888.
* Use layout 2020 by defaultMukilan Thiyagarajan2023-06-081-1/+1
| | | | Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
* Auto merge of #29811 - mrobinson:remove-more-python-2, r=jdmbors-servo2023-05-291-25/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove more Python 2 compatibility code - os.environ is always `str` in Python 3. - The only string type is `str` so we can stop using `six.str_types`. - `iteritems()` isn't necessary because dicts have the `items()` method. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they do not change behavior. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Remove more Python 2 compatibility codeMartin Robinson2023-05-291-25/+0
| | | | | | | | | | | | - os.environ is always `str` in Python 3. - The only string type is `str` so we can stop using `six.str_types`. - `iteritems()` isn't necessary because dicts have the `items()` method.
* | Auto merge of #29807 - sagudev:pyfail, r=mrobinsonbors-servo2023-05-291-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate status on `build_like_command_arguments` As observed in #29805 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #29806 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Propagate status on `build_like_command_arguments`sagudev2023-05-291-1/+1
| |
* | Do not pass features when running `./mach test-unit`Martin Robinson2023-05-291-4/+3
|/
* Only check the GStreamer installation when buildingMartin Robinson2023-05-271-3/+4
| | | | | | | | | Instead of always checking whether GStreamer is installed in mach's `build_env`, only do this when actually building. Also, use the instance variable to find features and look for the "media-gstreamer" feature instead of looking for !"media-dummy." Fixes #29797.
* Clean up cross-compilation and featuresMartin Robinson2023-05-251-68/+124
| | | | | | | | | | | | Integrate cross-compilation and media-stack handling into the `build_like_command_arguments` decorator. This removes a lot of repetition in the code and standardizes how targets are selected for all similar commands. Now cross compilation targets, feature flags, and helper variables are stored in the CommandBase instance. This also avoids having to continuously pass these arguments down to functions called by the commands.
* Implement `bootstrap-gstreamer` for all platformsMartin Robinson2023-05-251-110/+17
| | | | | | | | | | | | | | | | | | This change makes it so that the Platform classes can now handle installing GStreamer dependencies and properly setting up the environment including when cross-compiling. For Windows and Linux is now installed into `target/dependencies/gstreamer` when not installed system-wide. In addition: 1. Creating and moving existing environment path append helpers to `util.py`. 2. Combining the `set_run_env` and `build_dev` functions and moving some outside code into them so that it can be shared. Now code that used to call `set_run_env` calls `build_dev` and then `os.environ.update(...)`. 3. Adding Python typing information in many places. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Apply some review fixesmichaelgrigoryan252023-05-221-0/+5
|
* Removed MagicLeap occurrences from Python filesmichaelgrigoryan252023-05-221-14/+5
|
* Remove `magicleap` command from command_base.pymichaelgrigoryan252023-05-221-6/+0
|
* Start organizing platform-specific Python codeMartin Robinson2023-05-191-20/+17
| | | | | | 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.
* Consume official GStreamer binaries on MacOSMukilan Thiyagarajan2023-05-121-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR re-enables support for the gstreamer mediastack in macOS by consuming the official binary '.pkg' files from gstreamer.freedesktop.org To maintain symmetry with other platforms, the '.pkg' files are uploaded to servo-build-deps and fetched from there using the new script 'etc/install_macos_gstreamer.sh'. Unlike the Homebrew version, the official GStreamer is distributed as a 'relocatable' framework i.e the dylibs all have @rpath-relative install names and also link to other dylibs using @rpath relative path. To address this difference the 'servo' binary needs to be patched with 'install_name_tool' to add an LC_RPATH command that sets the relative paths that the dynamic linker should search when trying to satify dependencies. In Servo's case, this will be a path relative to the 'servo' binary itself i.e '@executable_path/lib/' The additional 'lib' is due to a flaw in the gstreamer packaging where the install names of some of the dylibs have the prefix '@rpath/lib' and some of them just have '@rpath'. This PR also fixes a couple of issues present in the `mach build` process on MacOS: 1. `mach build` process was not copying transitive dependencies of servo binary but only the first level dylibs 2. `mach build` process didn't patch the links to dylibs in servo binary (and dependencies). This meant though (some) dylibs were copied to local path, the binary still loaded the dylibs from system GStreamer installation i.e homebrew instead of the copieds dylibs The build and runtime dependencies in etc/homebrew/Brewfile and etc/homebrew/Brewfile-build have also been removed in This PR. Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
* Use resolver v2sagudev2023-05-071-24/+26
|
* Replace usage of six.moves.urllib with urllibMartin Robinson2023-04-101-14/+15
| | | | | | Also organize some of the imports. Now that Servo only uses Python 3, this module is unnecessary. This is part of the gradual migration to using only Python 3.
* Have all mach command accept "--with-layout-2020" and "--layout-2020"Martin Robinson2023-04-071-2/+2
| | | | | | Some command accepted one and some the other. This changes makes them all accept both so it's no longer necessary to remember which uses which.
* Fix simpleservo binary check on macosYuri Witte2021-09-121-1/+6
|
* Fix deprecated gzipfile constructor argument.Josh Matthews2021-05-031-1/+1
|
* Auto merge of #27865 - servo:github-actions-dev, r=jdmbors-servo2021-03-111-0/+8
|\ | | | | | | Add Github Actions workflow for mac/linux/windows builds
| * Ensure clang-cl is always used in windows builds.Josh Matthews2021-02-261-0/+8
| |
* | Use build-std instead of xargo.Josh Matthews2021-02-251-4/+2
| |
* | Auto merge of #27619 - servo:rustup, r=jdmbors-servo2021-02-251-1/+6
|\ \ | |/ |/| | | | | | | Upgrade to rustc 1.48.0-nightly (623fb90b5 2020-09-26) https://github.com/rust-lang/hashbrown/pull/159 reduced `size_of::<HashMap>()`
| * Silence the warning about `rustup --version` v.s. `rustc --version`Simon Sapin2021-01-261-1/+6
| |
* | Port some code to Python3Vincent Ricard2021-02-181-2/+2
|/
* Use new S3 bucketsSimon Sapin2020-11-111-1/+1
| | | | CC https://github.com/servo/project/issues/25
* Enable gstreamer media stack for UWP targets.Josh Matthews2020-08-061-0/+1
|
* Add `.servobuild` configuration for the choice of media stackSimon Sapin2020-07-061-5/+8
|
* Use except Exception where Py2/3 disagreesKagami Sascha Rosylight2020-06-211-1/+1
|
* Replace SubprocessError with FileNotFoundErrorKagami Sascha Rosylight2020-06-211-1/+1
|
* Fix new flake8 warningsKagami Sascha Rosylight2020-06-201-13/+13
|
* Auto merge of #27004 - saschanaz:py3-env, r=jdmbors-servo2020-06-201-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Py3 environment setting failures <!-- Please describe your changes on the following line: --> `python3 mach build -d` now proceeds to actual build. Since Gecko landed full Python 3 support, updating mozjs should allow us to drop Python 2 to build Servo. (I still see failures on other commands e.g. `test-tidy`.) --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Fix Py3 environment setting failuresKagami Sascha Rosylight2020-06-201-5/+5
| |
* | Fix Py3 failures when installing MSVC dependenciesKagami Sascha Rosylight2020-06-201-1/+1
|/
* Use binary strings for compatibility with Python 3camelid2020-05-311-2/+2
|
* Don't fail if run on non-bundle commitcamelid2020-05-301-7/+19
|
* Add missing bracketscamelid2020-05-301-1/+1
|
* Get the real commit hash, not the bundle hashcamelid2020-05-301-2/+9
| | | | It's extracted from the commit message of the bundle.