libiso 0.0.8__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.
- libiso-0.0.8/.github/workflows/release.yml +151 -0
- libiso-0.0.8/.github/workflows/tests.yml +88 -0
- libiso-0.0.8/.gitignore +14 -0
- libiso-0.0.8/Cargo.lock +816 -0
- libiso-0.0.8/Cargo.toml +36 -0
- libiso-0.0.8/License +5 -0
- libiso-0.0.8/PKG-INFO +58 -0
- libiso-0.0.8/Readme.md +50 -0
- libiso-0.0.8/libiso/__init__.py +1 -0
- libiso-0.0.8/libiso/libiso.py +62 -0
- libiso-0.0.8/pyproject.toml +15 -0
- libiso-0.0.8/src/image_parser.rs +307 -0
- libiso-0.0.8/src/lib.rs +24 -0
- libiso-0.0.8/src/removable_drives.rs +97 -0
- libiso-0.0.8/src/test_utils.rs +56 -0
- libiso-0.0.8/tests/test_inspect_image.py +84 -0
- libiso-0.0.8/tests/test_removable_drives.py +43 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build_wheels:
|
|
14
|
+
name: Build wheels (${{ matrix.name }})
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
include:
|
|
19
|
+
- name: Linux x86
|
|
20
|
+
os: ubuntu-latest
|
|
21
|
+
target: x86_64
|
|
22
|
+
manylinux: manylinux_2_28
|
|
23
|
+
|
|
24
|
+
- name: Musl x86
|
|
25
|
+
os: ubuntu-latest
|
|
26
|
+
target: x86_64
|
|
27
|
+
manylinux: musllinux_1_2
|
|
28
|
+
|
|
29
|
+
- name: Linux ARM64
|
|
30
|
+
os: ubuntu-latest
|
|
31
|
+
target: aarch64
|
|
32
|
+
manylinux: manylinux_2_28
|
|
33
|
+
|
|
34
|
+
- name: MacOS Universal
|
|
35
|
+
os: macos-latest
|
|
36
|
+
target: universal2-apple-darwin
|
|
37
|
+
|
|
38
|
+
- name: Windows
|
|
39
|
+
os: windows-latest
|
|
40
|
+
target: x64
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v6
|
|
44
|
+
|
|
45
|
+
- name: Build wheels
|
|
46
|
+
uses: PyO3/maturin-action@v1
|
|
47
|
+
with:
|
|
48
|
+
target: ${{ matrix.target }}
|
|
49
|
+
manylinux: ${{ matrix.manylinux }}
|
|
50
|
+
args: --release --out dist --find-interpreter
|
|
51
|
+
sccache: 'true'
|
|
52
|
+
|
|
53
|
+
- name: Upload wheels
|
|
54
|
+
uses: actions/upload-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: wheels-${{ matrix.name }}
|
|
57
|
+
path: dist
|
|
58
|
+
|
|
59
|
+
build_wheels_freebsd:
|
|
60
|
+
name: Build FreeBSD wheels
|
|
61
|
+
runs-on: ubuntu-latest
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v6
|
|
64
|
+
- name: Build in FreeBSD VM
|
|
65
|
+
uses: vmactions/freebsd-vm@v1
|
|
66
|
+
with:
|
|
67
|
+
usesh: true
|
|
68
|
+
prepare: pkg install -y rust python3 git
|
|
69
|
+
run: |
|
|
70
|
+
python3 -m venv venv
|
|
71
|
+
. venv/bin/activate
|
|
72
|
+
pip install maturin
|
|
73
|
+
maturin build --release --out dist --find-interpreter
|
|
74
|
+
|
|
75
|
+
- name: Upload FreeBSD wheels
|
|
76
|
+
uses: actions/upload-artifact@v4
|
|
77
|
+
with:
|
|
78
|
+
name: wheels-freebsd
|
|
79
|
+
path: dist
|
|
80
|
+
|
|
81
|
+
build_sdist:
|
|
82
|
+
name: Build source distribution
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/checkout@v6
|
|
86
|
+
- name: Build sdist
|
|
87
|
+
uses: PyO3/maturin-action@v1
|
|
88
|
+
with:
|
|
89
|
+
command: sdist
|
|
90
|
+
args: --out dist
|
|
91
|
+
- name: Upload sdist
|
|
92
|
+
uses: actions/upload-artifact@v4
|
|
93
|
+
with:
|
|
94
|
+
name: sdist
|
|
95
|
+
path: dist
|
|
96
|
+
|
|
97
|
+
publish:
|
|
98
|
+
name: Publish to PyPI + GitHub Release
|
|
99
|
+
needs: [build_wheels, build_sdist, build_wheels_freebsd]
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
environment: pypi
|
|
102
|
+
permissions:
|
|
103
|
+
contents: write
|
|
104
|
+
id-token: write
|
|
105
|
+
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v6
|
|
108
|
+
|
|
109
|
+
- uses: actions/download-artifact@v4
|
|
110
|
+
with:
|
|
111
|
+
name: sdist
|
|
112
|
+
path: dist
|
|
113
|
+
|
|
114
|
+
# Explicit downloads - PyPI allowed platforms
|
|
115
|
+
- uses: actions/download-artifact@v4
|
|
116
|
+
with:
|
|
117
|
+
name: wheels-Linux x86
|
|
118
|
+
path: dist
|
|
119
|
+
- uses: actions/download-artifact@v4
|
|
120
|
+
with:
|
|
121
|
+
name: wheels-Musl x86
|
|
122
|
+
path: dist
|
|
123
|
+
- uses: actions/download-artifact@v4
|
|
124
|
+
with:
|
|
125
|
+
name: wheels-Linux ARM64
|
|
126
|
+
path: dist
|
|
127
|
+
- uses: actions/download-artifact@v4
|
|
128
|
+
with:
|
|
129
|
+
name: wheels-MacOS Universal
|
|
130
|
+
path: dist
|
|
131
|
+
- uses: actions/download-artifact@v4
|
|
132
|
+
with:
|
|
133
|
+
name: wheels-Windows
|
|
134
|
+
path: dist
|
|
135
|
+
|
|
136
|
+
- name: Publish to PyPI
|
|
137
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
138
|
+
|
|
139
|
+
# Download FreeBSD AFTER PyPI publish so it only attaches to GitHub Release
|
|
140
|
+
- uses: actions/download-artifact@v4
|
|
141
|
+
with:
|
|
142
|
+
name: wheels-freebsd
|
|
143
|
+
path: dist
|
|
144
|
+
|
|
145
|
+
# GitHub Release
|
|
146
|
+
- name: GitHub Release
|
|
147
|
+
uses: softprops/action-gh-release@v2
|
|
148
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
149
|
+
with:
|
|
150
|
+
files: dist/*
|
|
151
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
# Linux, Windows, MacOS
|
|
13
|
+
test-standard:
|
|
14
|
+
name: Test (${{ matrix.os }})
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
20
|
+
python-version: ['3.12', '3.13', '3.14', '3.14t']
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
|
|
25
|
+
- name: Set up Rust
|
|
26
|
+
run: rustup update stable && rustup default stable
|
|
27
|
+
|
|
28
|
+
- uses: actions/setup-python@v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Install build dependencies
|
|
33
|
+
run: pip install maturin
|
|
34
|
+
|
|
35
|
+
- name: Build Rust library and install
|
|
36
|
+
shell: bash
|
|
37
|
+
run: |
|
|
38
|
+
maturin build --release -i python
|
|
39
|
+
pip install target/wheels/*.whl
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
run: |
|
|
43
|
+
cd tests
|
|
44
|
+
python -m unittest discover .
|
|
45
|
+
|
|
46
|
+
# Alpine Linux (Musl)
|
|
47
|
+
test-alpine:
|
|
48
|
+
name: Test (Alpine/Musl)
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
container:
|
|
51
|
+
image: python:3.14-alpine
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v6
|
|
54
|
+
- name: Install Alpine build deps
|
|
55
|
+
run: apk add --no-cache gcc musl-dev cargo patchelf
|
|
56
|
+
|
|
57
|
+
- name: Install dependencies
|
|
58
|
+
run: pip install maturin
|
|
59
|
+
|
|
60
|
+
- name: Build Rust library and install
|
|
61
|
+
run: |
|
|
62
|
+
maturin build --release
|
|
63
|
+
pip install target/wheels/*.whl
|
|
64
|
+
|
|
65
|
+
- name: Run tests
|
|
66
|
+
run: |
|
|
67
|
+
cd tests
|
|
68
|
+
python -m unittest discover .
|
|
69
|
+
|
|
70
|
+
#FreeBSD
|
|
71
|
+
test-freebsd:
|
|
72
|
+
name: Test (FreeBSD)
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v6
|
|
76
|
+
- name: Test in FreeBSD VM
|
|
77
|
+
uses: vmactions/freebsd-vm@v1
|
|
78
|
+
with:
|
|
79
|
+
usesh: true
|
|
80
|
+
prepare: pkg install -y rust python314 git
|
|
81
|
+
run: |
|
|
82
|
+
python3.14 -m venv venv
|
|
83
|
+
. venv/bin/activate
|
|
84
|
+
pip install maturin
|
|
85
|
+
maturin build --release
|
|
86
|
+
pip install target/wheels/*.whl
|
|
87
|
+
cd tests
|
|
88
|
+
python -m unittest discover .
|
libiso-0.0.8/.gitignore
ADDED