mirror of
https://github.com/lutris/lutris.git
synced 2025-12-24 00:00:29 -05:00
Install pygobject-stubs
This commit is contained in:
1
Makefile
1
Makefile
@@ -95,6 +95,7 @@ req-python:
|
||||
|
||||
dev:
|
||||
pip3 install ruff==0.12.1 mypy==1.16.1 mypy-baseline nose2
|
||||
pip3 install pygobject-stubs --no-cache-dir --config-settings=config=Gtk3,Gdk3,Soup2
|
||||
|
||||
# ============
|
||||
# Style checks
|
||||
|
||||
@@ -151,7 +151,7 @@ def _iter_proton_locations() -> Generator[str, None, None]:
|
||||
yield path
|
||||
|
||||
|
||||
def update_proton_env(wine_path: str, env: Dict[str, str], game_id: str = DEFAULT_GAMEID, umu_log: str = None) -> None:
|
||||
def update_proton_env(wine_path: str, env: Dict[str, str], game_id: str = DEFAULT_GAMEID, umu_log: str = "") -> None:
|
||||
"""Add various env-vars to an 'env' dict for use by Proton and Umu; this won't replace env-vars, so they can still
|
||||
be pre-set before we get here. This sets the PROTONPATH so the Umu launcher will know what Proton to use,
|
||||
and the WINEARCH to win64, which is what we expect Proton to always be. GAMEID is required, but we'll use a default
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import os
|
||||
from collections import OrderedDict
|
||||
from gettext import gettext as _
|
||||
from typing import Dict, List, Optional, Tuple
|
||||
from typing import Any, Dict, List, Optional, Sequence, Tuple
|
||||
|
||||
from lutris.exceptions import MisconfigurationError, UnspecifiedVersionError
|
||||
from lutris.settings import WINE_DIR
|
||||
@@ -163,7 +163,7 @@ def get_runner_files_dir_for_version(version: str) -> Optional[str]:
|
||||
return os.path.join(WINE_DIR, version)
|
||||
|
||||
|
||||
def get_wine_path_for_version(version: str, config: dict = None) -> str:
|
||||
def get_wine_path_for_version(version: str, config: Optional[dict] = None) -> str:
|
||||
"""Return the absolute path of a wine executable for a given version,
|
||||
or the configured version if you don't ask for a version."""
|
||||
if not version and config:
|
||||
@@ -186,7 +186,7 @@ def get_wine_path_for_version(version: str, config: dict = None) -> str:
|
||||
return os.path.join(WINE_DIR, version, "bin/wine")
|
||||
|
||||
|
||||
def parse_wine_version(version: str) -> Tuple[List[int], str, str]:
|
||||
def parse_wine_version(version: str) -> Tuple[Sequence[int], str, str]:
|
||||
"""This is a specialized parse_version() that adjusts some odd
|
||||
Wine versions for correct parsing."""
|
||||
version = version.replace("Proton7-", "Proton-7.")
|
||||
@@ -199,7 +199,7 @@ def version_sort(versions: List[str], reverse: bool = False) -> List[str]:
|
||||
def version_key(version):
|
||||
version_list, prefix, suffix = parse_wine_version(version)
|
||||
# Normalize the length of sub-versions
|
||||
sort_key = version_list + [0] * (10 - len(version_list))
|
||||
sort_key: List[Any] = version_list + [0] * (10 - len(version_list))
|
||||
sort_key.append(prefix)
|
||||
sort_key.append(suffix)
|
||||
return sort_key
|
||||
|
||||
Reference in New Issue
Block a user