mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 10:37:54 -06:00
refactor: release and installer tools read root
Code about to move into a package reads core.paths.REPO_ROOT, and the release tools stop inserting their own folder on sys.path: scripts/ is on it for every command and package module.
This commit is contained in:
1 parent
fa408c4299
commit
5b3b3f19e8
11 files changed
+13
-13
No files matched your search
@@ -30,8 +30,9 @@ from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
|
||||
from core.artifacts import write_text_atomic
|
||||
from core.paths import REPO_ROOT
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
ROOT = REPO_ROOT
|
||||
PACKAGE = "installer"
|
||||
OUTPUT = "install.py"
|
||||
COMMAND = "python scripts/build_installer.py"
|
||||
|
||||
@@ -39,8 +39,8 @@ import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
from core.artifacts import ArtifactLockBusy, artifact_lock
|
||||
from core.paths import REPO_ROOT
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
PORT_DIR = "retrobios"
|
||||
PORT_SCRIPT = "RetroBIOS.sh"
|
||||
PORT_ZIP = "RetroBIOS.zip"
|
||||
|
||||
@@ -35,8 +35,9 @@ from pathlib import Path
|
||||
|
||||
from sitegen.bootstrap import PIN
|
||||
from model.guides import SH_NAME
|
||||
from core.paths import REPO_ROOT
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
ROOT = REPO_ROOT
|
||||
PACKAGE_DIR = ROOT / "packaging" / "pypi"
|
||||
DEFAULT_OUTPUT = ROOT / "tmp" / "pypi-dist"
|
||||
MODULE = "retrobios"
|
||||
|
||||
@@ -24,13 +24,11 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from check_release_assets import digests_of
|
||||
from model.registry import list_release_pack_platforms
|
||||
from core.cli import require_directory
|
||||
|
||||
@@ -24,7 +24,6 @@ import sys
|
||||
from collections.abc import Iterable
|
||||
from typing import NamedTuple
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from model.composition import composition_tier
|
||||
from model.database import load_database
|
||||
from model.largefiles import LARGE_FILES_RELEASE, LARGE_FILES_REPO, asset_names, registered_paths
|
||||
|
||||
@@ -14,8 +14,9 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
from core.artifacts import write_text_atomic
|
||||
from core.paths import REPO_ROOT
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
ROOT = REPO_ROOT
|
||||
OUTPUT = ROOT / "schemas" / "install-events.schema.json"
|
||||
|
||||
_spec = importlib.util.spec_from_file_location("install", ROOT / "install.py")
|
||||
|
||||
@@ -49,11 +49,12 @@ from typing import TYPE_CHECKING, Any, Callable
|
||||
|
||||
from sitegen import handheld as sitehandheld
|
||||
from core.artifacts import write_text_atomic
|
||||
from core.paths import REPO_ROOT
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from install import LocalCopy, Progress, _OsRule
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
ROOT = REPO_ROOT
|
||||
PAGE = ROOT / "wiki" / "installer.md"
|
||||
INSTALLER = ROOT / "install.py"
|
||||
|
||||
|
||||
@@ -17,8 +17,9 @@ import hashlib
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from core.paths import REPO_ROOT
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
ROOT = REPO_ROOT
|
||||
INSTALLER = "install.py"
|
||||
# Each bootstrap and its one pin line, the value between the two groups.
|
||||
PINS: dict[str, re.Pattern[str]] = {
|
||||
|
||||
@@ -18,9 +18,9 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from core.paths import REPO_ROOT
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
ROOT = REPO_ROOT
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
||||
@@ -23,7 +23,6 @@ import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from core.artifacts import set_plain_mode
|
||||
from core.artifacts import copy_file_atomic
|
||||
from model.database import load_database
|
||||
|
||||
@@ -33,7 +33,6 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from check_release_assets import compare, expected_assets, expected_digests, fetch_release
|
||||
from model.database import load_database
|
||||
from model.largefiles import LARGE_FILES_RELEASE, LARGE_FILES_REPO, asset_names, registered_paths
|
||||
|
||||
Reference in new issue
Block a user