Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5 devel branch #307

Draft
wants to merge 306 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
306 commits
Select commit Hold shift + click to select a range
b5367c0
textpage/search: allow passthrough of caller flags
mara004 May 1, 2024
1ce93c3
cli/pageobjects: skip empty pages
mara004 May 1, 2024
df23f6c
Remove planned changes
mara004 May 1, 2024
d577349
minor readme improvements
mara004 May 5, 2024
640e80a
CLI/arrange: rm pointless var, better release implicit fh
mara004 May 5, 2024
8437cfd
CLI: clean up some comments
mara004 May 5, 2024
bdcd274
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 6, 2024
87a6547
Prepare for future release
mara004 May 6, 2024
1886f89
retain get_text_range() check for now
mara004 May 6, 2024
027b909
round off docs for `PdfBitmap.new_native()`
mara004 May 6, 2024
2f135e6
PdfImage.extract(): fix for filenames containing non-extension dot
mara004 May 6, 2024
cdc0c06
CLI/extract-images: increase default recursion depth
mara004 May 6, 2024
0f0dfb1
update changelog
mara004 May 6, 2024
37bde64
PdfImage.extract(): fix for filenames containing non-extension dot
mara004 May 6, 2024
863d85d
get_text_range(): adapt allocation to pdfium version
mara004 May 6, 2024
486a7af
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 6, 2024
555ba5e
PdfImage.extract(): slightly simplify path handling
mara004 May 7, 2024
d818677
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 7, 2024
c9115bd
slightly simplify get_filters(skip_simple=True)
mara004 May 7, 2024
b1e44f4
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 9, 2024
247873f
Update changelog according to backports
mara004 May 9, 2024
377b45e
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 9, 2024
9e509e7
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 9, 2024
72b60ed
consts: clean up comment
mara004 May 10, 2024
1eab5cb
PdfPage.get_objects(): increase default recursion depth
mara004 May 13, 2024
ca9c964
sligthly update docs for PdfImage.extract() again
mara004 May 13, 2024
f75e075
Add warning about textpage handles when removing text objects
mara004 May 13, 2024
bc8e18c
Explain PdfObject.close()
mara004 May 13, 2024
9a02214
Autoclose textpage handles when removing text pageobject
mara004 May 13, 2024
e38085f
Add some tasks regarding AutoCloseable.close()
mara004 May 13, 2024
d232689
Consistently call `PdfObject` `pageobject` in docs
mara004 May 13, 2024
428f4c3
PdfiumError: don't state the obvious
mara004 May 13, 2024
7cf09d8
docs/conf.py: comment out namedtuple handler
mara004 May 13, 2024
5c66a32
PdfBitmap: slightly improve docs for `new_foreign{_simple}()`
mara004 May 14, 2024
c8e4a06
Handle GetCharIndexAtPos() conforming with pdfium docs
mara004 May 15, 2024
14a7fbb
PdfPage.get_objects(): don't register objects as kids
mara004 May 18, 2024
992e9fe
abstractly reformulate bases task
mara004 May 18, 2024
d8515cb
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 18, 2024
439989f
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 18, 2024
59d0e99
CLI/extract-images: Fix another dotted filepath blunder
mara004 May 27, 2024
af81b47
Remove separate `_textpage_wrefs`
mara004 May 31, 2024
1347730
Merge remote-tracking branch 'origin/main' into devel_new
mara004 May 31, 2024
45de679
Clarify `Cannot close object; library is destroyed` condition
mara004 Jun 4, 2024
3596eb0
Correct PdfBookmark.get_count() docstring
mara004 Jul 4, 2024
85eadfb
rendering: lightness inversion for PIL
mara004 Jul 11, 2024
c907e1e
Add OpenCV lightness inversion
mara004 Jul 11, 2024
736101d
Implement opencv image exclusion
mara004 Jul 11, 2024
822c1b7
opencv: fill all polygons in one go
mara004 Jul 11, 2024
2746244
Revert "opencv: fill all polygons in one go"
mara004 Jul 11, 2024
e68d3da
Add some line breaks
mara004 Jul 11, 2024
428e970
pil/polygon: don't draw an outline
mara004 Jul 12, 2024
2bb6766
Add missing mkdir with refbindings (fixes #320)
mara004 Jul 12, 2024
775fb49
lightness inversion: expand pixel formats compat
mara004 Jul 12, 2024
bc42d19
Remove wrong comments
mara004 Jul 12, 2024
7694cea
[Experimental] Defer imports of optional dependencies
mara004 Jul 13, 2024
d7fc983
changelog: add ref to selective lightness inversion
mara004 Jul 13, 2024
7899758
Do engine imports in parent process with fork context
mara004 Jul 13, 2024
9d715cf
Use LazyLoader for deferred top-level imports
mara004 Jul 13, 2024
db65e00
Consistently use unary operator for inversion
mara004 Jul 13, 2024
7803b27
style
mara004 Jul 13, 2024
b495a1f
add task
mara004 Jul 13, 2024
e45150a
Update some wordings
mara004 Jul 14, 2024
d3e9a43
readme: slightly update wording in raw api guide
mara004 Jul 16, 2024
86bc8b1
Add reference to VikParuchuri's `pdftext`
mara004 Jul 16, 2024
f0dbf9c
version: clean up trailer
mara004 Jul 21, 2024
f33fa36
readme: improve raw api
mara004 Jul 21, 2024
c2aa668
Update a few docstrings
mara004 Jul 21, 2024
eb8b1b5
Rename "byte buffer" to "byte stream"
mara004 Jul 21, 2024
d29435d
doc nits
mara004 Jul 24, 2024
f15ac1b
fix typo
mara004 Jul 25, 2024
4cda54c
Update to new FPDFPageObj_TransformF()
mara004 Aug 1, 2024
7cc3cbe
Fix caller-side imports of deferred modules
mara004 Aug 1, 2024
bbc7f98
`PdfMatrix.mirror()`: Fix misleading terminology
mara004 Aug 11, 2024
98ed536
changelog: explicitly mention previous `_flatten()`
mara004 Aug 11, 2024
ee2f035
changelog nit
mara004 Aug 26, 2024
b3f7804
Update licensing docs
mara004 Sep 19, 2024
ef0854e
changelog: fix typo
mara004 Sep 19, 2024
d54d041
PdfPage.flatten(): add note regarding invalidation of handles
mara004 Sep 19, 2024
51d8899
`PdfBitmap.to_numpy()` Use 2d shape for single-channel bitmap
mara004 Oct 26, 2024
7f12cee
version.py: minor cleanup
mara004 Oct 27, 2024
195ce71
CLI(renderer/pageobjects): slightly improve code style
mara004 Oct 30, 2024
5362127
Fix some dirty code in pdfium build script
mara004 Nov 25, 2024
cc728db
Consistently use iterator_hasvalue()
mara004 Nov 26, 2024
d39dbf8
fix awkward list default
mara004 Nov 27, 2024
2778473
Avoid bool dicts
mara004 Nov 27, 2024
58f508a
fix awkward formatting w/ auto-wrap
mara004 Nov 27, 2024
11469fe
add two FIXMEs
mara004 Dec 18, 2024
379d9b5
First steps towards android detection
mara004 Dec 18, 2024
b3bdc42
Merge remote-tracking branch 'origin/main' into devel_new
mara004 Dec 19, 2024
4b90faa
Update test expectation for toc_maxdepth
mara004 Dec 19, 2024
f0409fc
Clean up & tighten platform detection
mara004 Dec 19, 2024
8d87525
Build reference bindings without srcinfo
mara004 Dec 27, 2024
bc0d92e
Fix perilous mutable defaults
mara004 Dec 27, 2024
820f5c5
Warn about --optimize-mode lcd with --invert-lightness
mara004 Dec 30, 2024
d4649d7
add task
mara004 Jan 7, 2025
18422ec
FPDFBitmap_FillRect: check err code (pdfium API update)
mara004 Jan 11, 2025
d037df5
PdfPage.render(): don't fill if color is all alpha
mara004 Jan 11, 2025
165b481
PdfImage.extract(): update comment / add task
mara004 Jan 11, 2025
79933cb
cli/render: make sure output dir exists
mara004 Jan 11, 2025
fce8c90
PdfBitmap: call constructor directly, avoid unnecessary API calls
mara004 Jan 11, 2025
978b1be
doc/comment nits
mara004 Jan 11, 2025
5131b9b
new_foreign_simple: fix format blunder
mara004 Jan 11, 2025
2650248
Fix another blunder
mara004 Jan 11, 2025
c63e4f1
PdfBitmap.new_*(): add test instructions
mara004 Jan 11, 2025
559d74f
cli/render: can't use jpeg with alpha
mara004 Jan 11, 2025
6e01ad0
Improve fill skipping condition
mara004 Jan 11, 2025
7d96251
Convert to LA on grayscale with transparency, with PIL
mara004 Jan 11, 2025
51c0d4b
Update changelog
mara004 Jan 11, 2025
5aa3796
Fix bool blunder
mara004 Jan 11, 2025
a9fbbad
Don't bother converting to LA after all
mara004 Jan 11, 2025
7a7df13
cli/render: simplify --linear default
mara004 Jan 11, 2025
e0f03b2
doc nits
mara004 Jan 11, 2025
5df60bb
explain use_alpha
mara004 Jan 11, 2025
75de99f
PdfBitmap.get_posconv(): move page check to the right place
mara004 Jan 11, 2025
44f505c
docs/comments
mara004 Jan 11, 2025
6c9a4d2
conda: bump pdfium requirement
mara004 Jan 11, 2025
835f206
add warning
mara004 Jan 11, 2025
92f228f
init_forms(): adapt origin check
mara004 Jan 11, 2025
586fbd1
textpage: more neutral recommendation
mara004 Jan 12, 2025
eb36b1f
slightly rephrase conda_raw recipe
mara004 Jan 12, 2025
e42c050
Mention ctypesgen subtleties regarding FPDFBitmap_GetBuffer()
mara004 Jan 12, 2025
a09d64e
add another ctypesgen note
mara004 Jan 12, 2025
b3cad78
minor doc cleanup
mara004 Jan 12, 2025
decd543
Readme: mention libreoffice trick
mara004 Jan 12, 2025
c4a5ec1
try to fix tip?
mara004 Jan 12, 2025
6dc3dfe
change tip to new section
mara004 Jan 12, 2025
8113cf5
licensing: expand disclaimer
mara004 Jan 12, 2025
c5f040d
readme nit: consistency
mara004 Jan 12, 2025
adc6354
Readme/install-source-caller: fix bad example for `origin`
mara004 Jan 12, 2025
9d34746
continue on install-source-caller
mara004 Jan 12, 2025
c3bbc00
continue
mara004 Jan 12, 2025
f28acdd
slightly polish bitmap
mara004 Jan 13, 2025
79e289d
fix bad whitespace
mara004 Jan 13, 2025
2f4b2c1
comment nit
mara004 Jan 13, 2025
274617e
Add use_bgra_on_transparency option (experimental)
mara004 Jan 13, 2025
3bb3779
update changelog
mara004 Jan 13, 2025
f5251fa
changelog: prepare for adding back color_scheme
mara004 Jan 13, 2025
2314d59
render: mention fill_color implications on pixel format
mara004 Jan 14, 2025
0235264
Don't meddle with skipping fill_rect after all
mara004 Jan 14, 2025
f618f2a
doc/comment nits
mara004 Jan 15, 2025
1fd0c82
Format override with bgra_on_transparency (experimental)
mara004 Jan 15, 2025
ec20ca8
Ability to scale to orig resolution with get_bitmap(rendered=True)
mara004 Jan 15, 2025
1c8dfd3
Expose scale option in extract-images CLI
mara004 Jan 15, 2025
a21fed4
polish docs
mara004 Jan 15, 2025
f088f37
PdfPage.remove_obj(): comment out implicit textpage closing
mara004 Jan 15, 2025
4a4d73f
version docs: spelling nit
mara004 Jan 15, 2025
28ad651
Use same scale for X/Y
mara004 Jan 15, 2025
a5faec6
nit: wording
mara004 Jan 15, 2025
7739ad2
extract_images CLI: add debug logging
mara004 Jan 15, 2025
2b0e8c1
change newline handling
mara004 Jan 15, 2025
1b07932
Fix variable shadowing blunder
mara004 Jan 15, 2025
8b90ea2
nit: we might as well scale down
mara004 Jan 15, 2025
51a4fac
Update test suite
mara004 Jan 15, 2025
5edc82b
newline fix again
mara004 Jan 15, 2025
d9cdaaf
nits
mara004 Jan 16, 2025
c2847a4
utils/_buffer_{reader,writer}: improve variable names
mara004 Jan 21, 2025
3ae4521
Start working on setup
mara004 Jan 21, 2025
d407922
setup: consistent platforms order
mara004 Jan 21, 2025
410bc82
Start working on android integration (experimental)
mara004 Jan 21, 2025
676544d
rename with_prepare to do_prepare
mara004 Jan 21, 2025
71b3e1d
codespell: fix typos
mara004 Jan 21, 2025
cde5351
make autoflake happier
mara004 Jan 21, 2025
de2454f
Make reuse happier
mara004 Jan 21, 2025
33d7056
continue on setup
mara004 Jan 21, 2025
57d7347
Actually add back rendering with custom color scheme
mara004 Jan 22, 2025
b0cc401
shorten args
mara004 Jan 22, 2025
6fff2dd
add task
mara004 Jan 22, 2025
3f7a9c0
color scheme nits
mara004 Jan 22, 2025
613cafb
(Experimental:) Isolate conda
mara004 Jan 23, 2025
cf46d38
Try to make --new-only optional
mara004 Jan 23, 2025
8e3024c
Rename setupsrc files
mara004 Jan 23, 2025
f7c2c4d
color scheme work
mara004 Jan 23, 2025
e596e95
conda_raw: use artifact stash
mara004 Jan 23, 2025
926371a
Add mac universal, try omitting bdist_factory for sourcebuild
mara004 Jan 24, 2025
5c3acaa
Revert bdist_factory omission
mara004 Jan 24, 2025
29fd663
Forward host platform tag from bdist_wheel
mara004 Jan 25, 2025
5d84698
Experimental iOS support
mara004 Jan 25, 2025
b65c8b6
Add a minimal musllinux detection availability test
mara004 Jan 25, 2025
06122d0
bases: modernize mutable primitives & state handling
mara004 Jan 26, 2025
10df5b1
setup: minor cleanups
mara004 Jan 26, 2025
e20ec99
Fix DEBUG_AUTOCLOSE with test suite
mara004 Jan 26, 2025
2eb59d9
Fix bad file descriptor issues
mara004 Jan 26, 2025
74a0680
Map libname to system via function after all
mara004 Jan 26, 2025
7d52d0b
minor cleanups
mara004 Jan 27, 2025
dd4929d
fix typo in changelog_staging
mara004 Jan 27, 2025
0b64cd0
readme/rawapi: use consistent variable name
mara004 Jan 27, 2025
c4014f7
setup: add new symlink target
mara004 Jan 27, 2025
8e26de9
nit: reorder imports
mara004 Jan 27, 2025
3e84340
nit: rename section
mara004 Jan 27, 2025
1e1e5c7
only call _get_libc_info() on linux
mara004 Jan 27, 2025
6f291a1
fix ios platform match
mara004 Jan 27, 2025
5d3271f
add further debug prints
mara004 Jan 27, 2025
4be4afc
Host.platform: actually use cached property
mara004 Jan 27, 2025
b407141
update.py: fix blunder (need system rather than Host.system)
mara004 Jan 27, 2025
30736a9
Format get_wheel_tag()
mara004 Jan 27, 2025
8afa01d
run musllinux test only on linux
mara004 Jan 27, 2025
3657f80
Update changelog
mara004 Jan 27, 2025
be0417d
CI: add linux arm64 & python 3.13
mara004 Jan 27, 2025
6f41a4d
Fix pytest skipif
mara004 Jan 27, 2025
7da8e4d
Update changelog
mara004 Jan 27, 2025
7b37bfa
don't waste too much space with platform debugging
mara004 Jan 28, 2025
e1b73d1
changelog nit
mara004 Jan 28, 2025
5103042
slightly clean up bitmap comments
mara004 Jan 28, 2025
1b26765
version check: use contains after all
mara004 Jan 28, 2025
cbd48b4
comment nit
mara004 Jan 28, 2025
ed79e6a
Avoid needless traceback.print_exc()
mara004 Jan 28, 2025
77e7417
add missing pieces for symlink target
mara004 Jan 28, 2025
8343fef
Actually revert (remove) symlink strategy
mara004 Jan 28, 2025
9fc26de
continue
mara004 Jan 28, 2025
cfb6209
continue 2
mara004 Jan 28, 2025
20436ab
readme: reorder Thanks to section
mara004 Jan 28, 2025
99facca
update changelog
mara004 Jan 28, 2025
8cf39b6
run: add tasks
mara004 Jan 28, 2025
e269ffe
slightly restyle scale_to_original
mara004 Jan 28, 2025
bba85f5
finally, update the test suite
mara004 Jan 28, 2025
09eab7d
sourcebuild: take out linux arm64 from CI matrix
mara004 Jan 28, 2025
778eebf
docs: make the format selection table a bit less obtrusive
mara004 Jan 28, 2025
e9bd33b
Remove implicit textpage closing code
mara004 Jan 28, 2025
e9efd93
changelog nit
mara004 Jan 28, 2025
0b108c3
Slightly clean up format override flow
mara004 Jan 28, 2025
6e4055a
deferred imports: add debug logging & lru_cache
mara004 Jan 28, 2025
34bdf5c
Load deferred modules from file
mara004 Jan 28, 2025
d3d3afb
Fix version class assignment protector
mara004 Jan 28, 2025
eabc9a7
deferred module: actually handle attribute assignments
mara004 Jan 28, 2025
d488e96
bases: comment out .raw check
mara004 Jan 28, 2025
c62d9aa
readme: fix repetition
mara004 Jan 28, 2025
b7a918f
pr template nits
mara004 Jan 28, 2025
74c688b
changelog nit
mara004 Jan 29, 2025
cbce9fa
readme nits
mara004 Jan 29, 2025
b3513b5
Generate uuid only on DEBUG_AUTOCLOSE
mara004 Jan 29, 2025
5f7db1b
doc nits
mara004 Jan 29, 2025
a124c43
changelog nit
mara004 Jan 29, 2025
e4f23ab
autorelease: point to GH changelog on beta
mara004 Jan 29, 2025
474e0c8
Make autorelease script play better without --register
mara004 Jan 29, 2025
db8fa13
comment out schedule for trigger_main
mara004 Jan 29, 2025
2c12e2f
Log until HEAD if not --register
mara004 Jan 29, 2025
77eb495
Add a missing newline
mara004 Jan 29, 2025
6c52843
rename a variable
mara004 Jan 29, 2025
d62ba3b
release-action: add task/note
mara004 Jan 30, 2025
157d979
Warn about Android prior to PEP 738, make libc name lower-case
mara004 Jan 30, 2025
de83404
Better detection of android prior to PEP 738 (CC #332)
mara004 Jan 30, 2025
3638103
Host polishing
mara004 Jan 30, 2025
b4773f5
Try to run termux-elf-cleaner if on android (CC #332)
mara004 Jan 30, 2025
956ee26
Avoid pathlib object in subprocess cmd, go through wrapper
mara004 Jan 30, 2025
4a631ea
add task
mara004 Jan 30, 2025
514240b
renderer: add more import debugs
mara004 Jan 30, 2025
e0f8087
Recommend --fill-to-stroke with custom color scheme
mara004 Jan 30, 2025
13dd680
extract-images cli: comment out debug logging
mara004 Jan 30, 2025
5759e74
deferred: comment nits
mara004 Jan 30, 2025
7b0bd37
min()/max() actually seems OK
mara004 Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
- [ ] This PR changes setup code (`setupsrc/`, `setup.py` etc.).
- [ ] I have read through relevant doc sections [Installation -> From source][1] and [Setup Magic][2].
- [ ] I have tested the change does not break internal callers.
- [ ] I believe the change is maintainable and does not cause unreasonable complexity or code pollution.
- [ ] The change does not try to shift a maintenance burden or upstream downstream tasks. *Keep handlers generic, avoid overly downstream-specific or (for us) effectively dead code passages.*
- [ ] I believe the change is maintainable and does not cause unreasonable complexity or code fragmentation.
- [ ] The change does not shift a maintenance burden or upstream downstream tasks. *Keep handlers generic, avoid overly downstream-specific or (for us) effectively dead code passages.*
- [ ] I have assessed that the targeted use case cannot reasonably be satisfied by existing means, such as [Caller-provided data files][3], or the change forms a notable improvement over possible alternatives.
- [ ] I believe the targeted use case is supported by pypdfium2-team. *Note that we may not want to support esoteric or artificially restricted setup envs.*

Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
pdfium_ver:
default: 'latest'
type: string
new_only:
# only with package == "raw", ignored otherwise (actually the default should be false in that case, but I don't know if GH supports dynamic defaults depending on other inputs)
default: true
type: boolean
test:
default: true
type: boolean
Expand Down Expand Up @@ -62,8 +66,15 @@ jobs:
git config --global user.name "geisserml"
python -m pip install -U -r req/setup.txt

# TODO might be able to unify with ${{ inputs.package == 'raw' && inputs.new_only && '--new-only' || '' }} or something

- name: Build package
run: ./run craft --pdfium-ver "${{ inputs.pdfium_ver }}" conda_${{ inputs.package }}
if: ${{ inputs.package == 'helpers' || !inputs.new_only }}
run: ./run craft-conda ${{ inputs.package }} --pdfium-ver ${{ inputs.pdfium_ver }}

- name: Build package (new only)
if: ${{ inputs.package == 'raw' && inputs.new_only }}
run: ./run craft-conda ${{ inputs.package }} --pdfium-ver ${{ inputs.pdfium_ver }} --new-only

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -80,8 +91,8 @@ jobs:
fail-fast: false
matrix:
# NOTE On GH actions, macOS <=13 is Intel, whereas macOS >=14 will be ARM64
os: ['ubuntu-latest', 'macos-13', 'macos-14', 'windows-latest']
py: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: ['ubuntu-latest', 'ubuntu-24.04-arm', 'macos-13', 'macos-14', 'windows-latest']
py: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -121,7 +132,7 @@ jobs:
run: |
conda install -y pytest pillow numpy
conda install -y pypdfium2_${{ inputs.package }} --override-channels -c ./conda_dist/ -c pypdfium2-team -c bblanchon -c defaults
pytest tests/ tests_old/
pytest tests/

publish:

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ jobs:
fail-fast: false
matrix:
# NOTE On GH actions, macOS <=13 is Intel, whereas macOS >=14 will be ARM64
os: ['ubuntu-latest', 'macos-13', 'macos-14', 'windows-latest']
py: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: ['ubuntu-latest', 'ubuntu-24.04-arm', 'macos-13', 'macos-14', 'windows-latest']
py: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
include:
- os: ubuntu-latest
wheel: dist/*manylinux_*_x86_64*.whl
- os: ubuntu-24.04-arm
wheel: dist/*manylinux_*_aarch64*.whl
- os: macos-13
wheel: dist/*macosx_*_x86_64*.whl
- os: macos-14
Expand Down Expand Up @@ -222,6 +224,7 @@ jobs:
with:
packages-dir: dist/ # the default

# TODO make sure RELEASE.md is less than 125000 chars, otherwise attach it as an artifact and write a new body pointing out the attachment. We've been hit by this limit in v4.30.1, due to an excessively long pdfium commit log.
- name: Publish to GitHub
uses: ncipollo/release-action@v1
with:
Expand Down Expand Up @@ -251,6 +254,7 @@ jobs:
{
"package": "helpers",
"pdfium_ver": "latest",
"new_only": "false",
"test": "true",
"publish": "${{ inputs.publish }}",
"py_version": "3.12"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
fail-fast: false
matrix:
# NOTE On GH actions, macOS <=13 is Intel, whereas macOS >=14 will be ARM64
os: ['ubuntu-latest', 'macos-13', 'macos-14', 'windows-latest']
py: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: ['ubuntu-latest', 'ubuntu-24.04-arm', 'macos-13', 'macos-14', 'windows-latest']
py: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

runs-on: ${{ matrix.os }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
fail-fast: false
matrix:
# NOTE On GH actions, macOS <=13 is Intel, whereas macOS >=14 will be ARM64
os: ['ubuntu-latest', 'macos-13', 'macos-14', 'windows-latest']
py: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: ['ubuntu-latest', 'ubuntu-24.04-arm', 'macos-13', 'macos-14', 'windows-latest']
py: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

runs-on: ${{ matrix.os }}

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/test_sourcebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ jobs:
fail-fast: false
matrix:
# NOTE On GH actions, macOS <=13 is Intel, whereas macOS >=14 will be ARM64
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
# FIXME Google's toolchain doesn't seem to run on Linux arm64 natively
os: ['ubuntu-latest', 'macos-13', 'macos-14', 'windows-latest'] # 'ubuntu-24.04-arm'
use_syslibs: [false]
include:
- os: ubuntu-latest
- os: 'ubuntu-latest'
use_syslibs: [true]
# - os: 'ubuntu-24.04-arm'
# use_syslibs: [true]

runs-on: ${{ matrix.os }}

Expand All @@ -45,13 +48,13 @@ jobs:

- name: Build PDFium (default)
if: ${{ !matrix.use_syslibs }}
run: python3 ./setupsrc/pypdfium2_setup/build_pdfium.py
run: python3 ./setupsrc/pypdfium2_setup/sourcebuild.py

- name: Build PDFium (with syslibs)
if: ${{ matrix.use_syslibs }}
run: |
sudo apt-get install -y libfreetype-dev liblcms2-dev libjpeg-dev libopenjp2-7-dev libpng-dev zlib1g-dev libicu-dev libtiff-dev
python3 ./setupsrc/pypdfium2_setup/build_pdfium.py --use-syslibs
python3 ./setupsrc/pypdfium2_setup/sourcebuild.py --use-syslibs

- name: Install
run: PDFIUM_PLATFORM="sourcebuild" python3 -m pip install .
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/trigger_conda_raw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
{
"package": "raw",
"pdfium_ver": "latest",
"new_only": "true",
"test": "true",
"publish": "true",
"py_version": "3.12"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/trigger_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

name: Trigger main release
on:
# NOTE temporarily commented out, awaiting merge of the v5 branch
# NOTE temporarily commented out during the beta phase
# The beta field in autorelease/config.json is automatically unset after a beta release, but we probably don't want the real release to be auto-triggered - instead it should be triggered intentionally and be supervised by the maintainer.
# # https://github.com/bblanchon/pdfium-binaries/blob/master/.github/workflows/trigger.yml
# # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# # https://crontab.guru/
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ build/
dist/
conda/*/out/
tests/output/
tests_old/output/

data/
!data/.gitkeep
Expand Down
8 changes: 6 additions & 2 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ Files:
tests/resources/attachments.pdf
tests/resources/mona_lisa.jpg
Copyright: 2022 PDFium developers
License: BSD-3-Clause, Apache-2.0
License: BSD-3-Clause AND Apache-2.0
Comment:
pdfium's LICENSE file includes both BSD-3-Clause and Apache-2.0 texts
We're not sure if this meant as SPDX "AND" or "OR", so use the conservative (safe) assumption "AND".
Obtained from:
https://pdfium.googlesource.com/pdfium/+/refs/heads/main/testing/resources/bookmarks_circular.pdf
https://pdfium.googlesource.com/pdfium_tests/+/refs/heads/main/fx/other/8.2_outline.pdf
Expand All @@ -67,7 +69,9 @@ Files:
Copyright:
2022 PDFium developers
2024 geisserml <[email protected]>
License: BSD-3-Clause, Apache-2.0
License: BSD-3-Clause AND Apache-2.0
Comment:
See above regarding pdfium's double-license.

Files: tests/resources/images.pdf
Copyright:
Expand Down
5 changes: 4 additions & 1 deletion .reuse/dep5-wheel
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ Copyright:
2024 PDFium developers
2024 Developers of projects mentioned in PdfiumThirdParty
2024 Benoît Blanchon and pdfium-binaries contributors
License: (BSD-3-Clause, Apache-2.0) AND LicenseRef-PdfiumThirdParty
License: BSD-3-Clause AND Apache-2.0 AND LicenseRef-PdfiumThirdParty
Comment:
pdfium's LICENSE file includes both BSD-3-Clause and Apache-2.0 texts
We're not sure if this meant as SPDX "AND" or "OR", so use the conservative (safe) assumption "AND".
Loading