winevtx 0.1.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.
- winevtx-0.1.0/.gitattributes +25 -0
- winevtx-0.1.0/.github/dependabot.yml +0 -0
- winevtx-0.1.0/.github/workflows/ci.yml +261 -0
- winevtx-0.1.0/.github/workflows/publish.yml +309 -0
- winevtx-0.1.0/.gitignore +78 -0
- winevtx-0.1.0/.readthedocs.yaml +0 -0
- winevtx-0.1.0/AGENTS.md +15 -0
- winevtx-0.1.0/CHANGELOG.md +44 -0
- winevtx-0.1.0/CLAUDE.md +10 -0
- winevtx-0.1.0/CODE_OF_CONDUCT.md +25 -0
- winevtx-0.1.0/CONTRIBUTING.md +53 -0
- winevtx-0.1.0/Cargo.lock +1199 -0
- winevtx-0.1.0/Cargo.toml +29 -0
- winevtx-0.1.0/LICENSE.md +13 -0
- winevtx-0.1.0/PKG-INFO +188 -0
- winevtx-0.1.0/README.md +158 -0
- winevtx-0.1.0/SECURITY.md +27 -0
- winevtx-0.1.0/docs/api.md +38 -0
- winevtx-0.1.0/docs/contributing.md +56 -0
- winevtx-0.1.0/docs/getting-started.md +66 -0
- winevtx-0.1.0/docs/index.md +24 -0
- winevtx-0.1.0/docs/security.md +30 -0
- winevtx-0.1.0/mkdocs.yml +17 -0
- winevtx-0.1.0/pyproject.toml +61 -0
- winevtx-0.1.0/pyrightconfig.json +11 -0
- winevtx-0.1.0/python/winevtx/__init__.py +24 -0
- winevtx-0.1.0/python/winevtx/_winevtx.pyi +175 -0
- winevtx-0.1.0/python/winevtx/live.py +55 -0
- winevtx-0.1.0/python/winevtx/offline.py +47 -0
- winevtx-0.1.0/python/winevtx/py.typed +1 -0
- winevtx-0.1.0/python/winevtx/utils.py +34 -0
- winevtx-0.1.0/src/error.rs +59 -0
- winevtx-0.1.0/src/lib.rs +152 -0
- winevtx-0.1.0/src/live.rs +320 -0
- winevtx-0.1.0/src/offline.rs +130 -0
- winevtx-0.1.0/src/record.rs +213 -0
- winevtx-0.1.0/src/xml_parse.rs +174 -0
- winevtx-0.1.0/tests/test_winevtx.py +130 -0
- winevtx-0.1.0/tools/validate_distribution.py +87 -0
- winevtx-0.1.0/tools/validate_release.py +37 -0
- winevtx-0.1.0/uv.lock +1409 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Normalize text files to LF in the repository while allowing Git to detect
|
|
2
|
+
# the working-tree convention on each platform.
|
|
3
|
+
* text=auto
|
|
4
|
+
|
|
5
|
+
# Source and configuration files.
|
|
6
|
+
*.py text diff=python
|
|
7
|
+
*.pyi text diff=python
|
|
8
|
+
*.rs text diff=rust
|
|
9
|
+
*.toml text diff=toml
|
|
10
|
+
*.md text
|
|
11
|
+
*.ps1 text
|
|
12
|
+
*.yml text
|
|
13
|
+
*.yaml text
|
|
14
|
+
*.xml text
|
|
15
|
+
Cargo.lock text
|
|
16
|
+
uv.lock text
|
|
17
|
+
|
|
18
|
+
# Common generated or binary artifacts.
|
|
19
|
+
*.dll binary
|
|
20
|
+
*.pdb binary
|
|
21
|
+
*.whl binary
|
|
22
|
+
*.png binary
|
|
23
|
+
*.jpg binary
|
|
24
|
+
*.jpeg binary
|
|
25
|
+
*.gif binary
|
|
File without changes
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# Based on maturin output; preserve custom validation and wheel tests when updating.
|
|
2
|
+
name: CI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
- master
|
|
9
|
+
pull_request:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
tests:
|
|
16
|
+
runs-on: ${{ matrix.runner }}
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
runner: [ubuntu-latest, macos-15-intel]
|
|
20
|
+
python: ["3.9", "3.14"]
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
- uses: actions/setup-python@v6
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python }}
|
|
26
|
+
- uses: astral-sh/setup-uv@v7
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python }}
|
|
29
|
+
- run: uv sync --locked
|
|
30
|
+
- run: cargo fmt --check
|
|
31
|
+
- run: uv run python -m unittest discover -s tests -v
|
|
32
|
+
|
|
33
|
+
msrv:
|
|
34
|
+
runs-on: windows-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v6
|
|
37
|
+
- uses: actions/setup-python@v6
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.13"
|
|
40
|
+
- name: Check minimum Rust version
|
|
41
|
+
run: |
|
|
42
|
+
rustup toolchain install 1.88.0 --profile minimal
|
|
43
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
44
|
+
$env:PYO3_PYTHON = python -c "import sys; print(sys.executable)"
|
|
45
|
+
cargo +1.88.0 check --locked
|
|
46
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
47
|
+
|
|
48
|
+
docs:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v6
|
|
52
|
+
- uses: astral-sh/setup-uv@v7
|
|
53
|
+
- run: uv sync --locked --group docs
|
|
54
|
+
- run: uv run --group docs mkdocs build --strict
|
|
55
|
+
|
|
56
|
+
linux:
|
|
57
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
58
|
+
strategy:
|
|
59
|
+
matrix:
|
|
60
|
+
platform:
|
|
61
|
+
- runner: ubuntu-22.04
|
|
62
|
+
target: x86_64
|
|
63
|
+
- runner: ubuntu-22.04
|
|
64
|
+
target: aarch64
|
|
65
|
+
- runner: ubuntu-22.04
|
|
66
|
+
target: armv7
|
|
67
|
+
- runner: ubuntu-22.04
|
|
68
|
+
target: ppc64le
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v6
|
|
71
|
+
- uses: actions/setup-python@v6
|
|
72
|
+
with:
|
|
73
|
+
python-version: "3.14"
|
|
74
|
+
- name: Build wheels
|
|
75
|
+
uses: PyO3/maturin-action@v1
|
|
76
|
+
with:
|
|
77
|
+
rust-toolchain: 1.88.0
|
|
78
|
+
target: ${{ matrix.platform.target }}
|
|
79
|
+
args: --release --out dist --find-interpreter
|
|
80
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
81
|
+
manylinux: auto
|
|
82
|
+
- name: Upload wheels
|
|
83
|
+
uses: actions/upload-artifact@v6
|
|
84
|
+
with:
|
|
85
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
86
|
+
path: dist
|
|
87
|
+
|
|
88
|
+
musllinux:
|
|
89
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
90
|
+
strategy:
|
|
91
|
+
matrix:
|
|
92
|
+
platform:
|
|
93
|
+
- runner: ubuntu-22.04
|
|
94
|
+
target: x86_64
|
|
95
|
+
- runner: ubuntu-22.04
|
|
96
|
+
target: aarch64
|
|
97
|
+
- runner: ubuntu-22.04
|
|
98
|
+
target: armv7
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@v6
|
|
101
|
+
- uses: actions/setup-python@v6
|
|
102
|
+
with:
|
|
103
|
+
python-version: "3.14"
|
|
104
|
+
- name: Build wheels
|
|
105
|
+
uses: PyO3/maturin-action@v1
|
|
106
|
+
with:
|
|
107
|
+
rust-toolchain: 1.88.0
|
|
108
|
+
target: ${{ matrix.platform.target }}
|
|
109
|
+
args: --release --out dist --find-interpreter
|
|
110
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
111
|
+
manylinux: musllinux_1_2
|
|
112
|
+
- name: Upload wheels
|
|
113
|
+
uses: actions/upload-artifact@v6
|
|
114
|
+
with:
|
|
115
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
116
|
+
path: dist
|
|
117
|
+
|
|
118
|
+
windows:
|
|
119
|
+
runs-on: ${{ matrix.runner }}
|
|
120
|
+
strategy:
|
|
121
|
+
matrix:
|
|
122
|
+
include:
|
|
123
|
+
- runner: windows-latest
|
|
124
|
+
target: x64
|
|
125
|
+
rust_target: x86_64-pc-windows-msvc
|
|
126
|
+
python_arch: x64
|
|
127
|
+
python: "3.9"
|
|
128
|
+
- runner: windows-latest
|
|
129
|
+
target: x64
|
|
130
|
+
rust_target: x86_64-pc-windows-msvc
|
|
131
|
+
python_arch: x64
|
|
132
|
+
python: "3.10"
|
|
133
|
+
- runner: windows-latest
|
|
134
|
+
target: x64
|
|
135
|
+
rust_target: x86_64-pc-windows-msvc
|
|
136
|
+
python_arch: x64
|
|
137
|
+
python: "3.11"
|
|
138
|
+
- runner: windows-latest
|
|
139
|
+
target: x64
|
|
140
|
+
rust_target: x86_64-pc-windows-msvc
|
|
141
|
+
python_arch: x64
|
|
142
|
+
python: "3.12"
|
|
143
|
+
- runner: windows-latest
|
|
144
|
+
target: x64
|
|
145
|
+
rust_target: x86_64-pc-windows-msvc
|
|
146
|
+
python_arch: x64
|
|
147
|
+
python: "3.13"
|
|
148
|
+
- runner: windows-latest
|
|
149
|
+
target: x64
|
|
150
|
+
rust_target: x86_64-pc-windows-msvc
|
|
151
|
+
python_arch: x64
|
|
152
|
+
python: "3.14"
|
|
153
|
+
- runner: windows-2022
|
|
154
|
+
target: x64
|
|
155
|
+
rust_target: x86_64-pc-windows-msvc
|
|
156
|
+
python_arch: x64
|
|
157
|
+
python: "3.13"
|
|
158
|
+
- runner: windows-11-arm
|
|
159
|
+
target: aarch64
|
|
160
|
+
rust_target: aarch64-pc-windows-msvc
|
|
161
|
+
python_arch: arm64
|
|
162
|
+
python: "3.13"
|
|
163
|
+
steps:
|
|
164
|
+
- uses: actions/checkout@v6
|
|
165
|
+
- uses: actions/setup-python@v6
|
|
166
|
+
with:
|
|
167
|
+
python-version: ${{ matrix.python }}
|
|
168
|
+
architecture: ${{ matrix.python_arch }}
|
|
169
|
+
- name: Build wheels
|
|
170
|
+
uses: PyO3/maturin-action@v1
|
|
171
|
+
with:
|
|
172
|
+
rust-toolchain: 1.88.0
|
|
173
|
+
target: ${{ matrix.target }}
|
|
174
|
+
args: --release --locked --out dist --interpreter python
|
|
175
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
176
|
+
- name: Test native module
|
|
177
|
+
run: |
|
|
178
|
+
$env:PYO3_PYTHON = python -c "import sys; print(sys.executable)"
|
|
179
|
+
cargo test --locked --target ${{ matrix.rust_target }}
|
|
180
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
181
|
+
- name: Validate wheel contents
|
|
182
|
+
run: python tools/validate_distribution.py dist
|
|
183
|
+
- name: Test installed Windows wheel
|
|
184
|
+
run: |
|
|
185
|
+
python -m pip install --force-reinstall --no-deps --no-index --find-links dist winevtx
|
|
186
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
187
|
+
python -m unittest discover -s tests -v
|
|
188
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
189
|
+
- name: Upload wheels
|
|
190
|
+
if: matrix.runner != 'windows-2022'
|
|
191
|
+
uses: actions/upload-artifact@v6
|
|
192
|
+
with:
|
|
193
|
+
name: wheels-windows-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.python }}
|
|
194
|
+
path: dist
|
|
195
|
+
|
|
196
|
+
macos:
|
|
197
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
198
|
+
strategy:
|
|
199
|
+
matrix:
|
|
200
|
+
platform:
|
|
201
|
+
- runner: macos-15-intel
|
|
202
|
+
target: x86_64
|
|
203
|
+
- runner: macos-latest
|
|
204
|
+
target: aarch64
|
|
205
|
+
steps:
|
|
206
|
+
- uses: actions/checkout@v6
|
|
207
|
+
- uses: actions/setup-python@v6
|
|
208
|
+
with:
|
|
209
|
+
python-version: "3.14"
|
|
210
|
+
- name: Build wheels
|
|
211
|
+
uses: PyO3/maturin-action@v1
|
|
212
|
+
with:
|
|
213
|
+
rust-toolchain: 1.88.0
|
|
214
|
+
target: ${{ matrix.platform.target }}
|
|
215
|
+
args: --release --out dist --find-interpreter
|
|
216
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
217
|
+
- name: Upload wheels
|
|
218
|
+
uses: actions/upload-artifact@v6
|
|
219
|
+
with:
|
|
220
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
221
|
+
path: dist
|
|
222
|
+
|
|
223
|
+
sdist:
|
|
224
|
+
runs-on: windows-latest
|
|
225
|
+
steps:
|
|
226
|
+
- uses: actions/checkout@v6
|
|
227
|
+
- uses: actions/setup-python@v6
|
|
228
|
+
with:
|
|
229
|
+
python-version: "3.13"
|
|
230
|
+
- uses: astral-sh/setup-uv@v7
|
|
231
|
+
- uses: PyO3/maturin-action@v1
|
|
232
|
+
with:
|
|
233
|
+
rust-toolchain: 1.88.0
|
|
234
|
+
command: sdist
|
|
235
|
+
args: --out dist
|
|
236
|
+
- name: Check distribution metadata
|
|
237
|
+
run: |
|
|
238
|
+
uv sync --locked --group release
|
|
239
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
240
|
+
uv run --group release python -m twine check --strict dist/*
|
|
241
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
242
|
+
python tools/validate_distribution.py dist
|
|
243
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
244
|
+
- name: Rebuild and test source distribution
|
|
245
|
+
run: |
|
|
246
|
+
$source = @(Get-ChildItem dist/*.tar.gz)
|
|
247
|
+
if ($source.Count -ne 1) { throw "Expected one source distribution" }
|
|
248
|
+
python -m pip wheel --no-deps --wheel-dir rebuilt $source[0].FullName
|
|
249
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
250
|
+
if (Test-Path tools/validate_distribution.py) {
|
|
251
|
+
python tools/validate_distribution.py rebuilt
|
|
252
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
253
|
+
}
|
|
254
|
+
python -m pip install --force-reinstall --no-deps --no-index --find-links rebuilt winevtx
|
|
255
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
256
|
+
python -m unittest discover -s tests -v
|
|
257
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
258
|
+
- uses: actions/upload-artifact@v6
|
|
259
|
+
with:
|
|
260
|
+
name: wheels-sdist
|
|
261
|
+
path: dist
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
tag:
|
|
9
|
+
description: "Release tag to build and publish, for example v1.0.0"
|
|
10
|
+
required: true
|
|
11
|
+
type: string
|
|
12
|
+
publish:
|
|
13
|
+
description: "Publish to PyPI after validation (disable for a rehearsal)"
|
|
14
|
+
required: true
|
|
15
|
+
type: boolean
|
|
16
|
+
default: true
|
|
17
|
+
|
|
18
|
+
# Serialize manual and release-triggered publication of the same version.
|
|
19
|
+
concurrency:
|
|
20
|
+
group: release-${{ github.event.release.tag_name || inputs.tag }}
|
|
21
|
+
cancel-in-progress: false
|
|
22
|
+
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
validate:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
outputs:
|
|
30
|
+
sha: ${{ steps.source.outputs.sha }}
|
|
31
|
+
modern_release: ${{ steps.capabilities.outputs.modern_release }}
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v6
|
|
34
|
+
with:
|
|
35
|
+
ref: refs/tags/${{ github.event.release.tag_name || inputs.tag }}
|
|
36
|
+
- uses: actions/setup-python@v6
|
|
37
|
+
with:
|
|
38
|
+
python-version: "3.13"
|
|
39
|
+
- name: Detect release tooling
|
|
40
|
+
id: capabilities
|
|
41
|
+
run: |
|
|
42
|
+
if [[ -f tools/validate_release.py && -f tools/validate_distribution.py && -d docs ]]; then
|
|
43
|
+
echo "modern_release=true" >> "$GITHUB_OUTPUT"
|
|
44
|
+
else
|
|
45
|
+
echo "modern_release=false" >> "$GITHUB_OUTPUT"
|
|
46
|
+
fi
|
|
47
|
+
- name: Validate modern release
|
|
48
|
+
if: steps.capabilities.outputs.modern_release == 'true'
|
|
49
|
+
env:
|
|
50
|
+
RELEASE_TAG: ${{ github.event.release.tag_name || inputs.tag }}
|
|
51
|
+
RELEASE_PRERELEASE: ${{ github.event_name == 'release' && toJSON(github.event.release.prerelease) || '' }}
|
|
52
|
+
run: python tools/validate_release.py
|
|
53
|
+
- name: Validate historical release version
|
|
54
|
+
if: steps.capabilities.outputs.modern_release != 'true'
|
|
55
|
+
env:
|
|
56
|
+
RELEASE_TAG: ${{ github.event.release.tag_name || inputs.tag }}
|
|
57
|
+
run: |
|
|
58
|
+
python - <<'PY'
|
|
59
|
+
import os
|
|
60
|
+
import pathlib
|
|
61
|
+
import re
|
|
62
|
+
|
|
63
|
+
tag = os.environ["RELEASE_TAG"].removeprefix("v")
|
|
64
|
+
cargo = pathlib.Path("Cargo.toml").read_text(encoding="utf-8")
|
|
65
|
+
match = re.search(r'^version\s*=\s*"([^"]+)"', cargo, re.MULTILINE)
|
|
66
|
+
if not match or match.group(1) != tag:
|
|
67
|
+
raise SystemExit(
|
|
68
|
+
f"RELEASE_TAG ({tag}) does not match Cargo.toml version "
|
|
69
|
+
f"({match.group(1) if match else 'missing'})"
|
|
70
|
+
)
|
|
71
|
+
PY
|
|
72
|
+
- name: Resolve immutable build commit
|
|
73
|
+
id: source
|
|
74
|
+
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
|
75
|
+
- uses: astral-sh/setup-uv@v7
|
|
76
|
+
- run: uv sync --locked
|
|
77
|
+
- run: uv run python -m unittest discover -s tests -v
|
|
78
|
+
- if: steps.capabilities.outputs.modern_release == 'true'
|
|
79
|
+
run: uv run --group docs mkdocs build --strict
|
|
80
|
+
|
|
81
|
+
linux:
|
|
82
|
+
needs: validate
|
|
83
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
84
|
+
strategy:
|
|
85
|
+
matrix:
|
|
86
|
+
platform:
|
|
87
|
+
- runner: ubuntu-22.04
|
|
88
|
+
target: x86_64
|
|
89
|
+
- runner: ubuntu-22.04
|
|
90
|
+
target: aarch64
|
|
91
|
+
- runner: ubuntu-22.04
|
|
92
|
+
target: armv7
|
|
93
|
+
- runner: ubuntu-22.04
|
|
94
|
+
target: ppc64le
|
|
95
|
+
steps:
|
|
96
|
+
- uses: actions/checkout@v6
|
|
97
|
+
with:
|
|
98
|
+
ref: ${{ needs.validate.outputs.sha }}
|
|
99
|
+
- uses: actions/setup-python@v6
|
|
100
|
+
with:
|
|
101
|
+
python-version: "3.14"
|
|
102
|
+
- uses: PyO3/maturin-action@v1
|
|
103
|
+
with:
|
|
104
|
+
rust-toolchain: 1.88.0
|
|
105
|
+
target: ${{ matrix.platform.target }}
|
|
106
|
+
args: --release --out dist --find-interpreter
|
|
107
|
+
manylinux: auto
|
|
108
|
+
- uses: actions/upload-artifact@v6
|
|
109
|
+
with:
|
|
110
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
111
|
+
path: dist
|
|
112
|
+
|
|
113
|
+
musllinux:
|
|
114
|
+
needs: validate
|
|
115
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
116
|
+
strategy:
|
|
117
|
+
matrix:
|
|
118
|
+
platform:
|
|
119
|
+
- runner: ubuntu-22.04
|
|
120
|
+
target: x86_64
|
|
121
|
+
- runner: ubuntu-22.04
|
|
122
|
+
target: aarch64
|
|
123
|
+
- runner: ubuntu-22.04
|
|
124
|
+
target: armv7
|
|
125
|
+
steps:
|
|
126
|
+
- uses: actions/checkout@v6
|
|
127
|
+
with:
|
|
128
|
+
ref: ${{ needs.validate.outputs.sha }}
|
|
129
|
+
- uses: actions/setup-python@v6
|
|
130
|
+
with:
|
|
131
|
+
python-version: "3.14"
|
|
132
|
+
- uses: PyO3/maturin-action@v1
|
|
133
|
+
with:
|
|
134
|
+
rust-toolchain: 1.88.0
|
|
135
|
+
target: ${{ matrix.platform.target }}
|
|
136
|
+
args: --release --out dist --find-interpreter
|
|
137
|
+
manylinux: musllinux_1_2
|
|
138
|
+
- uses: actions/upload-artifact@v6
|
|
139
|
+
with:
|
|
140
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
141
|
+
path: dist
|
|
142
|
+
|
|
143
|
+
windows:
|
|
144
|
+
needs: validate
|
|
145
|
+
runs-on: ${{ matrix.runner }}
|
|
146
|
+
strategy:
|
|
147
|
+
matrix:
|
|
148
|
+
include:
|
|
149
|
+
- runner: windows-latest
|
|
150
|
+
target: x64
|
|
151
|
+
rust_target: x86_64-pc-windows-msvc
|
|
152
|
+
python_arch: x64
|
|
153
|
+
python: "3.9"
|
|
154
|
+
- runner: windows-latest
|
|
155
|
+
target: x64
|
|
156
|
+
rust_target: x86_64-pc-windows-msvc
|
|
157
|
+
python_arch: x64
|
|
158
|
+
python: "3.10"
|
|
159
|
+
- runner: windows-latest
|
|
160
|
+
target: x64
|
|
161
|
+
rust_target: x86_64-pc-windows-msvc
|
|
162
|
+
python_arch: x64
|
|
163
|
+
python: "3.11"
|
|
164
|
+
- runner: windows-latest
|
|
165
|
+
target: x64
|
|
166
|
+
rust_target: x86_64-pc-windows-msvc
|
|
167
|
+
python_arch: x64
|
|
168
|
+
python: "3.12"
|
|
169
|
+
- runner: windows-latest
|
|
170
|
+
target: x64
|
|
171
|
+
rust_target: x86_64-pc-windows-msvc
|
|
172
|
+
python_arch: x64
|
|
173
|
+
python: "3.13"
|
|
174
|
+
- runner: windows-latest
|
|
175
|
+
target: x64
|
|
176
|
+
rust_target: x86_64-pc-windows-msvc
|
|
177
|
+
python_arch: x64
|
|
178
|
+
python: "3.14"
|
|
179
|
+
- runner: windows-2022
|
|
180
|
+
target: x64
|
|
181
|
+
rust_target: x86_64-pc-windows-msvc
|
|
182
|
+
python_arch: x64
|
|
183
|
+
python: "3.13"
|
|
184
|
+
- runner: windows-11-arm
|
|
185
|
+
target: aarch64
|
|
186
|
+
rust_target: aarch64-pc-windows-msvc
|
|
187
|
+
python_arch: arm64
|
|
188
|
+
python: "3.13"
|
|
189
|
+
steps:
|
|
190
|
+
- uses: actions/checkout@v6
|
|
191
|
+
with:
|
|
192
|
+
ref: ${{ needs.validate.outputs.sha }}
|
|
193
|
+
- uses: actions/setup-python@v6
|
|
194
|
+
with:
|
|
195
|
+
python-version: ${{ matrix.python }}
|
|
196
|
+
architecture: ${{ matrix.python_arch }}
|
|
197
|
+
- uses: PyO3/maturin-action@v1
|
|
198
|
+
with:
|
|
199
|
+
rust-toolchain: 1.88.0
|
|
200
|
+
target: ${{ matrix.target }}
|
|
201
|
+
args: --release --locked --out dist --interpreter python
|
|
202
|
+
- name: Test native module
|
|
203
|
+
run: |
|
|
204
|
+
$env:PYO3_PYTHON = python -c "import sys; print(sys.executable)"
|
|
205
|
+
cargo test --locked --target ${{ matrix.rust_target }}
|
|
206
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
207
|
+
- name: Validate wheel contents
|
|
208
|
+
if: needs.validate.outputs.modern_release == 'true'
|
|
209
|
+
run: python tools/validate_distribution.py dist
|
|
210
|
+
- name: Test installed Windows wheel
|
|
211
|
+
run: |
|
|
212
|
+
python -m pip install --force-reinstall --no-deps --no-index --find-links dist winevtx
|
|
213
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
214
|
+
python -m unittest discover -s tests -v
|
|
215
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
216
|
+
- uses: actions/upload-artifact@v6
|
|
217
|
+
if: matrix.runner != 'windows-2022'
|
|
218
|
+
with:
|
|
219
|
+
name: wheels-windows-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.python }}
|
|
220
|
+
path: dist
|
|
221
|
+
|
|
222
|
+
macos:
|
|
223
|
+
needs: validate
|
|
224
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
225
|
+
strategy:
|
|
226
|
+
matrix:
|
|
227
|
+
platform:
|
|
228
|
+
- runner: macos-15-intel
|
|
229
|
+
target: x86_64
|
|
230
|
+
- runner: macos-latest
|
|
231
|
+
target: aarch64
|
|
232
|
+
steps:
|
|
233
|
+
- uses: actions/checkout@v6
|
|
234
|
+
with:
|
|
235
|
+
ref: ${{ needs.validate.outputs.sha }}
|
|
236
|
+
- uses: actions/setup-python@v6
|
|
237
|
+
with:
|
|
238
|
+
python-version: "3.14"
|
|
239
|
+
- uses: PyO3/maturin-action@v1
|
|
240
|
+
with:
|
|
241
|
+
rust-toolchain: 1.88.0
|
|
242
|
+
target: ${{ matrix.platform.target }}
|
|
243
|
+
args: --release --out dist --find-interpreter
|
|
244
|
+
- uses: actions/upload-artifact@v6
|
|
245
|
+
with:
|
|
246
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
247
|
+
path: dist
|
|
248
|
+
|
|
249
|
+
sdist:
|
|
250
|
+
needs: validate
|
|
251
|
+
runs-on: windows-latest
|
|
252
|
+
steps:
|
|
253
|
+
- uses: actions/checkout@v6
|
|
254
|
+
with:
|
|
255
|
+
ref: ${{ needs.validate.outputs.sha }}
|
|
256
|
+
- uses: actions/setup-python@v6
|
|
257
|
+
with:
|
|
258
|
+
python-version: "3.13"
|
|
259
|
+
- uses: astral-sh/setup-uv@v7
|
|
260
|
+
- uses: PyO3/maturin-action@v1
|
|
261
|
+
with:
|
|
262
|
+
rust-toolchain: 1.88.0
|
|
263
|
+
command: sdist
|
|
264
|
+
args: --out dist
|
|
265
|
+
- name: Check distribution metadata
|
|
266
|
+
if: needs.validate.outputs.modern_release == 'true'
|
|
267
|
+
run: |
|
|
268
|
+
uv sync --locked --group release
|
|
269
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
270
|
+
uv run --group release python -m twine check --strict dist/*
|
|
271
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
272
|
+
python tools/validate_distribution.py dist
|
|
273
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
274
|
+
- name: Check historical source distribution
|
|
275
|
+
if: needs.validate.outputs.modern_release != 'true'
|
|
276
|
+
run: python -m pip install --disable-pip-version-check twine; python -m twine check dist/*
|
|
277
|
+
- name: Rebuild and test source distribution
|
|
278
|
+
run: |
|
|
279
|
+
$source = @(Get-ChildItem dist/*.tar.gz)
|
|
280
|
+
if ($source.Count -ne 1) { throw "Expected one source distribution" }
|
|
281
|
+
python -m pip wheel --no-deps --wheel-dir rebuilt $source[0].FullName
|
|
282
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
283
|
+
if (Test-Path tools/validate_distribution.py) {
|
|
284
|
+
python tools/validate_distribution.py rebuilt
|
|
285
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
286
|
+
}
|
|
287
|
+
python -m pip install --force-reinstall --no-deps --no-index --find-links rebuilt winevtx
|
|
288
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
289
|
+
python -m unittest discover -s tests -v
|
|
290
|
+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
291
|
+
- uses: actions/upload-artifact@v6
|
|
292
|
+
with:
|
|
293
|
+
name: wheels-sdist
|
|
294
|
+
path: dist
|
|
295
|
+
|
|
296
|
+
publish:
|
|
297
|
+
if: github.event_name == 'release' || inputs.publish
|
|
298
|
+
runs-on: ubuntu-latest
|
|
299
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
300
|
+
environment:
|
|
301
|
+
name: pypi
|
|
302
|
+
url: https://pypi.org/p/winevtx
|
|
303
|
+
permissions:
|
|
304
|
+
id-token: write
|
|
305
|
+
steps:
|
|
306
|
+
- uses: actions/download-artifact@v7
|
|
307
|
+
- uses: astral-sh/setup-uv@v7
|
|
308
|
+
- name: Publish to PyPI
|
|
309
|
+
run: uv publish --trusted-publishing always --check-url https://pypi.org/simple/ "wheels-*/*"
|
winevtx-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/target
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
*.pyd
|
|
11
|
+
*.pdb
|
|
12
|
+
*.dll
|
|
13
|
+
|
|
14
|
+
# Distribution / packaging
|
|
15
|
+
.Python
|
|
16
|
+
.venv/
|
|
17
|
+
env/
|
|
18
|
+
bin/
|
|
19
|
+
build/
|
|
20
|
+
develop-eggs/
|
|
21
|
+
dist/
|
|
22
|
+
eggs/
|
|
23
|
+
lib/
|
|
24
|
+
lib64/
|
|
25
|
+
parts/
|
|
26
|
+
sdist/
|
|
27
|
+
var/
|
|
28
|
+
include/
|
|
29
|
+
man/
|
|
30
|
+
venv/
|
|
31
|
+
*.egg-info/
|
|
32
|
+
.installed.cfg
|
|
33
|
+
*.egg
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
pip-selfcheck.json
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.coverage
|
|
44
|
+
.cache
|
|
45
|
+
nosetests.xml
|
|
46
|
+
coverage.xml
|
|
47
|
+
|
|
48
|
+
# Translations
|
|
49
|
+
*.mo
|
|
50
|
+
|
|
51
|
+
# Mr Developer
|
|
52
|
+
.mr.developer.cfg
|
|
53
|
+
.project
|
|
54
|
+
.pydevproject
|
|
55
|
+
|
|
56
|
+
# Rope
|
|
57
|
+
.ropeproject
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
*.pot
|
|
62
|
+
|
|
63
|
+
.DS_Store
|
|
64
|
+
|
|
65
|
+
# Sphinx documentation
|
|
66
|
+
docs/_build/
|
|
67
|
+
|
|
68
|
+
# PyCharm
|
|
69
|
+
.idea/
|
|
70
|
+
|
|
71
|
+
# VSCode
|
|
72
|
+
.vscode/
|
|
73
|
+
|
|
74
|
+
# Pyenv
|
|
75
|
+
.python-version
|
|
76
|
+
|
|
77
|
+
# Temp files
|
|
78
|
+
temp/
|
|
File without changes
|
winevtx-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Coding agent instructions
|
|
2
|
+
|
|
3
|
+
- Keep changes focused and compatible with Python 3.9–3.14.
|
|
4
|
+
- Native Rust code is in `src/`; the Python package and its stubs are in
|
|
5
|
+
`python/winevtx/`. Keep their public interfaces synchronized.
|
|
6
|
+
- Live Windows Event Log queries require Windows. Do not make the offline EVTX
|
|
7
|
+
parser assume that it runs on Windows.
|
|
8
|
+
- Do not use real EVTX records or include sensitive data in tests or examples.
|
|
9
|
+
- Validate Rust changes with `cargo fmt --check`, Clippy, and `cargo test --locked`.
|
|
10
|
+
- Validate Python changes with
|
|
11
|
+
`uv run --locked python -m unittest discover -s tests -v`.
|
|
12
|
+
- For documentation changes, run
|
|
13
|
+
`uv run --locked --group docs mkdocs build --strict`.
|
|
14
|
+
- For a release, keep `Cargo.toml`, `Cargo.lock`, the changelog, tag, and
|
|
15
|
+
distribution metadata consistent; use the validators in `tools/`.
|