office2pdf-python 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.
- office2pdf_python-0.1.0/.github/workflows/ci.yml +83 -0
- office2pdf_python-0.1.0/.github/workflows/release.yml +100 -0
- office2pdf_python-0.1.0/.gitignore +20 -0
- office2pdf_python-0.1.0/Cargo.lock +4304 -0
- office2pdf_python-0.1.0/Cargo.toml +17 -0
- office2pdf_python-0.1.0/LICENSE +201 -0
- office2pdf_python-0.1.0/PKG-INFO +160 -0
- office2pdf_python-0.1.0/README.md +134 -0
- office2pdf_python-0.1.0/office2pdf/__init__.py +143 -0
- office2pdf_python-0.1.0/office2pdf/_native.pyi +9 -0
- office2pdf_python-0.1.0/office2pdf/cli.py +31 -0
- office2pdf_python-0.1.0/office2pdf/py.typed +0 -0
- office2pdf_python-0.1.0/pyproject.toml +59 -0
- office2pdf_python-0.1.0/src/lib.rs +202 -0
- office2pdf_python-0.1.0/tests/test_cli.py +40 -0
- office2pdf_python-0.1.0/tests/test_public_api.py +133 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
PIP_NO_CACHE_DIR: "1"
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
lint:
|
|
21
|
+
name: Rust lint
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v6
|
|
25
|
+
|
|
26
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
27
|
+
with:
|
|
28
|
+
components: rustfmt, clippy
|
|
29
|
+
|
|
30
|
+
- name: Rust fmt
|
|
31
|
+
run: cargo fmt --check
|
|
32
|
+
|
|
33
|
+
- name: Rust clippy
|
|
34
|
+
run: cargo clippy --all-targets -- -D warnings
|
|
35
|
+
|
|
36
|
+
test:
|
|
37
|
+
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
|
|
38
|
+
runs-on: ${{ matrix.os }}
|
|
39
|
+
strategy:
|
|
40
|
+
fail-fast: false
|
|
41
|
+
matrix:
|
|
42
|
+
os: [ubuntu-latest, macos-latest, windows-2022]
|
|
43
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
44
|
+
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v6
|
|
47
|
+
|
|
48
|
+
- uses: actions/setup-python@v6
|
|
49
|
+
with:
|
|
50
|
+
python-version: ${{ matrix.python-version }}
|
|
51
|
+
allow-prereleases: true
|
|
52
|
+
|
|
53
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
54
|
+
|
|
55
|
+
- name: Install test tooling
|
|
56
|
+
run: python -m pip install --upgrade pip maturin pytest
|
|
57
|
+
|
|
58
|
+
- name: Build and install editable package
|
|
59
|
+
run: python -m pip install -e .
|
|
60
|
+
|
|
61
|
+
- name: Run pytest
|
|
62
|
+
run: python -m pytest
|
|
63
|
+
|
|
64
|
+
- name: Import smoke test
|
|
65
|
+
run: python -c "import office2pdf; print(office2pdf.__version__)"
|
|
66
|
+
|
|
67
|
+
wheel-smoke:
|
|
68
|
+
name: Wheel smoke
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v6
|
|
72
|
+
|
|
73
|
+
- uses: actions/setup-python@v6
|
|
74
|
+
with:
|
|
75
|
+
python-version: "3.12"
|
|
76
|
+
|
|
77
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
78
|
+
|
|
79
|
+
- name: Install maturin
|
|
80
|
+
run: python -m pip install --upgrade pip maturin
|
|
81
|
+
|
|
82
|
+
- name: Build wheel
|
|
83
|
+
run: maturin build --locked --release --compatibility pypi
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: false
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
PIP_NO_CACHE_DIR: "1"
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
wheels:
|
|
21
|
+
name: Wheels / ${{ matrix.os }}
|
|
22
|
+
runs-on: ${{ matrix.os }}
|
|
23
|
+
strategy:
|
|
24
|
+
fail-fast: false
|
|
25
|
+
matrix:
|
|
26
|
+
os: [ubuntu-latest, macos-latest, windows-2022]
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v6
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-python@v6
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.12"
|
|
34
|
+
|
|
35
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
36
|
+
|
|
37
|
+
- uses: PyO3/maturin-action@v1
|
|
38
|
+
with:
|
|
39
|
+
command: build
|
|
40
|
+
args: --release --locked --compatibility pypi --out dist
|
|
41
|
+
sccache: true
|
|
42
|
+
manylinux: auto
|
|
43
|
+
|
|
44
|
+
- uses: actions/upload-artifact@v6
|
|
45
|
+
with:
|
|
46
|
+
name: wheels-${{ matrix.os }}
|
|
47
|
+
path: dist/*
|
|
48
|
+
|
|
49
|
+
sdist:
|
|
50
|
+
name: Source distribution
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v6
|
|
54
|
+
- uses: actions/setup-python@v6
|
|
55
|
+
with:
|
|
56
|
+
python-version: "3.12"
|
|
57
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
58
|
+
- uses: PyO3/maturin-action@v1
|
|
59
|
+
with:
|
|
60
|
+
command: sdist
|
|
61
|
+
args: --out dist
|
|
62
|
+
- uses: actions/upload-artifact@v6
|
|
63
|
+
with:
|
|
64
|
+
name: sdist
|
|
65
|
+
path: dist/*
|
|
66
|
+
|
|
67
|
+
publish:
|
|
68
|
+
name: Publish to PyPI
|
|
69
|
+
needs: [wheels, sdist]
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
permissions:
|
|
72
|
+
contents: read
|
|
73
|
+
id-token: write
|
|
74
|
+
environment:
|
|
75
|
+
name: pypi
|
|
76
|
+
url: https://pypi.org/p/office2pdf-python
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/download-artifact@v6
|
|
79
|
+
with:
|
|
80
|
+
path: dist
|
|
81
|
+
merge-multiple: true
|
|
82
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
83
|
+
with:
|
|
84
|
+
packages-dir: dist
|
|
85
|
+
|
|
86
|
+
github-release:
|
|
87
|
+
name: Create GitHub Release
|
|
88
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
89
|
+
needs: [wheels, sdist]
|
|
90
|
+
runs-on: ubuntu-latest
|
|
91
|
+
permissions:
|
|
92
|
+
contents: write
|
|
93
|
+
steps:
|
|
94
|
+
- uses: actions/download-artifact@v6
|
|
95
|
+
with:
|
|
96
|
+
path: dist
|
|
97
|
+
merge-multiple: true
|
|
98
|
+
- uses: softprops/action-gh-release@v2
|
|
99
|
+
with:
|
|
100
|
+
files: dist/*
|