1
0
Fork 0
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:
ayeteadoe 2025-05-22 12:46:50 -07:00 committed by Tim Flynn
parent 4c8b5ba9de
commit fdd3f35b61
Notes: github-actions[bot] 2025-05-22 21:49:02 +00:00

View file

@ -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