aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/abstractworkerglobalscope.rs
diff options
context:
space:
mode:
authorJonathan Schwender <55576758+jschwe@users.noreply.github.com>2024-09-12 04:21:41 +0200
committerGitHub <noreply@github.com>2024-09-12 02:21:41 +0000
commit637770600fe23d9cb51091d9c53a408205677727 (patch)
treee1e1869abd1551571f517c2d30b2e0bdb467dff6 /components/script/dom/abstractworkerglobalscope.rs
parent08a4d751d7762fa36490998ba17bf3eece8d9bef (diff)
downloadservo-637770600fe23d9cb51091d9c53a408205677727.tar.gz
servo-637770600fe23d9cb51091d9c53a408205677727.zip
libservo: Improve finding python (#33385)
* libservo: Improve finding python Servo is built in a virtual environment, which sets `VIRTUAL_ENV` to the base path of the venv. PYTHON3 is only set if mach or the user set it. Additional changes: - Use Path / var_os for Paths instead of strings. In General using Path APIs is preferable, since in rare cases valid paths may not be valid utf-8. - Don't search for python 3.8 anymore, since we require a newer version anyway. - Don't add the .exe suffix anymore, since Command::new() will take care of that. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * script: Improve finding python Synchronize `find_python` in scripts build.rs with the version in libservo. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Apply suggestions from code review Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * Fix finding venv python on windows - On Windows the venv scripts and python binaries are in the `Scripts` subdirectory instead of `bin`. - We shouldn't check if the executable in the venv binary dir exists, since the actual file could have a `.exe` suffix. We don't need to consider the `.exe` suffix for the filename, since `Command` will handle that for us. We also anyway check the validity of the candidate file, by running `$candidate --version`. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/dom/abstractworkerglobalscope.rs')
0 files changed, 0 insertions, 0 deletions