maya-umbrella 0.9.0__tar.gz → 0.11.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.
Potentially problematic release.
This version of maya-umbrella might be problematic. Click here for more details.
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/PKG-INFO +42 -14
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/README.md +41 -13
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/__init__.py +10 -1
- maya_umbrella-0.11.0/maya_umbrella/__version__.py +1 -0
- maya_umbrella-0.11.0/maya_umbrella/_vendor/six/__init__.pyi +1 -0
- maya_umbrella-0.11.0/maya_umbrella/_vendor/six/moves/__init__.pyi +1 -0
- maya_umbrella-0.11.0/maya_umbrella/_vendor/six/moves/configparser.pyi +1 -0
- maya_umbrella-0.11.0/maya_umbrella/_vendor/six.LICENSE +18 -0
- maya_umbrella-0.11.0/maya_umbrella/_vendor/six.py +998 -0
- maya_umbrella-0.11.0/maya_umbrella/_vendor/vendor.txt +1 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/cleaner.py +1 -1
- maya_umbrella-0.11.0/maya_umbrella/constants.py +5 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/defender.py +19 -5
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/filesystem.py +38 -32
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/hooks/delete_unknown_plugin_node.py +12 -12
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/i18n.py +2 -2
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/log.py +6 -4
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/maya_funs.py +1 -1
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/scanner.py +14 -4
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/signatures.py +14 -0
- maya_umbrella-0.11.0/maya_umbrella/vaccines/__init__.py +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/vaccines/vaccine2.py +6 -4
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/vaccines/vaccine3.py +28 -18
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/pyproject.toml +6 -3
- maya_umbrella-0.9.0/maya_umbrella/__version__.py +0 -1
- maya_umbrella-0.9.0/maya_umbrella/constants.py +0 -22
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/LICENSE +0 -0
- {maya_umbrella-0.9.0/maya_umbrella/hooks → maya_umbrella-0.11.0/maya_umbrella/_vendor}/__init__.py +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/collector.py +0 -0
- {maya_umbrella-0.9.0/maya_umbrella/vaccines → maya_umbrella-0.11.0/maya_umbrella/hooks}/__init__.py +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/hooks/delete_turtle.py +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/hooks/fix_model_panel.py +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/hooks/fix_on_model_change_3dc.py +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/locales/en_US.json +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/locales/zh_CN.json +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/vaccine.py +0 -0
- {maya_umbrella-0.9.0 → maya_umbrella-0.11.0}/maya_umbrella/vaccines/vaccine1.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: maya_umbrella
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0
|
|
4
4
|
Summary: Check and fix maya virus.
|
|
5
5
|
Home-page: https://github.com/loonghao/maya_umbrella
|
|
6
6
|
License: MIT
|
|
@@ -78,22 +78,25 @@ and it is recommended to use Python 3.8 or higher versions.
|
|
|
78
78
|
|
|
79
79
|
通过虚拟环境去设置开发环境, 推荐python-3.8以上的版本
|
|
80
80
|
|
|
81
|
+
通过pip安装相关开发依赖
|
|
82
|
+
|
|
81
83
|
```shell
|
|
82
|
-
pip install
|
|
84
|
+
pip install -r requirements-dev.txt
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
# 开发调试
|
|
86
88
|
|
|
87
|
-
```shell
|
|
88
|
-
nox -s maya -- 2020 --test
|
|
89
|
-
```
|
|
90
89
|
|
|
91
90
|
## 在maya中测试
|
|
92
91
|
|
|
93
92
|
通过`nox -s maya -- <maya version>`, 启动maya.
|
|
94
93
|
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020`,
|
|
94
|
+
那么通过可以启动带有测试环境的maya
|
|
95
|
+
```shell
|
|
96
|
+
nox -s maya -- 2018
|
|
97
|
+
```
|
|
95
98
|
|
|
96
|
-
|
|
99
|
+
**注意:maya 与 版本号之间有 俩个`-`**
|
|
97
100
|
|
|
98
101
|
启动maya后在脚本编辑器中执行下面得代码,就会动态的从`<repo>/tests/virus/`里面去open ma文件去进行测试.
|
|
99
102
|
|
|
@@ -103,6 +106,15 @@ import manual_test_in_maya
|
|
|
103
106
|
manual_test_in_maya.start()
|
|
104
107
|
```
|
|
105
108
|
|
|
109
|
+
也可以通过pytest去执行对应的测试,也需要本地安装了对应的maya
|
|
110
|
+
|
|
111
|
+
```shell
|
|
112
|
+
nox -s maya -- 2018 --test
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**注意:在maya-2022 (PY2) 以下的版本可能会出现命令行crash的情况**
|
|
116
|
+
|
|
117
|
+
|
|
106
118
|
## 增加新的疫苗
|
|
107
119
|
|
|
108
120
|
在`<repo>/maya_umbrella/vaccines/` 新建一个py, 因为有很多病毒没有具体的名字代号,我们统一以`vaccine<id>.py`
|
|
@@ -113,13 +125,20 @@ manual_test_in_maya.start()
|
|
|
113
125
|
我们可以利用封装好的`nox`命令去执行进行代码检查
|
|
114
126
|
|
|
115
127
|
```shell
|
|
116
|
-
nox -s
|
|
128
|
+
nox -s lint
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
进行代码整理
|
|
132
|
+
```shell
|
|
133
|
+
nox -s lint-fix
|
|
117
134
|
```
|
|
118
135
|
|
|
119
136
|
# 生成安装包
|
|
120
137
|
|
|
121
138
|
执行下面的命令可以在<repo>/.zip下面创建zip,参数 `--version` 当前工具的版本号
|
|
122
|
-
|
|
139
|
+
|
|
140
|
+
**注意:`make-zip` 与 `--version`之间有 俩个`-`**
|
|
141
|
+
|
|
123
142
|
```shell
|
|
124
143
|
nox -s make-zip -- --version 0.5.0
|
|
125
144
|
```
|
|
@@ -162,14 +181,20 @@ MAYA_UMBRELLA_LANG
|
|
|
162
181
|
MAYA_UMBRELLA_IGNORE_BACKUP
|
|
163
182
|
```
|
|
164
183
|
|
|
184
|
+
如果忽略请设置为
|
|
185
|
+
```shell
|
|
186
|
+
SET MAYA_UMBRELLA_IGNORE_BACKUP=true
|
|
187
|
+
```
|
|
188
|
+
|
|
165
189
|
如果是便携版Maya,可以通过添加 `MAYA_LOCATION` 环境变量指定Maya路径
|
|
166
190
|
```shell
|
|
167
191
|
SET MAYA_LOCATION=d:/your/path/maya_version/
|
|
168
192
|
```
|
|
193
|
+
也可以通过命令行指定目录
|
|
169
194
|
|
|
170
|
-
如果忽略请设置为
|
|
171
195
|
```shell
|
|
172
|
-
|
|
196
|
+
nox -s maya -- 2018 --install-root /your/local/maya/root
|
|
197
|
+
|
|
173
198
|
```
|
|
174
199
|
|
|
175
200
|
# API
|
|
@@ -192,13 +217,16 @@ print(api.scan_files_from_pattern("your/path/*.m[ab]"))
|
|
|
192
217
|
```
|
|
193
218
|
|
|
194
219
|
# 案例
|
|
195
|
-
如果你想要快速通过maya standalone去批量清理maya
|
|
196
|
-
|
|
197
|
-
|
|
220
|
+
如果你想要快速通过maya standalone去批量清理maya文件,
|
|
221
|
+
可以`下载`或者`git clone`当前`main`分支的工程,
|
|
222
|
+
根据上面指引设置好开发环境,
|
|
223
|
+
通过`nox`命令去启动maya `standalone`环境,maya版本根据你当前本地安装的maya为准,
|
|
224
|
+
比如你本地安装了`2018`,
|
|
198
225
|
那么就是 `nox -s maya -- 2018 --standalone`
|
|
199
226
|
下面的语法是启动一个maya-2020的环境去动态从`c:/test`文件夹下去查杀病毒
|
|
227
|
+
|
|
200
228
|
```shell
|
|
201
|
-
nox -s maya
|
|
229
|
+
nox -s maya -- 2018 --standalone --pattern c:/test/*.m[ab]
|
|
202
230
|
```
|
|
203
231
|
|
|
204
232
|
## Contributors ✨
|
|
@@ -53,22 +53,25 @@ and it is recommended to use Python 3.8 or higher versions.
|
|
|
53
53
|
|
|
54
54
|
通过虚拟环境去设置开发环境, 推荐python-3.8以上的版本
|
|
55
55
|
|
|
56
|
+
通过pip安装相关开发依赖
|
|
57
|
+
|
|
56
58
|
```shell
|
|
57
|
-
pip install
|
|
59
|
+
pip install -r requirements-dev.txt
|
|
58
60
|
```
|
|
59
61
|
|
|
60
62
|
# 开发调试
|
|
61
63
|
|
|
62
|
-
```shell
|
|
63
|
-
nox -s maya -- 2020 --test
|
|
64
|
-
```
|
|
65
64
|
|
|
66
65
|
## 在maya中测试
|
|
67
66
|
|
|
68
67
|
通过`nox -s maya -- <maya version>`, 启动maya.
|
|
69
68
|
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020`,
|
|
69
|
+
那么通过可以启动带有测试环境的maya
|
|
70
|
+
```shell
|
|
71
|
+
nox -s maya -- 2018
|
|
72
|
+
```
|
|
70
73
|
|
|
71
|
-
|
|
74
|
+
**注意:maya 与 版本号之间有 俩个`-`**
|
|
72
75
|
|
|
73
76
|
启动maya后在脚本编辑器中执行下面得代码,就会动态的从`<repo>/tests/virus/`里面去open ma文件去进行测试.
|
|
74
77
|
|
|
@@ -78,6 +81,15 @@ import manual_test_in_maya
|
|
|
78
81
|
manual_test_in_maya.start()
|
|
79
82
|
```
|
|
80
83
|
|
|
84
|
+
也可以通过pytest去执行对应的测试,也需要本地安装了对应的maya
|
|
85
|
+
|
|
86
|
+
```shell
|
|
87
|
+
nox -s maya -- 2018 --test
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**注意:在maya-2022 (PY2) 以下的版本可能会出现命令行crash的情况**
|
|
91
|
+
|
|
92
|
+
|
|
81
93
|
## 增加新的疫苗
|
|
82
94
|
|
|
83
95
|
在`<repo>/maya_umbrella/vaccines/` 新建一个py, 因为有很多病毒没有具体的名字代号,我们统一以`vaccine<id>.py`
|
|
@@ -88,13 +100,20 @@ manual_test_in_maya.start()
|
|
|
88
100
|
我们可以利用封装好的`nox`命令去执行进行代码检查
|
|
89
101
|
|
|
90
102
|
```shell
|
|
91
|
-
nox -s
|
|
103
|
+
nox -s lint
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
进行代码整理
|
|
107
|
+
```shell
|
|
108
|
+
nox -s lint-fix
|
|
92
109
|
```
|
|
93
110
|
|
|
94
111
|
# 生成安装包
|
|
95
112
|
|
|
96
113
|
执行下面的命令可以在<repo>/.zip下面创建zip,参数 `--version` 当前工具的版本号
|
|
97
|
-
|
|
114
|
+
|
|
115
|
+
**注意:`make-zip` 与 `--version`之间有 俩个`-`**
|
|
116
|
+
|
|
98
117
|
```shell
|
|
99
118
|
nox -s make-zip -- --version 0.5.0
|
|
100
119
|
```
|
|
@@ -137,14 +156,20 @@ MAYA_UMBRELLA_LANG
|
|
|
137
156
|
MAYA_UMBRELLA_IGNORE_BACKUP
|
|
138
157
|
```
|
|
139
158
|
|
|
159
|
+
如果忽略请设置为
|
|
160
|
+
```shell
|
|
161
|
+
SET MAYA_UMBRELLA_IGNORE_BACKUP=true
|
|
162
|
+
```
|
|
163
|
+
|
|
140
164
|
如果是便携版Maya,可以通过添加 `MAYA_LOCATION` 环境变量指定Maya路径
|
|
141
165
|
```shell
|
|
142
166
|
SET MAYA_LOCATION=d:/your/path/maya_version/
|
|
143
167
|
```
|
|
168
|
+
也可以通过命令行指定目录
|
|
144
169
|
|
|
145
|
-
如果忽略请设置为
|
|
146
170
|
```shell
|
|
147
|
-
|
|
171
|
+
nox -s maya -- 2018 --install-root /your/local/maya/root
|
|
172
|
+
|
|
148
173
|
```
|
|
149
174
|
|
|
150
175
|
# API
|
|
@@ -167,13 +192,16 @@ print(api.scan_files_from_pattern("your/path/*.m[ab]"))
|
|
|
167
192
|
```
|
|
168
193
|
|
|
169
194
|
# 案例
|
|
170
|
-
如果你想要快速通过maya standalone去批量清理maya
|
|
171
|
-
|
|
172
|
-
|
|
195
|
+
如果你想要快速通过maya standalone去批量清理maya文件,
|
|
196
|
+
可以`下载`或者`git clone`当前`main`分支的工程,
|
|
197
|
+
根据上面指引设置好开发环境,
|
|
198
|
+
通过`nox`命令去启动maya `standalone`环境,maya版本根据你当前本地安装的maya为准,
|
|
199
|
+
比如你本地安装了`2018`,
|
|
173
200
|
那么就是 `nox -s maya -- 2018 --standalone`
|
|
174
201
|
下面的语法是启动一个maya-2020的环境去动态从`c:/test`文件夹下去查杀病毒
|
|
202
|
+
|
|
175
203
|
```shell
|
|
176
|
-
nox -s maya
|
|
204
|
+
nox -s maya -- 2018 --standalone --pattern c:/test/*.m[ab]
|
|
177
205
|
```
|
|
178
206
|
|
|
179
207
|
## Contributors ✨
|
|
@@ -3,7 +3,16 @@ from maya_umbrella.cleaner import MayaVirusCleaner
|
|
|
3
3
|
from maya_umbrella.collector import MayaVirusCollector
|
|
4
4
|
from maya_umbrella.defender import MayaVirusDefender
|
|
5
5
|
from maya_umbrella.defender import context_defender
|
|
6
|
+
from maya_umbrella.defender import get_defender_instance
|
|
6
7
|
from maya_umbrella.scanner import MayaVirusScanner
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
# All public APIs.
|
|
11
|
+
__all__ = [
|
|
12
|
+
"MayaVirusDefender",
|
|
13
|
+
"MayaVirusCleaner",
|
|
14
|
+
"MayaVirusCollector",
|
|
15
|
+
"MayaVirusScanner",
|
|
16
|
+
"context_defender",
|
|
17
|
+
"get_defender_instance",
|
|
18
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.11.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from six import *
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from six.moves import *
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from six.moves.configparser import *
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright (c) 2010-2020 Benjamin Peterson
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
7
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
8
|
+
subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
16
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|