pypmxvmd 2.0.0__tar.gz → 2.6.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.
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/PKG-INFO +20 -15
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/README.md +18 -1
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/pypmxvmd/__init__.py +6 -6
- pypmxvmd-2.6.0/pypmxvmd/common/__init__.py +11 -0
- pypmxvmd-2.6.0/pypmxvmd/common/io/__init__.py +16 -0
- pypmxvmd-2.6.0/pypmxvmd/common/io/_fast_binary.c +19193 -0
- pypmxvmd-2.6.0/pypmxvmd/common/io/_fast_binary.cp311-win_amd64.pyd +0 -0
- pypmxvmd-2.6.0/pypmxvmd/common/io/_fast_binary.pyi +32 -0
- pypmxvmd-2.6.0/pypmxvmd/common/io/_fast_binary.pyx +264 -0
- pypmxvmd-2.6.0/pypmxvmd/common/io/binary_io.py +451 -0
- pypmxvmd-2.6.0/pypmxvmd/common/io/file_utils.py +293 -0
- pypmxvmd-2.6.0/pypmxvmd/common/io/text_io.py +299 -0
- pypmxvmd-2.6.0/pypmxvmd/common/models/__init__.py +18 -0
- pypmxvmd-2.6.0/pypmxvmd/common/models/base.py +168 -0
- pypmxvmd-2.6.0/pypmxvmd/common/models/pmx.py +633 -0
- pypmxvmd-2.6.0/pypmxvmd/common/models/vmd.py +350 -0
- pypmxvmd-2.6.0/pypmxvmd/common/models/vpd.py +111 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/__init__.py +16 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/_fast_pmx.c +16644 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/_fast_pmx.cp311-win_amd64.pyd +0 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/_fast_pmx.pyi +6 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/_fast_pmx.pyx +570 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/_fast_vmd.c +15477 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/_fast_vmd.cp311-win_amd64.pyd +0 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/_fast_vmd.pyi +6 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/_fast_vmd.pyx +463 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/pmx_parser.py +1398 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/pmx_parser_nuthouse.py +1320 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/vmd_parser.py +1569 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/vmd_parser_nuthouse.py +1092 -0
- pypmxvmd-2.6.0/pypmxvmd/common/parsers/vpd_parser.py +589 -0
- pypmxvmd-2.6.0/pypmxvmd/common/validators/__init__.py +7 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/pypmxvmd.egg-info/PKG-INFO +20 -15
- pypmxvmd-2.6.0/pypmxvmd.egg-info/SOURCES.txt +51 -0
- pypmxvmd-2.6.0/pypmxvmd.egg-info/requires.txt +3 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/pyproject.toml +17 -25
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/tests/test_api_integration.py +7 -3
- pypmxvmd-2.6.0/tests/test_cython_parsers.py +395 -0
- pypmxvmd-2.6.0/tests/test_io_utils.py +141 -0
- pypmxvmd-2.6.0/tests/test_parser_optimization.py +456 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/tests/test_pmx_comprehensive.py +2 -3
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/tests/test_quick_integration.py +1 -2
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/tests/test_text_processing.py +2 -3
- pypmxvmd-2.6.0/tests/test_vmd_comparison.py +162 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/tests/test_vmd_comprehensive.py +1 -2
- pypmxvmd-2.6.0/tests/test_vmd_parser.py +63 -0
- pypmxvmd-2.0.0/pypmxvmd.egg-info/SOURCES.txt +0 -18
- pypmxvmd-2.0.0/pypmxvmd.egg-info/requires.txt +0 -19
- pypmxvmd-2.0.0/tests/test_vmd_parser.py +0 -37
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/pypmxvmd.egg-info/dependency_links.txt +0 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/pypmxvmd.egg-info/entry_points.txt +0 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/pypmxvmd.egg-info/top_level.txt +0 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/setup.cfg +0 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/tests/test_pmx_writer.py +0 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/tests/test_vmd_header.py +0 -0
- {pypmxvmd-2.0.0 → pypmxvmd-2.6.0}/tests/test_vpd_parser.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pypmxvmd
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.0
|
|
4
4
|
Summary: Wrapper for reading and modifying VMD and PMX files
|
|
5
|
-
Author-email:
|
|
5
|
+
Author-email: PythonImporter <271374667@qq.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/pypmxvmd/pypmxvmd
|
|
7
7
|
Project-URL: Documentation, https://pypmxvmd.readthedocs.io/
|
|
8
8
|
Project-URL: Repository, https://github.com/pypmxvmd/pypmxvmd
|
|
@@ -21,18 +21,6 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
21
21
|
Requires-Python: >=3.8
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
Requires-Dist: typing-extensions>=4.0.0; python_version < "3.10"
|
|
24
|
-
Provides-Extra: dev
|
|
25
|
-
Requires-Dist: pytest>=6.0; extra == "dev"
|
|
26
|
-
Requires-Dist: pytest-cov>=2.0; extra == "dev"
|
|
27
|
-
Requires-Dist: black>=22.0; extra == "dev"
|
|
28
|
-
Requires-Dist: isort>=5.0; extra == "dev"
|
|
29
|
-
Requires-Dist: flake8>=4.0; extra == "dev"
|
|
30
|
-
Requires-Dist: mypy>=0.900; extra == "dev"
|
|
31
|
-
Provides-Extra: gui
|
|
32
|
-
Provides-Extra: translation
|
|
33
|
-
Requires-Dist: googletrans==4.0.0rc1; extra == "translation"
|
|
34
|
-
Provides-Extra: image
|
|
35
|
-
Requires-Dist: Pillow>=8.0.0; extra == "image"
|
|
36
24
|
|
|
37
25
|
# PyPMXVMD
|
|
38
26
|
|
|
@@ -40,7 +28,7 @@ Python MikuMikuDance File Parser Library
|
|
|
40
28
|
|
|
41
29
|
[](https://www.python.org/downloads/)
|
|
42
30
|
[](LICENSE)
|
|
43
|
-
[](https://github.com/pypmxvmd/pypmxvmd)
|
|
44
32
|
|
|
45
33
|
PyPMXVMD is a Python library for parsing and modifying MikuMikuDance (MMD) files, supporting the following formats:
|
|
46
34
|
|
|
@@ -54,6 +42,7 @@ PyPMXVMD is a Python library for parsing and modifying MikuMikuDance (MMD) files
|
|
|
54
42
|
- Conversion between binary and text formats
|
|
55
43
|
- Object-oriented API design, easy to use
|
|
56
44
|
- Complete type annotation support
|
|
45
|
+
- Optional Cython acceleration for core parsing and binary I/O (average 3.7x faster than the previous path)
|
|
57
46
|
- No external dependencies (core functionality)
|
|
58
47
|
- Supports Python 3.8+
|
|
59
48
|
|
|
@@ -69,6 +58,18 @@ pip install -e .
|
|
|
69
58
|
pip install -e ".[dev]"
|
|
70
59
|
```
|
|
71
60
|
|
|
61
|
+
### Optional: Build Cython Accelerators
|
|
62
|
+
|
|
63
|
+
The core parsing path supports Cython-accelerated modules for VMD/PMX and binary I/O.
|
|
64
|
+
In typical workloads, the Cython implementation is ~3.7x faster on average than the previous implementation.
|
|
65
|
+
Prebuilt Cython binaries are only provided for Python 3.11; other Python versions need to compile locally.
|
|
66
|
+
If the compiled modules are not available, the library automatically falls back to pure Python.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install cython
|
|
70
|
+
python scripts/build_cython.py
|
|
71
|
+
```
|
|
72
|
+
|
|
72
73
|
## Quick Start
|
|
73
74
|
|
|
74
75
|
### Basic Usage
|
|
@@ -280,6 +281,10 @@ flake8 pypmxvmd/
|
|
|
280
281
|
|
|
281
282
|
## Version History
|
|
282
283
|
|
|
284
|
+
### v2.5.1
|
|
285
|
+
- Added optional Cython acceleration for core parsing and binary I/O
|
|
286
|
+
- Cython path averages ~3.7x faster than the previous implementation
|
|
287
|
+
|
|
283
288
|
### v2.0.0 (2024)
|
|
284
289
|
- Complete refactor to object-oriented architecture
|
|
285
290
|
- Added complete type annotations
|
|
@@ -4,7 +4,7 @@ Python MikuMikuDance File Parser Library
|
|
|
4
4
|
|
|
5
5
|
[](https://www.python.org/downloads/)
|
|
6
6
|
[](LICENSE)
|
|
7
|
-
[](https://github.com/pypmxvmd/pypmxvmd)
|
|
8
8
|
|
|
9
9
|
PyPMXVMD is a Python library for parsing and modifying MikuMikuDance (MMD) files, supporting the following formats:
|
|
10
10
|
|
|
@@ -18,6 +18,7 @@ PyPMXVMD is a Python library for parsing and modifying MikuMikuDance (MMD) files
|
|
|
18
18
|
- Conversion between binary and text formats
|
|
19
19
|
- Object-oriented API design, easy to use
|
|
20
20
|
- Complete type annotation support
|
|
21
|
+
- Optional Cython acceleration for core parsing and binary I/O (average 3.7x faster than the previous path)
|
|
21
22
|
- No external dependencies (core functionality)
|
|
22
23
|
- Supports Python 3.8+
|
|
23
24
|
|
|
@@ -33,6 +34,18 @@ pip install -e .
|
|
|
33
34
|
pip install -e ".[dev]"
|
|
34
35
|
```
|
|
35
36
|
|
|
37
|
+
### Optional: Build Cython Accelerators
|
|
38
|
+
|
|
39
|
+
The core parsing path supports Cython-accelerated modules for VMD/PMX and binary I/O.
|
|
40
|
+
In typical workloads, the Cython implementation is ~3.7x faster on average than the previous implementation.
|
|
41
|
+
Prebuilt Cython binaries are only provided for Python 3.11; other Python versions need to compile locally.
|
|
42
|
+
If the compiled modules are not available, the library automatically falls back to pure Python.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install cython
|
|
46
|
+
python scripts/build_cython.py
|
|
47
|
+
```
|
|
48
|
+
|
|
36
49
|
## Quick Start
|
|
37
50
|
|
|
38
51
|
### Basic Usage
|
|
@@ -244,6 +257,10 @@ flake8 pypmxvmd/
|
|
|
244
257
|
|
|
245
258
|
## Version History
|
|
246
259
|
|
|
260
|
+
### v2.5.1
|
|
261
|
+
- Added optional Cython acceleration for core parsing and binary I/O
|
|
262
|
+
- Cython path averages ~3.7x faster than the previous implementation
|
|
263
|
+
|
|
247
264
|
### v2.0.0 (2024)
|
|
248
265
|
- Complete refactor to object-oriented architecture
|
|
249
266
|
- Added complete type annotations
|
|
@@ -24,11 +24,11 @@ Usage:
|
|
|
24
24
|
"""
|
|
25
25
|
|
|
26
26
|
from pathlib import Path
|
|
27
|
-
from typing import Union
|
|
27
|
+
from typing import Union
|
|
28
28
|
|
|
29
29
|
# Import parsers
|
|
30
|
-
from .common.parsers.
|
|
31
|
-
from .common.parsers.
|
|
30
|
+
from .common.parsers.vmd_parser import VmdParser
|
|
31
|
+
from .common.parsers.pmx_parser import PmxParser
|
|
32
32
|
from .common.parsers.vpd_parser import VpdParser
|
|
33
33
|
|
|
34
34
|
# Import models for type hints
|
|
@@ -36,8 +36,8 @@ from .common.models.vmd import VmdMotion
|
|
|
36
36
|
from .common.models.pmx import PmxModel
|
|
37
37
|
from .common.models.vpd import VpdPose
|
|
38
38
|
|
|
39
|
-
__version__ = "2.
|
|
40
|
-
__author__ = "
|
|
39
|
+
__version__ = "2.6.0"
|
|
40
|
+
__author__ = "PythonImporter"
|
|
41
41
|
__description__ = "Python MikuMikuDance File Parser"
|
|
42
42
|
|
|
43
43
|
# Core parser instances (reused for efficiency)
|
|
@@ -398,4 +398,4 @@ __all__ = [
|
|
|
398
398
|
'VmdMotion',
|
|
399
399
|
'PmxModel',
|
|
400
400
|
'VpdPose',
|
|
401
|
-
]
|
|
401
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
PyPMXVMD I/O操作模块
|
|
3
|
+
|
|
4
|
+
提供文件读写、二进制数据处理等底层I/O功能。
|
|
5
|
+
包含二进制文件操作、文本文件操作和通用文件工具。
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from pypmxvmd.common.io.binary_io import BinaryIOHandler
|
|
9
|
+
from pypmxvmd.common.io.text_io import TextIOHandler
|
|
10
|
+
from pypmxvmd.common.io.file_utils import FileUtils
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"BinaryIOHandler",
|
|
14
|
+
"TextIOHandler",
|
|
15
|
+
"FileUtils",
|
|
16
|
+
]
|