Skip to content

Commit 60fd7f4

Browse files
scripts/test.py: fix bug in handling of -m mupdf location.
Also default to installing system packages if running in Github action.
1 parent 530af52 commit 60fd7f4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@
137137
For example `-k test_3354`.
138138
139139
-m <location> | --mupdf <location>
140-
Location of local mupdf/ directory or 'git:...' to be used
141-
when building PyMuPDF.
140+
Location of mupdf as local directory or remote git, to be used when
141+
building PyMuPDF.
142142
143143
This sets environment variable PYMUPDF_SETUP_MUPDF_BUILD, which is used
144144
by PyMuPDF/setup.py. If not specified PyMuPDF will download its default
@@ -176,7 +176,7 @@
176176
177177
-P 0|1
178178
If 1, automatically install required system packages such as
179-
Valgrind. Default is 0.
179+
Valgrind. Default is 1 if running as Github action, otherwise 0.
180180
181181
--pybind 0|1
182182
Experimental, for investigating
@@ -348,7 +348,7 @@ def main(argv):
348348
install_version = None
349349
mupdf_sync = None
350350
os_names = list()
351-
system_packages = False
351+
system_packages = True if os.environ.get('GITHUB_ACTIONS') == 'true' else False
352352
pybind = False
353353
pyodide_build_version = None
354354
pytest_options = ''
@@ -463,7 +463,7 @@ def main(argv):
463463
_mupdf = None
464464
elif _mupdf.startswith(':'):
465465
_branch = _mupdf[1:]
466-
_mupdf = 'git:--branch {_branch} https://github.com/ArtifexSoftware/mupdf.git'
466+
_mupdf = f'git:--branch {_branch} https://github.com/ArtifexSoftware/mupdf.git'
467467
os.environ['PYMUPDF_SETUP_MUPDF_BUILD'] = _mupdf
468468
elif _mupdf.startswith('git:') or '://' in _mupdf:
469469
os.environ['PYMUPDF_SETUP_MUPDF_BUILD'] = _mupdf

0 commit comments

Comments
 (0)