serpentype 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.
- serpentype-0.1.0/.github/workflows/wheels.yml +39 -0
- serpentype-0.1.0/.gitignore +5 -0
- serpentype-0.1.0/Cargo.lock +1017 -0
- serpentype-0.1.0/Cargo.toml +24 -0
- serpentype-0.1.0/LICENSE +21 -0
- serpentype-0.1.0/PKG-INFO +9 -0
- serpentype-0.1.0/README.md +43 -0
- serpentype-0.1.0/benchmark-results.jsonl +2 -0
- serpentype-0.1.0/benchmarks/page_definition_stress.py +496 -0
- serpentype-0.1.0/benchmarks/verify_page_definition_stress.py +165 -0
- serpentype-0.1.0/benchmarks.py +97 -0
- serpentype-0.1.0/docs/architecture.md +18 -0
- serpentype-0.1.0/docs/benchmark.md +33 -0
- serpentype-0.1.0/docs/capabilities.md +28 -0
- serpentype-0.1.0/docs/dependencies.md +7 -0
- serpentype-0.1.0/docs/weasyprint_compat.md +34 -0
- serpentype-0.1.0/examples/invoice.py +19 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/assets/chart.jpg +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/assets/qr.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/comparison.md +54 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/fixture_manifest.json +56 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/load.csv +7 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/compat_qr_placeholder.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/margin_boxes_six_demo_page1.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/margin_boxes_six_demo_page2.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-01.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-02.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-03.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-04.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-05.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-06.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-07.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-08.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-09.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-10.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-11.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-12.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-13.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-14.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-15.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-16.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-17.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype-18.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype_contact.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype_first_detail.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype_landscape_detail.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype_landscape_kk_detail.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype_last_detail.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/serpentype_section5_detail.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-01.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-02.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-03.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-04.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-05.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-06.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-07.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-08.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-09.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-10.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-11.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-12.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-13.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-14.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-15.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint-16.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint_contact.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/qa/weasyprint_landscape_detail.png +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/rendered_page_definition.css +213 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/results.json +340 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/runs.csv +13 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/serpentype_stderr.log +0 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/stress_template.html +1 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/validation.json +258 -0
- serpentype-0.1.0/output/benchmark/page_definition_stress/weasyprint_stderr.log +0 -0
- serpentype-0.1.0/pyproject.toml +19 -0
- serpentype-0.1.0/serpentype/__init__.py +13 -0
- serpentype-0.1.0/serpentype/assets/NotoSans-Bold.ttf +0 -0
- serpentype-0.1.0/serpentype/assets/NotoSans-Regular.ttf +0 -0
- serpentype-0.1.0/serpentype/assets/OFL.txt +94 -0
- serpentype-0.1.0/serpentype/compat.py +317 -0
- serpentype-0.1.0/serpentype/text/__init__.py +1 -0
- serpentype-0.1.0/serpentype/text/fonts.py +5 -0
- serpentype-0.1.0/src/css.rs +971 -0
- serpentype-0.1.0/src/font.rs +236 -0
- serpentype-0.1.0/src/html.rs +234 -0
- serpentype-0.1.0/src/layout.rs +1134 -0
- serpentype-0.1.0/src/lib.rs +30 -0
- serpentype-0.1.0/src/pdf.rs +346 -0
- serpentype-0.1.0/src/python.rs +142 -0
- serpentype-0.1.0/tests/dom.rs +26 -0
- serpentype-0.1.0/tests/fixtures/blue.jpg +0 -0
- serpentype-0.1.0/tests/fixtures/blue.png +0 -0
- serpentype-0.1.0/tests/page_definition.rs +238 -0
- serpentype-0.1.0/tests/test_api.py +234 -0
- serpentype-0.1.0/tests/test_weasy_compat.py +89 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: wheels
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
strategy:
|
|
9
|
+
fail-fast: false
|
|
10
|
+
matrix:
|
|
11
|
+
include:
|
|
12
|
+
- os: ubuntu-22.04
|
|
13
|
+
interpreter: python3.10
|
|
14
|
+
- os: macos-15
|
|
15
|
+
interpreter: python
|
|
16
|
+
- os: macos-15-intel
|
|
17
|
+
interpreter: python
|
|
18
|
+
- os: windows-2022
|
|
19
|
+
interpreter: python
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: '3.13'
|
|
26
|
+
- uses: PyO3/maturin-action@v1
|
|
27
|
+
with:
|
|
28
|
+
command: build
|
|
29
|
+
args: --release --locked -i ${{ matrix.interpreter }}
|
|
30
|
+
manylinux: '2_28'
|
|
31
|
+
- name: Install and smoke test wheel
|
|
32
|
+
shell: bash
|
|
33
|
+
run: |
|
|
34
|
+
python -c 'import glob, subprocess, sys; wheels=glob.glob("target/wheels/*.whl"); assert wheels; subprocess.check_call([sys.executable,"-m","pip","install","--no-deps",wheels[0]])'
|
|
35
|
+
python -I -c 'import serpentype; f=serpentype.FontRegistry(); f.register_file(serpentype.bundled_font_path(),family="Noto Sans"); d=serpentype.Renderer(fonts=f).layout("<p>Привет</p>"); assert d.page_count==1 and d.to_pdf().startswith(b"%PDF")'
|
|
36
|
+
- uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: wheels-${{ matrix.os }}
|
|
39
|
+
path: target/wheels/*.whl
|