mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
Meta: Localize resource module import to fix ladybird.py on Windows
This commit is contained in:
parent
4c8b5ba9de
commit
fdd3f35b61
Notes:
github-actions[bot]
2025-05-22 21:49:02 +00:00
Author: https://github.com/ayeteadoe
Commit: fdd3f35b61
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4847
Reviewed-by: https://github.com/trflynn89
1 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,6 @@ import multiprocessing
|
|||
import os
|
||||
import platform
|
||||
import re
|
||||
import resource
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
@ -271,6 +270,11 @@ def configure_main(platform: Platform, preset: str, cc: str, cxx: str) -> Path:
|
|||
|
||||
|
||||
def configure_skia_jemalloc() -> list[str]:
|
||||
# NOTE: The resource module is only available on Unix, see the "Availability" section at
|
||||
# https://docs.python.org/3/library/resource.html. Given Windows never calls this function, we import locally
|
||||
# instead.
|
||||
import resource
|
||||
|
||||
page_size = resource.getpagesize()
|
||||
gn = shutil.which("gn") or None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue