There is currently [a bug in
UV](https://github.com/astral-sh/uv/issues/12906) that results in it
using the x64 flavor of Python when running on Arm64 Windows. This then
causes all Python scripts to believe they are on an x64 device and so
Server installs the wrong dependencies and builds for the wrong
architecture.
Testing: Local on my Arm64 Windows device
Contributes to fixing #40611
Signed-off-by: Daniel Paoliello <daniel@meta-sys.info>
This will avoid updating the lockfile during regular operations. Also
ignore the `servo.egg-info` directory, which
the new python requirement installation mechanism via setuptools
creates.
To update the lockfile one can run `uv lock`. This is also done
automatically, when syncing requirements from WPT.
This PR also updates the uv version in CI to a newer one. If you
encounter any issues with the lockfile after this PR, it might be
necessary to update your local instance of uv.
Testing: Build still works. [mach try
full](https://github.com/servo/servo/actions/runs/21624364040)
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Instead of attempting to manage the virtual environment ourselves, use
`uv` to manage the installation of dependencies.
Since we still have dependencies coming from upstream wpt, we use
`[tool.setuptool]` in our pyproject.toml to ensure that `uv` dynamically
installs our dependencies according to the requirements.txt files.
Additionally, this PR also reverts `--no-project` usage. `--no-project`
was added as a temporary workaround in
https://github.com/servo/servo/pull/37741.
It's not 100% clear to me what exactly the issue was, but
[apparently](https://github.com/servo/servo/pull/37741#pullrequestreview-2985666234)
the issue caused the build to break.
Removing the arg seems to work fine, except that we get a warning about
a missing `requiress-python` value in `pyproject.toml`.
Apparently it is good practice to specify the requirement as `>=` in th
pyroject, and lock the exact version via `uv pin` (which writes to
`.python_version`, where we already pin 3.11.
Testing: Should be covered by existing tests, which compile code on all
platforms.
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Unix terminal natively supports globbing, but Windows don't. That's why
command like `.\mach update-wpt D:\selenium_servo\linux\*.log` works
differently on Windows.
This PR creates a new script `mach.ps1`.
1. If user uses cmd, `./mach` still runs `./mach.bat`.
2. If user uses powershell, `./mach` runs `./mach.ps1`, supporting the
feature mentioned.
Testing: Manually tested.
Fixes: #39724
Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>