bitool 0.1.1__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 (59) hide show
  1. bitool-0.1.1/.cargo/config.toml +6 -0
  2. bitool-0.1.1/.cargo/libs/python38.lib +0 -0
  3. bitool-0.1.1/.cargo/libs/windows.0.48.5.lib +0 -0
  4. bitool-0.1.1/.github/workflows/CI.yml +186 -0
  5. bitool-0.1.1/.gitignore +52 -0
  6. bitool-0.1.1/.python-version +1 -0
  7. bitool-0.1.1/.vscode/settings.json +7 -0
  8. bitool-0.1.1/Cargo.lock +893 -0
  9. bitool-0.1.1/Cargo.toml +32 -0
  10. bitool-0.1.1/Makefile +65 -0
  11. bitool-0.1.1/PKG-INFO +87 -0
  12. bitool-0.1.1/README.md +67 -0
  13. bitool-0.1.1/pyproject.toml +60 -0
  14. bitool-0.1.1/python/bitool/__init__.py +36 -0
  15. bitool-0.1.1/python/bitool/_rust.pyi +173 -0
  16. bitool-0.1.1/python/bitool/cli/__init__.py +1 -0
  17. bitool-0.1.1/python/bitool/cli/commands/system_tools.py +66 -0
  18. bitool-0.1.1/python/bitool/cli/main.py +84 -0
  19. bitool-0.1.1/python/bitool/core/__init__.py +6 -0
  20. bitool-0.1.1/python/bitool/core/app.py +144 -0
  21. bitool-0.1.1/python/bitool/core/commands.py +194 -0
  22. bitool-0.1.1/python/bitool/core/config.py +549 -0
  23. bitool-0.1.1/python/bitool/core/logger.py +230 -0
  24. bitool-0.1.1/python/bitool/core/plugin.py +117 -0
  25. bitool-0.1.1/python/bitool/core/workspace.py +76 -0
  26. bitool-0.1.1/python/bitool/plugins/__init__.py +1 -0
  27. bitool-0.1.1/python/bitool/plugins/console/__init__.py +0 -0
  28. bitool-0.1.1/python/bitool/plugins/console/clear.py +76 -0
  29. bitool-0.1.1/python/bitool/plugins/console/sshcopyid.py +489 -0
  30. bitool-0.1.1/python/bitool/plugins/fileops/__init__.py +0 -0
  31. bitool-0.1.1/python/bitool/plugins/fileops/filedate.py +231 -0
  32. bitool-0.1.1/python/bitool/plugins/fileops/filelevel.py +191 -0
  33. bitool-0.1.1/python/bitool/plugins/process/__init__.py +0 -0
  34. bitool-0.1.1/python/bitool/plugins/process/taskkill.py +397 -0
  35. bitool-0.1.1/python/bitool/plugins/process/which.py +209 -0
  36. bitool-0.1.1/python/bitool/scripts/__init__.py +1 -0
  37. bitool-0.1.1/python/bitool/scripts/build.py +122 -0
  38. bitool-0.1.1/python/bitool/scripts/dev.py +173 -0
  39. bitool-0.1.1/python/bitool/scripts/test.py +114 -0
  40. bitool-0.1.1/python/tests/__init__.py +1 -0
  41. bitool-0.1.1/python/tests/conftest.py +19 -0
  42. bitool-0.1.1/python/tests/plugins/__init__.py +0 -0
  43. bitool-0.1.1/python/tests/plugins/test_filelevel.py +440 -0
  44. bitool-0.1.1/python/tests/test_core.py +70 -0
  45. bitool-0.1.1/src/core/cmd_exec.rs +173 -0
  46. bitool-0.1.1/src/core/config.rs +143 -0
  47. bitool-0.1.1/src/core/crypto.rs +92 -0
  48. bitool-0.1.1/src/core/file_ops.rs +164 -0
  49. bitool-0.1.1/src/core/mod.rs +6 -0
  50. bitool-0.1.1/src/core/text_proc.rs +182 -0
  51. bitool-0.1.1/src/lib.rs +27 -0
  52. bitool-0.1.1/src/plugins/loader.rs +56 -0
  53. bitool-0.1.1/src/plugins/mod.rs +3 -0
  54. bitool-0.1.1/src/plugins/registry.rs +46 -0
  55. bitool-0.1.1/src/python/mod.rs +5 -0
  56. bitool-0.1.1/src/python/py_cmd_exec.rs +84 -0
  57. bitool-0.1.1/src/python/py_config.rs +120 -0
  58. bitool-0.1.1/src/python/py_file_ops.rs +91 -0
  59. bitool-0.1.1/src/python/py_text_proc.rs +135 -0
@@ -0,0 +1,6 @@
1
+ # Windows 7 兼容目标配置
2
+ [target.x86_64-win7-windows-msvc]
3
+ rustflags = ["-C", "link-arg=/SUBSYSTEM:CONSOLE", "-L", ".cargo\\libs"]
4
+
5
+ [build]
6
+ # 使用默认 MSVC 链接器
Binary file
@@ -0,0 +1,186 @@
1
+ # This file is autogenerated by maturin v1.13.1
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ tags:
14
+ - '*'
15
+ pull_request:
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ linux:
23
+ runs-on: ${{ matrix.platform.runner }}
24
+ strategy:
25
+ matrix:
26
+ platform:
27
+ - runner: ubuntu-22.04
28
+ target: x86_64
29
+ - runner: ubuntu-22.04
30
+ target: x86
31
+ - runner: ubuntu-22.04
32
+ target: aarch64
33
+ - runner: ubuntu-22.04
34
+ target: armv7
35
+ - runner: ubuntu-22.04
36
+ target: s390x
37
+ - runner: ubuntu-22.04
38
+ target: ppc64le
39
+ steps:
40
+ - uses: actions/checkout@v6
41
+ - uses: actions/setup-python@v6
42
+ with:
43
+ python-version: 3.x
44
+ - name: Build wheels
45
+ uses: PyO3/maturin-action@v1
46
+ with:
47
+ target: ${{ matrix.platform.target }}
48
+ args: --release --out dist --find-interpreter
49
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
50
+ manylinux: auto
51
+ - name: Upload wheels
52
+ uses: actions/upload-artifact@v6
53
+ with:
54
+ name: wheels-linux-${{ matrix.platform.target }}
55
+ path: dist
56
+
57
+ musllinux:
58
+ runs-on: ${{ matrix.platform.runner }}
59
+ strategy:
60
+ matrix:
61
+ platform:
62
+ - runner: ubuntu-22.04
63
+ target: x86_64
64
+ - runner: ubuntu-22.04
65
+ target: x86
66
+ - runner: ubuntu-22.04
67
+ target: aarch64
68
+ - runner: ubuntu-22.04
69
+ target: armv7
70
+ steps:
71
+ - uses: actions/checkout@v6
72
+ - uses: actions/setup-python@v6
73
+ with:
74
+ python-version: 3.x
75
+ - name: Build wheels
76
+ uses: PyO3/maturin-action@v1
77
+ with:
78
+ target: ${{ matrix.platform.target }}
79
+ args: --release --out dist --find-interpreter
80
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
81
+ manylinux: musllinux_1_2
82
+ - name: Upload wheels
83
+ uses: actions/upload-artifact@v6
84
+ with:
85
+ name: wheels-musllinux-${{ matrix.platform.target }}
86
+ path: dist
87
+
88
+ windows:
89
+ runs-on: ${{ matrix.platform.runner }}
90
+ strategy:
91
+ matrix:
92
+ platform:
93
+ - runner: windows-latest
94
+ target: x64
95
+ python_arch: x64
96
+ - runner: windows-latest
97
+ target: x86
98
+ python_arch: x86
99
+ - runner: windows-11-arm
100
+ target: aarch64
101
+ python_arch: arm64
102
+ steps:
103
+ - uses: actions/checkout@v6
104
+ - uses: actions/setup-python@v6
105
+ with:
106
+ python-version: 3.13
107
+ architecture: ${{ matrix.platform.python_arch }}
108
+ - name: Build wheels
109
+ uses: PyO3/maturin-action@v1
110
+ with:
111
+ target: ${{ matrix.platform.target }}
112
+ args: --release --out dist --find-interpreter
113
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
114
+ - name: Upload wheels
115
+ uses: actions/upload-artifact@v6
116
+ with:
117
+ name: wheels-windows-${{ matrix.platform.target }}
118
+ path: dist
119
+
120
+ macos:
121
+ runs-on: ${{ matrix.platform.runner }}
122
+ strategy:
123
+ matrix:
124
+ platform:
125
+ - runner: macos-15-intel
126
+ target: x86_64
127
+ - runner: macos-latest
128
+ target: aarch64
129
+ steps:
130
+ - uses: actions/checkout@v6
131
+ - uses: actions/setup-python@v6
132
+ with:
133
+ python-version: 3.x
134
+ - name: Build wheels
135
+ uses: PyO3/maturin-action@v1
136
+ with:
137
+ target: ${{ matrix.platform.target }}
138
+ args: --release --out dist --find-interpreter
139
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
140
+ - name: Upload wheels
141
+ uses: actions/upload-artifact@v6
142
+ with:
143
+ name: wheels-macos-${{ matrix.platform.target }}
144
+ path: dist
145
+
146
+ sdist:
147
+ runs-on: ubuntu-latest
148
+ steps:
149
+ - uses: actions/checkout@v6
150
+ - name: Build sdist
151
+ uses: PyO3/maturin-action@v1
152
+ with:
153
+ command: sdist
154
+ args: --out dist
155
+ - name: Upload sdist
156
+ uses: actions/upload-artifact@v6
157
+ with:
158
+ name: wheels-sdist
159
+ path: dist
160
+
161
+ release:
162
+ name: Release
163
+ runs-on: ubuntu-latest
164
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
165
+ needs: [linux, musllinux, windows, macos, sdist]
166
+ permissions:
167
+ # Use to sign the release artifacts
168
+ id-token: write
169
+ # Used to upload release artifacts
170
+ contents: write
171
+ # Used to generate artifact attestation
172
+ attestations: write
173
+ steps:
174
+ - uses: actions/download-artifact@v7
175
+ - name: Generate artifact attestation
176
+ uses: actions/attest-build-provenance@v3
177
+ with:
178
+ subject-path: 'wheels-*/*'
179
+ - name: Install uv
180
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
181
+ uses: astral-sh/setup-uv@v7
182
+ - name: Publish to PyPI
183
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
184
+ run: uv publish 'wheels-*/*'
185
+ env:
186
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,52 @@
1
+ # Rust
2
+ /target/
3
+ **/*.rs.bk
4
+ Cargo.lock
5
+
6
+ # Python
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+ *.so
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # Virtual Environment
29
+ venv/
30
+ ENV/
31
+ env/
32
+
33
+ # IDE
34
+ .idea/
35
+ *.swp
36
+ *.swo
37
+ *~
38
+
39
+ # OS
40
+ .DS_Store
41
+ Thumbs.db
42
+
43
+ # Testing
44
+ .coverage
45
+ htmlcov/
46
+ .pytest_cache/
47
+
48
+ # Maturin
49
+ *.cpython-*.so
50
+ uv.lock
51
+ *.pdb
52
+ *.log
@@ -0,0 +1 @@
1
+ 3.8
@@ -0,0 +1,7 @@
1
+ {
2
+ "python.testing.pytestArgs": [
3
+ "python"
4
+ ],
5
+ "python.testing.unittestEnabled": false,
6
+ "python.testing.pytestEnabled": true
7
+ }