mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
Meta: Move ladybird.py imports to the top of the file
There's no measurable benefit to hiding these in functions, even if they are only used once (or not at all). Only the BuildVcpkg import is left alone, as that function does some sys.path manipulation first.
This commit is contained in:
parent
f87a90b67b
commit
16feb0b979
Notes:
github-actions[bot]
2025-05-21 22:57:29 +00:00
Author: https://github.com/trflynn89
Commit: 16feb0b979
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4837
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 8 additions and 9 deletions
|
@ -1,14 +1,17 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import shutil
|
||||
import multiprocessing
|
||||
from pathlib import Path
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import resource
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class HostArchitecture(IntEnum):
|
||||
|
@ -26,8 +29,6 @@ class HostSystem(IntEnum):
|
|||
|
||||
class Platform:
|
||||
def __init__(self):
|
||||
import platform
|
||||
|
||||
self.system = platform.system()
|
||||
if self.system == "Windows":
|
||||
self.host_system = HostSystem.Windows
|
||||
|
@ -250,8 +251,6 @@ def configure_main(platform, **kwargs):
|
|||
|
||||
|
||||
def configure_skia_jemalloc():
|
||||
import resource
|
||||
|
||||
page_size = resource.getpagesize()
|
||||
gn = shutil.which("gn") or None
|
||||
# https://github.com/LadybirdBrowser/ladybird/issues/261
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue