ruyi 0.42.0b20251015__tar.gz → 0.42.0b20251017__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/PKG-INFO +1 -1
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/pyproject.toml +1 -1
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/main.py +6 -1
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/pluginhost/api.py +1 -1
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/telemetry/store.py +1 -1
- ruyi-0.42.0b20251017/ruyi/version.py +20 -0
- ruyi-0.42.0b20251015/ruyi/version.py +0 -67
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/LICENSE-Apache.txt +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/README.md +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/__main__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/builtin_commands.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/cmd.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/completer.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/completion.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/config_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/oobe.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/self_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/user_input.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/cli/version_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/config/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/config/editor.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/config/errors.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/config/news.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/config/schema.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/device/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/device/provision.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/device/provision_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/log/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/mux/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/mux/runtime.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/mux/venv/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/mux/venv/emulator_cfg.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/mux/venv/maker.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/mux/venv/venv_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/mux/venv_cfg.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/pluginhost/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/pluginhost/ctx.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/pluginhost/paths.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/pluginhost/plugin_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/pluginhost/unsandboxed.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/py.typed +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/resource_bundle/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/resource_bundle/__main__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/resource_bundle/data.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/admin_checksum.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/admin_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/atom.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/augmented_pkg.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/canonical_dump.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/checksum.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/cli_completion.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/distfile.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/entity.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/entity_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/entity_provider.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/fetcher.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/host.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/install.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/install_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/list.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/list_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/list_filter.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/msg.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/news.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/news_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/news_store.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/pkg_manifest.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/profile.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/profile_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/protocols.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/repo.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/state.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/unpack.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/unpack_method.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/ruyipkg/update_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/telemetry/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/telemetry/aggregate.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/telemetry/event.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/telemetry/node_info.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/telemetry/provider.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/telemetry/scope.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/telemetry/telemetry_cli.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/__init__.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/ar.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/ci.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/frontmatter.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/git.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/global_mode.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/l10n.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/markdown.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/mounts.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/nuitka.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/porcelain.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/prereqs.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/ssl_patch.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/templating.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/toml.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/url.py +0 -0
- {ruyi-0.42.0b20251015 → ruyi-0.42.0b20251017}/ruyi/utils/xdg_basedir.py +0 -0
|
@@ -6,6 +6,7 @@ from typing import Final, TYPE_CHECKING
|
|
|
6
6
|
from ..config import GlobalConfig
|
|
7
7
|
from ..telemetry.scope import TelemetryScope
|
|
8
8
|
from ..utils.global_mode import GlobalModeProvider
|
|
9
|
+
from ..version import RUYI_SEMVER
|
|
9
10
|
from . import RUYI_ENTRYPOINT_NAME
|
|
10
11
|
from .oobe import OOBE
|
|
11
12
|
|
|
@@ -22,7 +23,11 @@ def is_called_as_ruyi(argv0: str) -> bool:
|
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
def should_prompt_for_renaming(argv0: str) -> bool:
|
|
25
|
-
|
|
26
|
+
# We need to allow things like "ruyi-qemu" through, to not break our mux.
|
|
27
|
+
# Only consider filenames starting with both our name *and* version to be
|
|
28
|
+
# un-renamed onefile artifacts that warrant a rename prompt.
|
|
29
|
+
likely_artifact_name_prefix = f"{RUYI_ENTRYPOINT_NAME}-{RUYI_SEMVER}."
|
|
30
|
+
return os.path.basename(argv0).lower().startswith(likely_artifact_name_prefix)
|
|
26
31
|
|
|
27
32
|
|
|
28
33
|
def main(gm: GlobalModeProvider, gc: GlobalConfig, argv: list[str]) -> int:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Final
|
|
2
|
+
|
|
3
|
+
RUYI_SEMVER: Final = "0.42.0-beta.20251017"
|
|
4
|
+
RUYI_USER_AGENT: Final = f"ruyi/{RUYI_SEMVER}"
|
|
5
|
+
|
|
6
|
+
COPYRIGHT_NOTICE: Final = """\
|
|
7
|
+
Copyright (C) Institute of Software, Chinese Academy of Sciences (ISCAS).
|
|
8
|
+
All rights reserved.
|
|
9
|
+
License: Apache-2.0 <https://www.apache.org/licenses/LICENSE-2.0>
|
|
10
|
+
\
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
MPL_REDIST_NOTICE: Final = """\
|
|
14
|
+
This distribution of ruyi contains code licensed under the Mozilla Public
|
|
15
|
+
License 2.0 (https://mozilla.org/MPL/2.0/). You can get the respective
|
|
16
|
+
project's sources from the project's official website:
|
|
17
|
+
|
|
18
|
+
* certifi: https://github.com/certifi/python-certifi
|
|
19
|
+
\
|
|
20
|
+
"""
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import importlib.metadata
|
|
2
|
-
from typing import Final, TYPE_CHECKING
|
|
3
|
-
|
|
4
|
-
import packaging.version
|
|
5
|
-
|
|
6
|
-
if TYPE_CHECKING:
|
|
7
|
-
# pyright only works with semver 3.x
|
|
8
|
-
from semver.version import Version
|
|
9
|
-
else:
|
|
10
|
-
try:
|
|
11
|
-
from semver.version import Version # type: ignore[import-untyped,unused-ignore]
|
|
12
|
-
except ModuleNotFoundError:
|
|
13
|
-
# semver 2.x
|
|
14
|
-
from semver import VersionInfo as Version # type: ignore[import-untyped,unused-ignore]
|
|
15
|
-
|
|
16
|
-
# NOTE: one cannot print logs in the version helpers, because the version info
|
|
17
|
-
# is initialized so early (before argparse can look at argv because --version
|
|
18
|
-
# requires version info to be ready) that the porcelain status is not yet
|
|
19
|
-
# available.
|
|
20
|
-
|
|
21
|
-
_PYPI_PRERELEASE_KINDS_MAP: Final = {
|
|
22
|
-
"a": "alpha",
|
|
23
|
-
"b": "beta",
|
|
24
|
-
"rc": "rc",
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
# based on https://python-semver.readthedocs.io/en/3.0.2/advanced/convert-pypi-to-semver.html
|
|
29
|
-
def _convert2semver(ver: packaging.version.Version) -> Version:
|
|
30
|
-
if ver.epoch:
|
|
31
|
-
raise ValueError("Can't convert an epoch to semver")
|
|
32
|
-
if ver.post:
|
|
33
|
-
raise ValueError("Can't convert a post part to semver")
|
|
34
|
-
|
|
35
|
-
pre: str | None = None
|
|
36
|
-
if ver.pre:
|
|
37
|
-
kind, val = ver.pre
|
|
38
|
-
pre = f"{_PYPI_PRERELEASE_KINDS_MAP.get(kind, kind)}.{val}"
|
|
39
|
-
|
|
40
|
-
maj, min, pat = ver.release[:3]
|
|
41
|
-
return Version(maj, min, pat, prerelease=pre, build=ver.dev)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def _init_pkg_semver() -> Version:
|
|
45
|
-
pkg_pypi_ver = packaging.version.Version(importlib.metadata.version("ruyi"))
|
|
46
|
-
# log.D(f"PyPI-style version of ruyi: {pkg_pypi_ver}")
|
|
47
|
-
return _convert2semver(pkg_pypi_ver)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
RUYI_SEMVER: Final = _init_pkg_semver()
|
|
51
|
-
RUYI_USER_AGENT: Final = f"ruyi/{RUYI_SEMVER}"
|
|
52
|
-
|
|
53
|
-
COPYRIGHT_NOTICE: Final = """\
|
|
54
|
-
Copyright (C) Institute of Software, Chinese Academy of Sciences (ISCAS).
|
|
55
|
-
All rights reserved.
|
|
56
|
-
License: Apache-2.0 <https://www.apache.org/licenses/LICENSE-2.0>
|
|
57
|
-
\
|
|
58
|
-
"""
|
|
59
|
-
|
|
60
|
-
MPL_REDIST_NOTICE: Final = """\
|
|
61
|
-
This distribution of ruyi contains code licensed under the Mozilla Public
|
|
62
|
-
License 2.0 (https://mozilla.org/MPL/2.0/). You can get the respective
|
|
63
|
-
project's sources from the project's official website:
|
|
64
|
-
|
|
65
|
-
* certifi: https://github.com/certifi/python-certifi
|
|
66
|
-
\
|
|
67
|
-
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|