ruyi 0.39.0__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.
Files changed (100) hide show
  1. ruyi-0.39.0/LICENSE-Apache.txt +201 -0
  2. ruyi-0.39.0/PKG-INFO +403 -0
  3. ruyi-0.39.0/README.md +159 -0
  4. ruyi-0.39.0/pyproject.toml +130 -0
  5. ruyi-0.39.0/ruyi/__init__.py +21 -0
  6. ruyi-0.39.0/ruyi/__main__.py +98 -0
  7. ruyi-0.39.0/ruyi/cli/__init__.py +5 -0
  8. ruyi-0.39.0/ruyi/cli/builtin_commands.py +14 -0
  9. ruyi-0.39.0/ruyi/cli/cmd.py +224 -0
  10. ruyi-0.39.0/ruyi/cli/completer.py +50 -0
  11. ruyi-0.39.0/ruyi/cli/completion.py +26 -0
  12. ruyi-0.39.0/ruyi/cli/config_cli.py +153 -0
  13. ruyi-0.39.0/ruyi/cli/main.py +111 -0
  14. ruyi-0.39.0/ruyi/cli/self_cli.py +295 -0
  15. ruyi-0.39.0/ruyi/cli/user_input.py +127 -0
  16. ruyi-0.39.0/ruyi/cli/version_cli.py +45 -0
  17. ruyi-0.39.0/ruyi/config/__init__.py +401 -0
  18. ruyi-0.39.0/ruyi/config/editor.py +92 -0
  19. ruyi-0.39.0/ruyi/config/errors.py +76 -0
  20. ruyi-0.39.0/ruyi/config/news.py +39 -0
  21. ruyi-0.39.0/ruyi/config/schema.py +197 -0
  22. ruyi-0.39.0/ruyi/device/__init__.py +0 -0
  23. ruyi-0.39.0/ruyi/device/provision.py +591 -0
  24. ruyi-0.39.0/ruyi/device/provision_cli.py +40 -0
  25. ruyi-0.39.0/ruyi/log/__init__.py +272 -0
  26. ruyi-0.39.0/ruyi/mux/.gitignore +1 -0
  27. ruyi-0.39.0/ruyi/mux/__init__.py +0 -0
  28. ruyi-0.39.0/ruyi/mux/runtime.py +213 -0
  29. ruyi-0.39.0/ruyi/mux/venv/__init__.py +12 -0
  30. ruyi-0.39.0/ruyi/mux/venv/emulator_cfg.py +41 -0
  31. ruyi-0.39.0/ruyi/mux/venv/maker.py +782 -0
  32. ruyi-0.39.0/ruyi/mux/venv/venv_cli.py +92 -0
  33. ruyi-0.39.0/ruyi/mux/venv_cfg.py +214 -0
  34. ruyi-0.39.0/ruyi/pluginhost/__init__.py +0 -0
  35. ruyi-0.39.0/ruyi/pluginhost/api.py +206 -0
  36. ruyi-0.39.0/ruyi/pluginhost/ctx.py +222 -0
  37. ruyi-0.39.0/ruyi/pluginhost/paths.py +135 -0
  38. ruyi-0.39.0/ruyi/pluginhost/plugin_cli.py +37 -0
  39. ruyi-0.39.0/ruyi/pluginhost/unsandboxed.py +246 -0
  40. ruyi-0.39.0/ruyi/py.typed +0 -0
  41. ruyi-0.39.0/ruyi/resource_bundle/__init__.py +20 -0
  42. ruyi-0.39.0/ruyi/resource_bundle/__main__.py +55 -0
  43. ruyi-0.39.0/ruyi/resource_bundle/data.py +26 -0
  44. ruyi-0.39.0/ruyi/ruyipkg/__init__.py +0 -0
  45. ruyi-0.39.0/ruyi/ruyipkg/admin_checksum.py +88 -0
  46. ruyi-0.39.0/ruyi/ruyipkg/admin_cli.py +83 -0
  47. ruyi-0.39.0/ruyi/ruyipkg/atom.py +184 -0
  48. ruyi-0.39.0/ruyi/ruyipkg/augmented_pkg.py +212 -0
  49. ruyi-0.39.0/ruyi/ruyipkg/canonical_dump.py +320 -0
  50. ruyi-0.39.0/ruyi/ruyipkg/checksum.py +39 -0
  51. ruyi-0.39.0/ruyi/ruyipkg/cli_completion.py +42 -0
  52. ruyi-0.39.0/ruyi/ruyipkg/distfile.py +208 -0
  53. ruyi-0.39.0/ruyi/ruyipkg/entity.py +387 -0
  54. ruyi-0.39.0/ruyi/ruyipkg/entity_cli.py +123 -0
  55. ruyi-0.39.0/ruyi/ruyipkg/entity_provider.py +273 -0
  56. ruyi-0.39.0/ruyi/ruyipkg/fetch.py +271 -0
  57. ruyi-0.39.0/ruyi/ruyipkg/host.py +55 -0
  58. ruyi-0.39.0/ruyi/ruyipkg/install.py +554 -0
  59. ruyi-0.39.0/ruyi/ruyipkg/install_cli.py +150 -0
  60. ruyi-0.39.0/ruyi/ruyipkg/list.py +126 -0
  61. ruyi-0.39.0/ruyi/ruyipkg/list_cli.py +79 -0
  62. ruyi-0.39.0/ruyi/ruyipkg/list_filter.py +173 -0
  63. ruyi-0.39.0/ruyi/ruyipkg/msg.py +99 -0
  64. ruyi-0.39.0/ruyi/ruyipkg/news.py +123 -0
  65. ruyi-0.39.0/ruyi/ruyipkg/news_cli.py +78 -0
  66. ruyi-0.39.0/ruyi/ruyipkg/news_store.py +183 -0
  67. ruyi-0.39.0/ruyi/ruyipkg/pkg_manifest.py +657 -0
  68. ruyi-0.39.0/ruyi/ruyipkg/profile.py +208 -0
  69. ruyi-0.39.0/ruyi/ruyipkg/profile_cli.py +33 -0
  70. ruyi-0.39.0/ruyi/ruyipkg/protocols.py +55 -0
  71. ruyi-0.39.0/ruyi/ruyipkg/repo.py +763 -0
  72. ruyi-0.39.0/ruyi/ruyipkg/state.py +345 -0
  73. ruyi-0.39.0/ruyi/ruyipkg/unpack.py +369 -0
  74. ruyi-0.39.0/ruyi/ruyipkg/unpack_method.py +91 -0
  75. ruyi-0.39.0/ruyi/ruyipkg/update_cli.py +54 -0
  76. ruyi-0.39.0/ruyi/telemetry/__init__.py +0 -0
  77. ruyi-0.39.0/ruyi/telemetry/aggregate.py +72 -0
  78. ruyi-0.39.0/ruyi/telemetry/event.py +41 -0
  79. ruyi-0.39.0/ruyi/telemetry/node_info.py +192 -0
  80. ruyi-0.39.0/ruyi/telemetry/provider.py +411 -0
  81. ruyi-0.39.0/ruyi/telemetry/scope.py +43 -0
  82. ruyi-0.39.0/ruyi/telemetry/store.py +238 -0
  83. ruyi-0.39.0/ruyi/telemetry/telemetry_cli.py +127 -0
  84. ruyi-0.39.0/ruyi/utils/__init__.py +0 -0
  85. ruyi-0.39.0/ruyi/utils/ar.py +74 -0
  86. ruyi-0.39.0/ruyi/utils/ci.py +63 -0
  87. ruyi-0.39.0/ruyi/utils/frontmatter.py +38 -0
  88. ruyi-0.39.0/ruyi/utils/git.py +169 -0
  89. ruyi-0.39.0/ruyi/utils/global_mode.py +204 -0
  90. ruyi-0.39.0/ruyi/utils/l10n.py +83 -0
  91. ruyi-0.39.0/ruyi/utils/markdown.py +73 -0
  92. ruyi-0.39.0/ruyi/utils/nuitka.py +33 -0
  93. ruyi-0.39.0/ruyi/utils/porcelain.py +51 -0
  94. ruyi-0.39.0/ruyi/utils/prereqs.py +77 -0
  95. ruyi-0.39.0/ruyi/utils/ssl_patch.py +170 -0
  96. ruyi-0.39.0/ruyi/utils/templating.py +34 -0
  97. ruyi-0.39.0/ruyi/utils/toml.py +115 -0
  98. ruyi-0.39.0/ruyi/utils/url.py +7 -0
  99. ruyi-0.39.0/ruyi/utils/xdg_basedir.py +80 -0
  100. ruyi-0.39.0/ruyi/version.py +67 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
ruyi-0.39.0/PKG-INFO ADDED
@@ -0,0 +1,403 @@
1
+ Metadata-Version: 2.3
2
+ Name: ruyi
3
+ Version: 0.39.0
4
+ Summary: Package manager for RuyiSDK
5
+ License: Apache License
6
+ Version 2.0, January 2004
7
+ http://www.apache.org/licenses/
8
+
9
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
+
11
+ 1. Definitions.
12
+
13
+ "License" shall mean the terms and conditions for use, reproduction,
14
+ and distribution as defined by Sections 1 through 9 of this document.
15
+
16
+ "Licensor" shall mean the copyright owner or entity authorized by
17
+ the copyright owner that is granting the License.
18
+
19
+ "Legal Entity" shall mean the union of the acting entity and all
20
+ other entities that control, are controlled by, or are under common
21
+ control with that entity. For the purposes of this definition,
22
+ "control" means (i) the power, direct or indirect, to cause the
23
+ direction or management of such entity, whether by contract or
24
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
25
+ outstanding shares, or (iii) beneficial ownership of such entity.
26
+
27
+ "You" (or "Your") shall mean an individual or Legal Entity
28
+ exercising permissions granted by this License.
29
+
30
+ "Source" form shall mean the preferred form for making modifications,
31
+ including but not limited to software source code, documentation
32
+ source, and configuration files.
33
+
34
+ "Object" form shall mean any form resulting from mechanical
35
+ transformation or translation of a Source form, including but
36
+ not limited to compiled object code, generated documentation,
37
+ and conversions to other media types.
38
+
39
+ "Work" shall mean the work of authorship, whether in Source or
40
+ Object form, made available under the License, as indicated by a
41
+ copyright notice that is included in or attached to the work
42
+ (an example is provided in the Appendix below).
43
+
44
+ "Derivative Works" shall mean any work, whether in Source or Object
45
+ form, that is based on (or derived from) the Work and for which the
46
+ editorial revisions, annotations, elaborations, or other modifications
47
+ represent, as a whole, an original work of authorship. For the purposes
48
+ of this License, Derivative Works shall not include works that remain
49
+ separable from, or merely link (or bind by name) to the interfaces of,
50
+ the Work and Derivative Works thereof.
51
+
52
+ "Contribution" shall mean any work of authorship, including
53
+ the original version of the Work and any modifications or additions
54
+ to that Work or Derivative Works thereof, that is intentionally
55
+ submitted to Licensor for inclusion in the Work by the copyright owner
56
+ or by an individual or Legal Entity authorized to submit on behalf of
57
+ the copyright owner. For the purposes of this definition, "submitted"
58
+ means any form of electronic, verbal, or written communication sent
59
+ to the Licensor or its representatives, including but not limited to
60
+ communication on electronic mailing lists, source code control systems,
61
+ and issue tracking systems that are managed by, or on behalf of, the
62
+ Licensor for the purpose of discussing and improving the Work, but
63
+ excluding communication that is conspicuously marked or otherwise
64
+ designated in writing by the copyright owner as "Not a Contribution."
65
+
66
+ "Contributor" shall mean Licensor and any individual or Legal Entity
67
+ on behalf of whom a Contribution has been received by Licensor and
68
+ subsequently incorporated within the Work.
69
+
70
+ 2. Grant of Copyright License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ copyright license to reproduce, prepare Derivative Works of,
74
+ publicly display, publicly perform, sublicense, and distribute the
75
+ Work and such Derivative Works in Source or Object form.
76
+
77
+ 3. Grant of Patent License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ (except as stated in this section) patent license to make, have made,
81
+ use, offer to sell, sell, import, and otherwise transfer the Work,
82
+ where such license applies only to those patent claims licensable
83
+ by such Contributor that are necessarily infringed by their
84
+ Contribution(s) alone or by combination of their Contribution(s)
85
+ with the Work to which such Contribution(s) was submitted. If You
86
+ institute patent litigation against any entity (including a
87
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
88
+ or a Contribution incorporated within the Work constitutes direct
89
+ or contributory patent infringement, then any patent licenses
90
+ granted to You under this License for that Work shall terminate
91
+ as of the date such litigation is filed.
92
+
93
+ 4. Redistribution. You may reproduce and distribute copies of the
94
+ Work or Derivative Works thereof in any medium, with or without
95
+ modifications, and in Source or Object form, provided that You
96
+ meet the following conditions:
97
+
98
+ (a) You must give any other recipients of the Work or
99
+ Derivative Works a copy of this License; and
100
+
101
+ (b) You must cause any modified files to carry prominent notices
102
+ stating that You changed the files; and
103
+
104
+ (c) You must retain, in the Source form of any Derivative Works
105
+ that You distribute, all copyright, patent, trademark, and
106
+ attribution notices from the Source form of the Work,
107
+ excluding those notices that do not pertain to any part of
108
+ the Derivative Works; and
109
+
110
+ (d) If the Work includes a "NOTICE" text file as part of its
111
+ distribution, then any Derivative Works that You distribute must
112
+ include a readable copy of the attribution notices contained
113
+ within such NOTICE file, excluding those notices that do not
114
+ pertain to any part of the Derivative Works, in at least one
115
+ of the following places: within a NOTICE text file distributed
116
+ as part of the Derivative Works; within the Source form or
117
+ documentation, if provided along with the Derivative Works; or,
118
+ within a display generated by the Derivative Works, if and
119
+ wherever such third-party notices normally appear. The contents
120
+ of the NOTICE file are for informational purposes only and
121
+ do not modify the License. You may add Your own attribution
122
+ notices within Derivative Works that You distribute, alongside
123
+ or as an addendum to the NOTICE text from the Work, provided
124
+ that such additional attribution notices cannot be construed
125
+ as modifying the License.
126
+
127
+ You may add Your own copyright statement to Your modifications and
128
+ may provide additional or different license terms and conditions
129
+ for use, reproduction, or distribution of Your modifications, or
130
+ for any such Derivative Works as a whole, provided Your use,
131
+ reproduction, and distribution of the Work otherwise complies with
132
+ the conditions stated in this License.
133
+
134
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
135
+ any Contribution intentionally submitted for inclusion in the Work
136
+ by You to the Licensor shall be under the terms and conditions of
137
+ this License, without any additional terms or conditions.
138
+ Notwithstanding the above, nothing herein shall supersede or modify
139
+ the terms of any separate license agreement you may have executed
140
+ with Licensor regarding such Contributions.
141
+
142
+ 6. Trademarks. This License does not grant permission to use the trade
143
+ names, trademarks, service marks, or product names of the Licensor,
144
+ except as required for reasonable and customary use in describing the
145
+ origin of the Work and reproducing the content of the NOTICE file.
146
+
147
+ 7. Disclaimer of Warranty. Unless required by applicable law or
148
+ agreed to in writing, Licensor provides the Work (and each
149
+ Contributor provides its Contributions) on an "AS IS" BASIS,
150
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
151
+ implied, including, without limitation, any warranties or conditions
152
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
153
+ PARTICULAR PURPOSE. You are solely responsible for determining the
154
+ appropriateness of using or redistributing the Work and assume any
155
+ risks associated with Your exercise of permissions under this License.
156
+
157
+ 8. Limitation of Liability. In no event and under no legal theory,
158
+ whether in tort (including negligence), contract, or otherwise,
159
+ unless required by applicable law (such as deliberate and grossly
160
+ negligent acts) or agreed to in writing, shall any Contributor be
161
+ liable to You for damages, including any direct, indirect, special,
162
+ incidental, or consequential damages of any character arising as a
163
+ result of this License or out of the use or inability to use the
164
+ Work (including but not limited to damages for loss of goodwill,
165
+ work stoppage, computer failure or malfunction, or any and all
166
+ other commercial damages or losses), even if such Contributor
167
+ has been advised of the possibility of such damages.
168
+
169
+ 9. Accepting Warranty or Additional Liability. While redistributing
170
+ the Work or Derivative Works thereof, You may choose to offer,
171
+ and charge a fee for, acceptance of support, warranty, indemnity,
172
+ or other liability obligations and/or rights consistent with this
173
+ License. However, in accepting such obligations, You may act only
174
+ on Your own behalf and on Your sole responsibility, not on behalf
175
+ of any other Contributor, and only if You agree to indemnify,
176
+ defend, and hold each Contributor harmless for any liability
177
+ incurred by, or claims asserted against, such Contributor by reason
178
+ of your accepting any such warranty or additional liability.
179
+
180
+ END OF TERMS AND CONDITIONS
181
+
182
+ APPENDIX: How to apply the Apache License to your work.
183
+
184
+ To apply the Apache License to your work, attach the following
185
+ boilerplate notice, with the fields enclosed by brackets "[]"
186
+ replaced with your own identifying information. (Don't include
187
+ the brackets!) The text should be enclosed in the appropriate
188
+ comment syntax for the file format. We also recommend that a
189
+ file or class name and description of purpose be included on the
190
+ same "printed page" as the copyright notice for easier
191
+ identification within third-party archives.
192
+
193
+ Copyright [yyyy] [name of copyright owner]
194
+
195
+ Licensed under the Apache License, Version 2.0 (the "License");
196
+ you may not use this file except in compliance with the License.
197
+ You may obtain a copy of the License at
198
+
199
+ http://www.apache.org/licenses/LICENSE-2.0
200
+
201
+ Unless required by applicable law or agreed to in writing, software
202
+ distributed under the License is distributed on an "AS IS" BASIS,
203
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ See the License for the specific language governing permissions and
205
+ limitations under the License.
206
+ Keywords: ruyi,ruyisdk
207
+ Author: WANG Xuerui
208
+ Author-email: wangxuerui@iscas.ac.cn
209
+ Requires-Python: >=3.10
210
+ Classifier: Development Status :: 3 - Alpha
211
+ Classifier: Environment :: Console
212
+ Classifier: Intended Audience :: Developers
213
+ Classifier: License :: OSI Approved :: Apache Software License
214
+ Classifier: Operating System :: POSIX :: Linux
215
+ Classifier: Programming Language :: Python :: 3.10
216
+ Classifier: Programming Language :: Python :: 3.11
217
+ Classifier: Programming Language :: Python :: 3.12
218
+ Classifier: Programming Language :: Python :: 3.13
219
+ Classifier: Topic :: Software Development :: Build Tools
220
+ Classifier: Topic :: Software Development :: Embedded Systems
221
+ Classifier: Topic :: System :: Software Distribution
222
+ Classifier: Typing :: Typed
223
+ Requires-Dist: argcomplete (>=2.0.0,<4.0.0)
224
+ Requires-Dist: arpy
225
+ Requires-Dist: fastjsonschema (>=2.15.1)
226
+ Requires-Dist: jinja2 (>=3,<4)
227
+ Requires-Dist: packaging (>=21)
228
+ Requires-Dist: pygit2 (>=1.6)
229
+ Requires-Dist: pyyaml (>=5.4)
230
+ Requires-Dist: requests (>=2,<3)
231
+ Requires-Dist: rich (>=11.2.0)
232
+ Requires-Dist: semver (>=2.10)
233
+ Requires-Dist: tomli (>=1.2) ; python_version < "3.11"
234
+ Requires-Dist: tomlkit (>=0.9)
235
+ Requires-Dist: tzdata ; sys_platform == "win32"
236
+ Project-URL: Documentation, https://ruyisdk.org/docs/intro
237
+ Project-URL: Homepage, https://ruyisdk.org
238
+ Project-URL: Repository, https://github.com/ruyisdk/ruyi.git
239
+ Project-URL: download, https://ruyisdk.org/download
240
+ Project-URL: github, https://github.com/ruyisdk/ruyi
241
+ Project-URL: issues, https://github.com/ruyisdk/ruyi/issues
242
+ Description-Content-Type: text/markdown
243
+
244
+ <div align="center">
245
+ <img alt="RuyiSDK Logo" src="resources/ruyi-logo-256.png" height="128" />
246
+ <h3>Ruyi</h3>
247
+ <p>The package manager for <a href="https://github.com/ruyisdk">RuyiSDK</a>.</p>
248
+ </div>
249
+
250
+ ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ruyisdk/ruyi/dist.yml)
251
+ ![GitHub License](https://img.shields.io/github/license/ruyisdk/ruyi)
252
+ ![Python Version](https://img.shields.io/badge/python-%3E%3D3.10-blue)
253
+ ![GitHub Tag](https://img.shields.io/github/v/tag/ruyisdk/ruyi?label=latest%20tag)
254
+
255
+ ## Installation and usage
256
+
257
+ You can get pre-built binaries of `ruyi` from [GitHub Releases][ghr] or
258
+ [the RuyiSDK mirror][mirror-testing] for easier testing.
259
+ Rename the downloaded file to `ruyi`, make it executable,
260
+ put inside your `$PATH` and you're ready to go.
261
+
262
+ [ghr]: https://github.com/ruyisdk/ruyi/releases
263
+ [mirror-testing]: https://mirror.iscas.ac.cn/ruyisdk/ruyi/testing/
264
+
265
+ You can browse the documentation at [the dedicated RuyiSDK docs site][docs]
266
+ (only available in Chinese right now).
267
+
268
+ [docs]: https://ruyisdk.org/docs/intro
269
+
270
+ ## Configuration
271
+
272
+ Various aspects of `ruyi` can be configured with files or environment variables.
273
+
274
+ ### Config search path
275
+
276
+ `ruyi` respects `$XDG_CONFIG_HOME` and `$XDG_CONFIG_DIRS` settings, and will
277
+ look up its config accordingly. If these are not explicitly set though, as in
278
+ typical use cases, the default config directory is most likely `~/.config/ruyi`.
279
+
280
+ ### Config file
281
+
282
+ Currently `ruyi` will look for an optional `config.toml` in its XDG config
283
+ directory. The file, if present, looks like this, with all values being default:
284
+
285
+ ```toml
286
+ [packages]
287
+ # Consider pre-release versions when matching packages in repositories.
288
+ prereleases = false
289
+
290
+ [repo]
291
+ # Path to the local RuyiSDK metadata repository. Must be absolute or the setting
292
+ # will be ignored.
293
+ # If unset or empty, $XDG_CACHE_HOME/ruyi/packages-index is used.
294
+ local = ""
295
+ # Remote location of RuyiSDK metadata repository.
296
+ # If unset or empty, this default value is used.
297
+ remote = "https://github.com/ruyisdk/packages-index.git"
298
+ # Name of the branch to use.
299
+ # If unset or empty, this default value is used.
300
+ branch = "main"
301
+
302
+ [telemetry]
303
+ # Whether to collect telemetry information for improving RuyiSDK's developer
304
+ # experience, and whether to send the data periodically to RuyiSDK team.
305
+ # Valid values are `local`, `off` and `on` -- see the documentation for
306
+ # details.
307
+ #
308
+ # If unset or empty, this default value is used: data will be collected and
309
+ # uploaded every week, on a random weekday determined by the installation's
310
+ # anonymous ID alone.
311
+ mode = "on"
312
+ # The time the user's consent is given to telemetry data uploading. If the
313
+ # system time is later than the time given here, telemetry consent banner will
314
+ # not be displayed any more each time `ruyi` is executed. The exact consent
315
+ # time is also useful should the telemetry policy get updated in the future.
316
+ #
317
+ # To hide the consent banner, set it to the current local time, for example:
318
+ #
319
+ # upload_consent = 2024-12-02T15:61:00+08:00
320
+ #
321
+ # The timestamp is intentionally invalid for you to notice and modify to your
322
+ # need.
323
+ upload_consent = ""
324
+ # Override the telemetry server URL of the RuyiSDK package manager scope.
325
+ # If unset, the repo-configured default is used; if set to empty, telemetry
326
+ # uploading is disabled.
327
+ #pm_telemetry_url = ""
328
+ ```
329
+
330
+ ### Environment variables
331
+
332
+ Currently the following environment variables are supported by `ruyi`:
333
+
334
+ * `RUYI_TELEMETRY_OPTOUT` -- boolean, whether to opt-out of telemetry.
335
+ * `RUYI_VENV` -- string, explicitly specifies the Ruyi virtual environment to use.
336
+
337
+ For boolean variables, the values `1`, `true`, `x`, `y` or `yes` (all case-insensitive)
338
+ are all treated as "true".
339
+
340
+ ### Telemetry
341
+
342
+ The Ruyi package manager collects usage data in order to help us improve your
343
+ experience. It is collected by the RuyiSDK team and shared with the community.
344
+ You can opt-out of telemetry by setting the `RUYI_TELEMETRY_OPTOUT`
345
+ environment variable to any of `1`, `true`, `x`, `y` or `yes` using your
346
+ favorite shell. Opting out of telemetry is equivalent to the `off` mode
347
+ described below.
348
+
349
+ There are 3 telemetry modes available:
350
+
351
+ * `local`: data will be collected but not uploaded without user action.
352
+ * `off`: data will not be collected nor uploaded.
353
+ * `on`: data will be collected and periodically uploaded.
354
+
355
+ By default the `on` mode is active, which means every `ruyi` invocation
356
+ will record some non-sensitive information locally alongside various other
357
+ states of `ruyi`, and collected data will be periodically uploaded to servers
358
+ managed by the RuyiSDK team in the People's Republic of China, in a weekly fashion.
359
+ The upload will happen on a random weekday which is determined by the
360
+ installation's anonymous ID alone.
361
+
362
+ You can change the telemetry mode by editing `ruyi`'s config file, or simply
363
+ by setting the `RUYI_TELEMETRY_OPTOUT` environment variable to any of the
364
+ values accepted as truthy.
365
+
366
+ We collect the following information with `ruyi`:
367
+
368
+ * the running machine's basic information:
369
+ * architecture and OS
370
+ * if architecture is RISC-V:
371
+ * ISA capabilities
372
+ * model name of the board
373
+ * number of logical CPUs
374
+ * OS release ID (roughly equals the distribution type)
375
+ * type and version of libc
376
+ * type of the shell (bash, fish, zsh, etc.)
377
+ * the version of `ruyi` on data upload time
378
+ * invocation patterns of various `ruyi` subcommands:
379
+ * without exposing any parameters
380
+ * invocation time is recorded with a granularity of 1 minute
381
+
382
+ You can see our Privacy Policy on the RuyiSDK website.
383
+
384
+ ## Contributing
385
+
386
+ We welcome contributions to Ruyi! Please see our [contribution guidelines](./CONTRIBUTING.md) ([中文](./CONTRIBUTING.zh.md)) for details on how to get started.
387
+
388
+ ## License
389
+
390
+ Copyright &copy; 2023-2024 Institute of Software, Chinese Academy of Sciences (ISCAS).
391
+ All rights reserved.
392
+
393
+ `ruyi` is licensed under the [Apache 2.0 license](./LICENSE-Apache.txt).
394
+
395
+ The one-file binary distribution of `ruyi` contains code licensed under the
396
+ [Mozilla Public License 2.0](https://mozilla.org/MPL/2.0/).
397
+ You can get the respective project's sources from the project's official
398
+ website:
399
+
400
+ * [`certifi`](https://github.com/certifi/python-certifi): used unmodified
401
+
402
+ All trademarks referenced herein are property of their respective holders.
403
+