ruyi 0.42.0b20251015__py3-none-any.whl → 0.42.0b20251017__py3-none-any.whl
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/cli/main.py +6 -1
- ruyi/pluginhost/api.py +1 -1
- ruyi/telemetry/store.py +1 -1
- ruyi/version.py +2 -49
- {ruyi-0.42.0b20251015.dist-info → ruyi-0.42.0b20251017.dist-info}/METADATA +1 -1
- {ruyi-0.42.0b20251015.dist-info → ruyi-0.42.0b20251017.dist-info}/RECORD +9 -9
- {ruyi-0.42.0b20251015.dist-info → ruyi-0.42.0b20251017.dist-info}/WHEEL +0 -0
- {ruyi-0.42.0b20251015.dist-info → ruyi-0.42.0b20251017.dist-info}/entry_points.txt +0 -0
- {ruyi-0.42.0b20251015.dist-info → ruyi-0.42.0b20251017.dist-info}/licenses/LICENSE-Apache.txt +0 -0
ruyi/cli/main.py
CHANGED
|
@@ -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:
|
ruyi/pluginhost/api.py
CHANGED
ruyi/telemetry/store.py
CHANGED
ruyi/version.py
CHANGED
|
@@ -1,53 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
from typing import Final, TYPE_CHECKING
|
|
1
|
+
from typing import Final
|
|
3
2
|
|
|
4
|
-
|
|
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()
|
|
3
|
+
RUYI_SEMVER: Final = "0.42.0-beta.20251017"
|
|
51
4
|
RUYI_USER_AGENT: Final = f"ruyi/{RUYI_SEMVER}"
|
|
52
5
|
|
|
53
6
|
COPYRIGHT_NOTICE: Final = """\
|
|
@@ -6,7 +6,7 @@ ruyi/cli/cmd.py,sha256=kR3aEiDE3AfPoP0Zr7MO-09CKoExbkLLmPvve9oKaUg,6725
|
|
|
6
6
|
ruyi/cli/completer.py,sha256=cnOkU7veDe-jP8ROXZL2uBop2HgWfaAZl6dromnPLx8,1426
|
|
7
7
|
ruyi/cli/completion.py,sha256=ffLs3Dv7pY_uinwH98wkBPohRvAjpUOGqy01OTA_Bgo,841
|
|
8
8
|
ruyi/cli/config_cli.py,sha256=9kq5W3Ir_lfwImhvrUmQ1KTKy1aRCv_UU1CmL5eGyJs,4038
|
|
9
|
-
ruyi/cli/main.py,sha256=
|
|
9
|
+
ruyi/cli/main.py,sha256=qWgCKbWG8sHxM7rInkoQfzZOHKo2k8JwdgJp_AMH388,4455
|
|
10
10
|
ruyi/cli/oobe.py,sha256=3m7oLPBhzn5JgagwQYDPy8vhZ4v8mBiDlO5n4cR_jVA,2712
|
|
11
11
|
ruyi/cli/self_cli.py,sha256=UEX3Xjy8RGGn9W2O5cM-5rLCwpsM7uSQ9vYYBYxyjyQ,8837
|
|
12
12
|
ruyi/cli/user_input.py,sha256=ZJPyCAD7Aizkt37f_KDtW683aKvGZ2pL85Rg_y1LLfg,3711
|
|
@@ -28,7 +28,7 @@ ruyi/mux/venv/maker.py,sha256=RzipQWANOpKZxXGG_XiExyoQzHBw-j6wew7Iu6hZwZE,27234
|
|
|
28
28
|
ruyi/mux/venv/venv_cli.py,sha256=rIKNcYKu1j7ahHXNgv_ytYVR7qJOoly-TaHPvb21FGA,2974
|
|
29
29
|
ruyi/mux/venv_cfg.py,sha256=m75JCVLFWE1gE8OzcNDOHqwUc2c6ikJhZ-GhjsXv94U,6840
|
|
30
30
|
ruyi/pluginhost/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
-
ruyi/pluginhost/api.py,sha256=
|
|
31
|
+
ruyi/pluginhost/api.py,sha256=Zh69xJfR7PEbM6fjoFZRNqeqTneWAmC71NjA76HodSY,5711
|
|
32
32
|
ruyi/pluginhost/ctx.py,sha256=MsP1L7nchnbSrauId3GaQzv0YJLnWE0u_H3ZFEmjUX8,6590
|
|
33
33
|
ruyi/pluginhost/paths.py,sha256=3EVY3_i3LLff4Lk9py-E317C7_ysiRatfCiuxvCsVWw,4227
|
|
34
34
|
ruyi/pluginhost/plugin_cli.py,sha256=rLdXG4_OJ2nlaSjFBmTaclx_N2f0s_Wi-9qcSeq7h9I,968
|
|
@@ -75,7 +75,7 @@ ruyi/telemetry/event.py,sha256=GZnFj6E59Q7mjp-2VRApAZH3rT_bu4_cWb5QMCPm-Zc,982
|
|
|
75
75
|
ruyi/telemetry/node_info.py,sha256=ix-udhoKQI-HV7qVeEbd-jy3ZyhXL62sVA9uX4fowEg,5178
|
|
76
76
|
ruyi/telemetry/provider.py,sha256=U88ydGga3dwYAi7mfNKmEEyfhAZ4xelF2L-jNAk29IY,16486
|
|
77
77
|
ruyi/telemetry/scope.py,sha256=e45VPAvRAqSxrL0ESorN9SCnR_I6Bwi2CMPJDDshJEE,1133
|
|
78
|
-
ruyi/telemetry/store.py,sha256=
|
|
78
|
+
ruyi/telemetry/store.py,sha256=jodRQ7aRye9qYfvc0uaPQ5DLYGmYYuJtb8dnUN9KVs8,8010
|
|
79
79
|
ruyi/telemetry/telemetry_cli.py,sha256=PBVMUSE3P6IBKQVMji_bueVenCdbchbOlowySXy0468,3364
|
|
80
80
|
ruyi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
81
|
ruyi/utils/ar.py,sha256=w9wiYYdbInLewr5IRTcP0TiOw2ibVDQEmnV0hHm9WlA,2271
|
|
@@ -94,9 +94,9 @@ ruyi/utils/templating.py,sha256=94xBJTkIfDqmUBTc9hnLO54zQoC7hwGWONGF3YbaqHk,966
|
|
|
94
94
|
ruyi/utils/toml.py,sha256=aniIF3SGfR69_s3GWWwlnoKxW4B5IDVY2CM0eUI55_c,3501
|
|
95
95
|
ruyi/utils/url.py,sha256=Wyct6syS4GmZC6mY7SK-YgBWxKl3cOOBXtp9UtvGkto,186
|
|
96
96
|
ruyi/utils/xdg_basedir.py,sha256=RwVH199jPcLVsg5ngR62RaNS5hqnMpkdt31LqkCfa1g,2751
|
|
97
|
-
ruyi/version.py,sha256=
|
|
98
|
-
ruyi-0.42.
|
|
99
|
-
ruyi-0.42.
|
|
100
|
-
ruyi-0.42.
|
|
101
|
-
ruyi-0.42.
|
|
102
|
-
ruyi-0.42.
|
|
97
|
+
ruyi/version.py,sha256=jfXW6Hdr5S82pdnYx3yiOp2U6a_gnDBLlnwUniBvFeA,609
|
|
98
|
+
ruyi-0.42.0b20251017.dist-info/METADATA,sha256=DBFusreF_Vtb5LUPcgyo958WIevmFQn2yBOVz3aNexs,24275
|
|
99
|
+
ruyi-0.42.0b20251017.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
100
|
+
ruyi-0.42.0b20251017.dist-info/entry_points.txt,sha256=GXSNSy7OgFrnlU5xm5dE3l3PGO92Qf6VDIUCdvQNm8E,49
|
|
101
|
+
ruyi-0.42.0b20251017.dist-info/licenses/LICENSE-Apache.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
102
|
+
ruyi-0.42.0b20251017.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{ruyi-0.42.0b20251015.dist-info → ruyi-0.42.0b20251017.dist-info}/licenses/LICENSE-Apache.txt
RENAMED
|
File without changes
|