Skip to content

Commit 294ea04

Browse files
authored
Merge branch 'main' into main
2 parents 60f4479 + d84be3b commit 294ea04

File tree

391 files changed

+31484
-19510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

391 files changed

+31484
-19510
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pdf binary

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,24 @@ body:
4747
label: PyMuPDF version
4848
options:
4949
-
50-
- 1.23.21
51-
- 1.23.22
52-
- 1.23.20
53-
- 1.23.19
54-
- 1.23.18
55-
- 1.23.17
56-
- 1.23.16
57-
- 1.23.15
58-
- 1.23.14
59-
- 1.23.13
60-
- 1.23.12
61-
- 1.23.11
62-
- 1.23.10
63-
- 1.23.9
64-
- 1.23.9rc2
65-
- 1.23.9rc1
66-
- 1.23.8 or earlier
50+
- 1.24.13
51+
- 1.24.12
52+
- 1.24.11
53+
- 1.24.10
54+
- 1.24.9
55+
- 1.24.8
56+
- 1.24.7
57+
- 1.24.6
58+
- 1.24.5
59+
- 1.24.4
60+
- 1.24.3
61+
- 1.24.2
62+
- 1.24.1
63+
- 1.24.0
64+
- 1.23.x or earlier
6765
- Built from source
6866
description: |
69-
* For example from `fitz.VersionBind`.
67+
* For example from `pymupdf.VersionBind`.
7068
* We generally only look at bugs in the most recent release of PyMuPDF.
7169
validations:
7270
required: true
@@ -94,10 +92,10 @@ body:
9492
# Need quotes around `3.10` otherwise it is treated as a number and shows as `3.1`.
9593
options:
9694
-
95+
- "3.13"
9796
- "3.12"
9897
- "3.11"
9998
- "3.10"
10099
- "3.9"
101-
- "3.8"
102100
validations:
103101
required: true

.github/workflows/build_wheels.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ on:
2929
type: boolean
3030
default: true
3131

32-
wheels_macos_arm64:
33-
type: boolean
34-
default: true
35-
3632
wheels_macos_auto:
3733
type: boolean
3834
default: true
@@ -46,7 +42,16 @@ on:
4642
type: string
4743
default: '-'
4844

45+
#PYMUPDF_SETUP_MUPDF_BUILD_TYPE:
46+
# description: 'Value for PYMUPDF_SETUP_MUPDF_BUILD, e.g. debug.'
47+
# type: string
48+
# default: '-'
4949
# We can't currently have more than 10 inputs
50+
51+
PYMUPDF_SETUP_PY_LIMITED_API:
52+
description: 'If not "0", we build a single wheel for each platform.'
53+
type: string
54+
default: ''
5055

5156
jobs:
5257

@@ -56,15 +61,18 @@ jobs:
5661
runs-on: ubuntu-latest
5762

5863
steps:
59-
- uses: actions/checkout@v2
60-
#with:
61-
# fetch-depth: 0 # Optional, use if you use setuptools_scm
62-
# submodules: true # Optional, use if you have submodules
64+
- uses: actions/checkout@v4
6365

6466
- name: Build sdist
65-
run: pipx run build --sdist
67+
env:
68+
inputs_wheels_default: 0
69+
inputs_sdist: 1
70+
inputs_flavours: ${{inputs.flavours}}
71+
inputs_PYMUPDF_SETUP_MUPDF_BUILD: ${{inputs.PYMUPDF_SETUP_MUPDF_BUILD}}
72+
run:
73+
python scripts/gh_release.py
6674

67-
- uses: actions/upload-artifact@v2
75+
- uses: actions/upload-artifact@v3
6876
with:
6977
path: dist/*.tar.gz
7078

@@ -75,27 +83,28 @@ jobs:
7583
runs-on: ${{ matrix.os }}
7684
strategy:
7785
matrix:
78-
os: [ubuntu-latest, windows-2019, macos-latest]
86+
# 2024-05-08: Need to specify macos-13/14 to get x86_64/arm64.
87+
os: [ubuntu-latest, windows-2019, macos-13, macos-14]
7988

8089
# Avoid cancelling of all cibuildwheel runs after a single failure.
8190
fail-fast: false
8291

8392
steps:
8493

85-
- uses: actions/checkout@v2
94+
- uses: actions/checkout@v4
8695

8796
# Get Python 3.12 x32 and x64 on Windows. (As of 2023-10-12 these are not
8897
# always available by default.)
8998
#
9099
- name: Install Python 3.12 x32 on Windows.
91100
if: runner.os == 'Windows'
92-
uses: actions/setup-python@v2
101+
uses: actions/setup-python@v5
93102
with:
94103
python-version: '3.12'
95104
architecture: x86
96105
- name: Install Python 3.12 x64 on Windows.
97106
if: runner.os == 'Windows'
98-
uses: actions/setup-python@v2
107+
uses: actions/setup-python@v5
99108
with:
100109
python-version: '3.12'
101110

@@ -107,7 +116,7 @@ jobs:
107116
# `python-config3` return settings for Python-3.12, instead of for
108117
# whatever Python is being used by cibuildwheel.
109118
#
110-
- uses: actions/setup-python@v2
119+
- uses: actions/setup-python@v5
111120

112121
# On Linux, get qemu so we can build for aarch64.
113122
#
@@ -129,19 +138,23 @@ jobs:
129138
inputs_wheels_linux_aarch64: ${{inputs.wheels_linux_aarch64}}
130139
inputs_wheels_linux_auto: ${{inputs.wheels_linux_auto}}
131140
inputs_wheels_linux_pyodide: ${{inputs.wheels_linux_pyodide}}
132-
inputs_wheels_macos_arm64: ${{inputs.wheels_macos_arm64}}
141+
#inputs_wheels_macos_arm64: ${{inputs.wheels_macos_arm64}}
133142
inputs_wheels_macos_auto: ${{inputs.wheels_macos_auto}}
134143
inputs_wheels_windows_auto: ${{inputs.wheels_windows_auto}}
135144

136145
inputs_PYMUPDF_SETUP_MUPDF_BUILD: ${{inputs.PYMUPDF_SETUP_MUPDF_BUILD}}
146+
#inputs_PYMUPDF_SETUP_MUPDF_BUILD_TYPE: ${{inputs.PYMUPDF_SETUP_MUPDF_BUILD_TYPE}}
137147

138148
inputs_wheels_cps: ${{inputs.wheels_cps}}
149+
150+
PYMUPDF_SETUP_PY_LIMITED_API: ${{inputs.PYMUPDF_SETUP_PY_LIMITED_API}}
151+
139152
run:
140153
python scripts/gh_release.py
141154

142155

143156
# Upload generated wheels, to be accessible from github Actions page.
144157
#
145-
- uses: actions/upload-artifact@v2
158+
- uses: actions/upload-artifact@v3
146159
with:
147160
path: ./wheelhouse/*.whl

.github/workflows/cla.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: "CLA Assistant"
1313
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
1414
# Beta Release
15-
uses: contributor-assistant/github-action@v2.2.0
15+
uses: contributor-assistant/github-action@v2.4.0
1616
env:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
# the below token should have repo scope and must be manually added by you in the repository's secret
@@ -21,10 +21,10 @@ jobs:
2121
path-to-signatures: 'signatures/version1/cla.json'
2222
path-to-document: 'https://artifex.com/documents/Artifex%20Contributor%20License%20Agreement.pdf'
2323
# branch should not be protected
24-
branch: 'main'
24+
branch: 'CLA'
2525
allowlist:
2626

27-
# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
27+
# the following are the optional inputs - If the optional inputs are not given, then default values will be taken
2828
#remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
2929
#remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
3030
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'

.github/workflows/test-valgrind.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919

2020
steps:
2121

22-
- uses: actions/checkout@v2
23-
- uses: actions/setup-python@v2
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-python@v5
2424

2525
- name: test_mupdf-master-branch
2626
env:
2727
PYMUDF_SCRIPTS_TEST_options: ${{inputs.scripts_test_options}}
2828
run:
29-
python scripts/test.py -m 'git:--recursive --depth 1 --shallow-submodules --branch master https://github.com/ArtifexSoftware/mupdf.git' --valgrind 1 buildtest
29+
python scripts/test.py -m 'git:--recursive --depth 1 --shallow-submodules --branch master https://github.com/ArtifexSoftware/mupdf.git' --valgrind 1 -f 0 -i r buildtest

.github/workflows/test_mupdf-master-branch.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,18 @@ jobs:
2121

2222
steps:
2323

24-
- uses: actions/checkout@v2
25-
- uses: actions/setup-python@v2
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-python@v5
2626

2727
- name: test_mupdf-master-branch
2828
env:
2929
inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch master https://github.com/ArtifexSoftware/mupdf.git"
3030
inputs_flavours: "0"
3131
inputs_sdist: "0"
32-
inputs_wheels_cps: "cp312*"
32+
inputs_wheels_cps: "cp312* cp313*"
3333
inputs_wheels_default: "0"
3434
inputs_wheels_linux_auto: "1"
35+
inputs_wheels_linux_pyodide: "0"
3536
inputs_wheels_macos_auto: "1"
3637
inputs_wheels_windows_auto: "1"
3738
run:

.github/workflows/test_mupdf-release-branch.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ jobs:
2222

2323
steps:
2424

25-
- uses: actions/checkout@v2
26-
- uses: actions/setup-python@v2
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-python@v5
2727

2828
- name: test_mupdf-release-branch
2929
env:
30-
inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch 1.23.x https://github.com/ArtifexSoftware/mupdf.git"
30+
inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch 1.25.x https://github.com/ArtifexSoftware/mupdf.git"
3131
inputs_flavours: "0"
3232
inputs_sdist: "0"
3333
inputs_wheels_cps: "cp312*"
3434
inputs_wheels_default: "0"
3535
inputs_wheels_linux_auto: "1"
36+
inputs_wheels_linux_pyodide: "0"
3637
inputs_wheels_macos_auto: "1"
3738
inputs_wheels_windows_auto: "1"
3839
run:

.github/workflows/test_pyodide.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ name: Build Pyodide wheel
22

33
on:
44
workflow_dispatch:
5+
6+
inputs:
7+
PYMUPDF_SETUP_MUPDF_BUILD:
8+
description: 'Value for PYMUPDF_SETUP_MUPDF_BUILD, e.g.: git:--branch master https://github.com/ArtifexSoftware/mupdf.git'
9+
type: string
10+
#default: 'git:--branch master https://github.com/ArtifexSoftware/mupdf.git'
11+
default: '-'
12+
PYMUPDF_SETUP_PY_LIMITED_API:
13+
type: string
14+
default: '1'
15+
516
schedule:
617
- cron: '13 5 * * *'
718

@@ -23,25 +34,25 @@ jobs:
2334

2435
steps:
2536

26-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
2738

28-
- uses: actions/setup-python@v4
39+
- uses: actions/setup-python@v5
2940
with:
3041
python-version: ${{ matrix.python-version }}
3142

3243
- name: build_pyodide_wheel
3344
env:
3445
inputs_sdist: 0
35-
inputs_PYMUPDF_SETUP_MUPDF_BUILD: "git:--recursive --depth 1 --shallow-submodules --branch master https://github.com/ArtifexSoftware/mupdf.git"
46+
inputs_PYMUPDF_SETUP_MUPDF_BUILD: ${{inputs.PYMUPDF_SETUP_MUPDF_BUILD}}
47+
PYMUPDF_SETUP_PY_LIMITED_API: ${{inputs.PYMUPDF_SETUP_PY_LIMITED_API}}
3648
inputs_wheels_default: 0
3749
inputs_wheels_linux_pyodide: 1
38-
inputs_wheels_implementations: b
3950
run:
4051
python scripts/gh_release.py build
4152

4253

4354
# Upload generated wheels, to be accessible from github Actions page.
4455
#
45-
- uses: actions/upload-artifact@v2
56+
- uses: actions/upload-artifact@v3
4657
with:
4758
path: ./wheelhouse/*.whl

.github/workflows/test_quick.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222

2323
steps:
2424

25-
- uses: actions/checkout@v2
26-
- uses: actions/setup-python@v2
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-python@v5
2727

2828
- name: test_quick
2929

.github/workflows/test_sysinstall.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,27 @@ jobs:
1616

1717
steps:
1818

19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020

2121
# It seems to be important not to install a custom python here,
2222
# because `sudo` (which we need to use when installing to /usr/local
2323
# etc) always ends up running the default python, even if we set
2424
# $PATH etc. So for example we can end up with mupdf files and
2525
# pymupdf files being installed into .../python3.11/site-packages and
26-
# .../python3.10/site-packages, and tests all fail to import fitz.
26+
# .../python3.10/site-packages, and tests all fail to import pymupdf.
2727
#
28-
#- uses: actions/setup-python@v2
28+
#- uses: actions/setup-python@v5
2929
#with:
3030
# # 3.12 doesn't have setuptools. As of 2024-01-03, MuPDF build requires setuptools before it
3131
# # sees `--venv` and defers to a venv, so we currently have to force use of python 3.11.
3232
# python-version: '3.11'
3333

34-
- name: sysinstall
34+
- name: sysinstall_venv
3535
run:
36-
python3 scripts/sysinstall.py --root / --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf.git'
36+
# Use venv.
37+
python3 scripts/sysinstall.py --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf.git'
38+
39+
- name: sysinstall_sudo
40+
run:
41+
# Do not use a venv, instead install required packages with sudo.
42+
python3 scripts/sysinstall.py --mupdf-git '--branch master https://github.com/ArtifexSoftware/mupdf.git' --pip sudo --root /

0 commit comments

Comments
 (0)