PyMuPDF 1.23.16__tar.gz → 1.23.19__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.
Files changed (165) hide show
  1. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/PKG-INFO +1 -1
  2. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/changes.txt +44 -0
  3. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/scripts/gh_release.py +5 -2
  4. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/scripts/test.py +36 -15
  5. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/setup.py +1 -1
  6. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src/__init__.py +181 -139
  7. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src/extra.i +46 -0
  8. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src/table.py +46 -40
  9. PyMuPDF-1.23.19/src_classic/version.i +7 -0
  10. PyMuPDF-1.23.19/tests/resources/2201.00069.pdf +0 -0
  11. PyMuPDF-1.23.19/tests/resources/small-table.pdf +0 -0
  12. PyMuPDF-1.23.19/tests/resources/strict-yes-no.pdf +0 -0
  13. PyMuPDF-1.23.19/tests/resources/test_2885.pdf +0 -0
  14. PyMuPDF-1.23.19/tests/resources/test_2904.pdf +0 -0
  15. PyMuPDF-1.23.19/tests/resources/test_3062.pdf +0 -0
  16. PyMuPDF-1.23.19/tests/resources/test_3070.pdf +0 -0
  17. PyMuPDF-1.23.19/tests/resources/test_3087.pdf +0 -0
  18. PyMuPDF-1.23.19/tests/resources/test_annot_file_info.pdf +0 -0
  19. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/run_compound.py +16 -5
  20. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_2904.py +3 -3
  21. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_annots.py +20 -0
  22. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_docs_samples.py +1 -1
  23. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_font.py +11 -4
  24. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_general.py +69 -0
  25. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_insertimage.py +19 -0
  26. PyMuPDF-1.23.19/tests/test_page_links.py +17 -0
  27. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_pagedelete.py +8 -0
  28. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_tables.py +49 -0
  29. PyMuPDF-1.23.16/src_classic/version.i +0 -7
  30. PyMuPDF-1.23.16/tests/resources/2201.00069.pdf +0 -0
  31. PyMuPDF-1.23.16/tests/resources/test_2904.pdf +0 -0
  32. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/COPYING +0 -0
  33. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/MANIFEST.in +0 -0
  34. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/README.md +0 -0
  35. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/READMErb.md +0 -0
  36. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/mupdf.tgz +0 -0
  37. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/pipcl.py +0 -0
  38. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/pyproject.toml +0 -0
  39. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/pytest.ini +0 -0
  40. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/scripts/sysinstall.py +0 -0
  41. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src/__main__.py +0 -0
  42. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src/fitz.py +0 -0
  43. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src/utils.py +0 -0
  44. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/__init__.py +0 -0
  45. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/__main__.py +0 -0
  46. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/_config.h +0 -0
  47. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/fitz_old.i +0 -0
  48. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-annot.i +0 -0
  49. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-convert.i +0 -0
  50. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-defines.i +0 -0
  51. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-devices.i +0 -0
  52. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-fields.i +0 -0
  53. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-fileobj.i +0 -0
  54. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-geo-c.i +0 -0
  55. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-geo-py.i +0 -0
  56. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-globals.i +0 -0
  57. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-other.i +0 -0
  58. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-pdfinfo.i +0 -0
  59. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-pixmap.i +0 -0
  60. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-portfolio.i +0 -0
  61. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-python.i +0 -0
  62. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-select.i +0 -0
  63. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-stext.i +0 -0
  64. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/helper-xobject.i +0 -0
  65. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/src_classic/utils.py +0 -0
  66. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/README.md +0 -0
  67. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/001003ED.pdf +0 -0
  68. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/1.pdf +0 -0
  69. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/2.pdf +0 -0
  70. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/3.pdf +0 -0
  71. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/4.pdf +0 -0
  72. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/Bezier.epub +0 -0
  73. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/PragmaticaC.otf +0 -0
  74. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/bug1945.pdf +0 -0
  75. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/bug1971.pdf +0 -0
  76. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/chinese-tables.pdf +0 -0
  77. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/chinese-tables.pickle +0 -0
  78. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/circular-toc.pdf +0 -0
  79. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/cython.pdf +0 -0
  80. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/cython.pickle +0 -0
  81. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/full_toc.txt +0 -0
  82. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/full_toc2.txt +0 -0
  83. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/github_sample.pdf +0 -0
  84. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/has-bad-fonts.pdf +0 -0
  85. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/image-file1.pdf +0 -0
  86. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/img-transparent.png +0 -0
  87. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/joined.pdf +0 -0
  88. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/metadata.txt +0 -0
  89. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/mupdf_explored.pdf +0 -0
  90. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/nur-ruhig.jpg +0 -0
  91. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/quad-calc-0.pdf +0 -0
  92. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/simple_toc.txt +0 -0
  93. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/symbol-list.pdf +0 -0
  94. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/symbols.txt +0 -0
  95. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test-2333.pdf +0 -0
  96. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test-2462.pdf +0 -0
  97. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test2093.pdf +0 -0
  98. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test2182.pdf +0 -0
  99. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test2238.pdf +0 -0
  100. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_1645_expected.pdf +0 -0
  101. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_1645_expected_1.22.pdf +0 -0
  102. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_1824.pdf +0 -0
  103. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2108.pdf +0 -0
  104. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2270.pdf +0 -0
  105. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2533.pdf +0 -0
  106. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2548.pdf +0 -0
  107. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2553-2.pdf +0 -0
  108. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2553.pdf +0 -0
  109. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2596.pdf +0 -0
  110. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2608_expected +0 -0
  111. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2634.pdf +0 -0
  112. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2635.pdf +0 -0
  113. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2645_1.pdf +0 -0
  114. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2645_2.pdf +0 -0
  115. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2645_3.pdf +0 -0
  116. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2710.pdf +0 -0
  117. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2730.pdf +0 -0
  118. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2788.pdf +0 -0
  119. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2791_content.pdf +0 -0
  120. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2791_coverpage.pdf +0 -0
  121. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2861.pdf +0 -0
  122. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2871.pdf +0 -0
  123. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2907.pdf +0 -0
  124. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2954.pdf +0 -0
  125. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2957_1.pdf +0 -0
  126. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2957_2.pdf +0 -0
  127. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2969.pdf +0 -0
  128. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_2979.pdf +0 -0
  129. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_3058.pdf +0 -0
  130. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/test_delete_image.pdf +0 -0
  131. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/type3font.pdf +0 -0
  132. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/v110-changes.pdf +0 -0
  133. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/resources/widgettest.pdf +0 -0
  134. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_2548.py +0 -0
  135. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_2634.py +0 -0
  136. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_2791.py +0 -0
  137. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_2907.py +0 -0
  138. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_badfonts.py +0 -0
  139. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_crypting.py +0 -0
  140. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_drawings.py +0 -0
  141. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_embeddedfiles.py +0 -0
  142. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_extractimage.py +0 -0
  143. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_flake8.py +0 -0
  144. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_geometry.py +0 -0
  145. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_imagebbox.py +0 -0
  146. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_insertpdf.py +0 -0
  147. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_linequad.py +0 -0
  148. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_metadata.py +0 -0
  149. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_named_links.py +0 -0
  150. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_nonpdf.py +0 -0
  151. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_object_manipulation.py +0 -0
  152. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_optional_content.py +0 -0
  153. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_pagelabels.py +0 -0
  154. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_pixmap.py +0 -0
  155. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_showpdfpage.py +0 -0
  156. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_story.py +0 -0
  157. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_tesseract.py +0 -0
  158. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_textbox.py +0 -0
  159. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_textextract.py +0 -0
  160. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_textsearch.py +0 -0
  161. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_toc.py +0 -0
  162. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_widgets.py +0 -0
  163. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/tests/test_word_delimiters.py +0 -0
  164. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/valgrind.supp +0 -0
  165. {PyMuPDF-1.23.16 → PyMuPDF-1.23.19}/wdev.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyMuPDF
3
- Version: 1.23.16
3
+ Version: 1.23.19
4
4
  Summary: A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
5
5
  Description-Content-Type: text/markdown
6
6
  Author: Artifex
@@ -2,6 +2,50 @@ Change Log
2
2
  ==========
3
3
 
4
4
 
5
+ **Changes in version 1.23.19 (2024-01-25)**
6
+
7
+ * Bug fixes:
8
+
9
+ * **Fixed** `3087 <https://github.com/pymupdf/PyMuPDF/issues/3087>`_: Exception in insert_image with mask specified
10
+ * **Fixed** `3094 <https://github.com/pymupdf/PyMuPDF/issues/3094>`_: TypeError: '<' not supported between instances of 'FzLocation' and 'int' in doc.delete_pages
11
+
12
+ * Other:
13
+
14
+ * When finding tables:
15
+
16
+ * Allow addition of user-defined "virtual" vector graphics when finding tables.
17
+ * Confirm that the enveloping bboxes of vector graphics are inside the clip rectangle.
18
+ * Avoid slow finding of rectangle intersections.
19
+
20
+ * Added `Font.bbox` property.
21
+
22
+
23
+ **Changes in version 1.23.18 (2024-01-23)**
24
+
25
+ * Bug fixes:
26
+
27
+ * **Fixed** `3081 <https://github.com/pymupdf/PyMuPDF/issues/3081>`_: doc.close() not closing the document
28
+
29
+ * Other:
30
+
31
+ * Reduced size of sdist to fit on pypi.org (by reducing size of two test files).
32
+ * Fix `Annot.file_info()` if no `Desc` item.
33
+
34
+
35
+ **Changes in version 1.23.17 (2024-01-22)**
36
+
37
+ * Bug fixes:
38
+
39
+ * **Fixed** `3062 <https://github.com/pymupdf/PyMuPDF/issues/3062>`_: page_rotation_reset does not return page to original rotation
40
+ * **Fixed** `3070 <https://github.com/pymupdf/PyMuPDF/issues/3070>`_: update_link(): AttributeError: 'Page' object has no attribute 'super'
41
+
42
+ * Other:
43
+
44
+ * Fixed bug in `Page.links()` (PR #3075).
45
+ * Fixed bug in `Page.get_bboxlog()` with layers.
46
+ * Add support for timeouts in scripts/ and tests/run_compound.py.
47
+
48
+
5
49
  **Changes in version 1.23.16 (2024-01-18)**
6
50
 
7
51
  * Bug fixes:
@@ -626,7 +626,7 @@ def log(text, caller=0):
626
626
  sys.stdout.flush()
627
627
 
628
628
 
629
- def run(command, env_extra=None, check=1):
629
+ def run(command, env_extra=None, check=1, timeout=None):
630
630
  '''
631
631
  Runs a command using subprocess.run().
632
632
  Args:
@@ -637,13 +637,16 @@ def run(command, env_extra=None, check=1):
637
637
  to os.environ.
638
638
  check:
639
639
  Whether to raise exception if command fails.
640
+ timeout:
641
+ If not None, timeout in seconds; passed directory to
642
+ subprocess.run().
640
643
  '''
641
644
  env = None
642
645
  if env_extra:
643
646
  env = os.environ.copy()
644
647
  env.update(env_extra)
645
648
  log(f'Running: {command}')
646
- return subprocess.run(command, check=check, shell=1, env=env)
649
+ return subprocess.run(command, check=check, shell=1, env=env, timeout=timeout)
647
650
 
648
651
 
649
652
  def platform_tag():
@@ -30,6 +30,10 @@ Usage:
30
30
 
31
31
  * We run tests with pytest.
32
32
 
33
+ * One can generate call traces by setting environment variables in debug
34
+ builds. For details see:
35
+ https://mupdf.readthedocs.io/en/latest/language-bindings.html#environmental-variables
36
+
33
37
  Options:
34
38
  --help
35
39
  -h
@@ -63,6 +67,8 @@ Options:
63
67
  Pytest test name. Should be relative to PyMuPDF directory. For example:
64
68
  -t tests/test_general.py
65
69
  -t tests/test_general.py::test_subset_fonts
70
+ --timeout <seconds>
71
+ Sets timeout when running tests.
66
72
  -v
67
73
  Avoid delay if venv directory already exists. We assume the existing
68
74
  directory was created by us earlier and is a valid venv containing all
@@ -107,6 +113,7 @@ def main(argv):
107
113
  test_name = None
108
114
  venv_quick = False
109
115
  pytest_options = None
116
+ timeout = None
110
117
 
111
118
  args = iter( argv[1:])
112
119
  i = 0
@@ -139,6 +146,8 @@ def main(argv):
139
146
  pytest_options = next(args)
140
147
  elif arg == '-t':
141
148
  test_name = next(args)
149
+ elif arg == '--timeout':
150
+ timeout = float(next(args))
142
151
  elif arg == '-v':
143
152
  venv_quick = True
144
153
  elif arg == '--valgrind':
@@ -150,6 +159,16 @@ def main(argv):
150
159
  log(f'No command specified.')
151
160
  return
152
161
 
162
+ commands = list()
163
+ while 1:
164
+ assert arg in ('build', 'buildtest', 'test'), \
165
+ f'Unrecognised command: {arg=}.'
166
+ commands.append(arg)
167
+ try:
168
+ arg = next(args)
169
+ except StopIteration:
170
+ break
171
+
153
172
  # We always want to run inside a venv.
154
173
  if sys.prefix == sys.base_prefix:
155
174
  # We are not running in a venv.
@@ -171,23 +190,21 @@ def main(argv):
171
190
  venv_quick=venv_quick,
172
191
  test_name=test_name,
173
192
  pytest_options=pytest_options,
193
+ timeout=timeout,
174
194
  )
175
- while 1:
195
+
196
+ for command in commands:
176
197
  if 0:
177
198
  pass
178
- elif arg == 'build':
199
+ elif command == 'build':
179
200
  do_build()
180
- elif arg == 'test':
201
+ elif command == 'test':
181
202
  do_test()
182
- elif arg == 'buildtest':
203
+ elif command == 'buildtest':
183
204
  do_build()
184
205
  do_test()
185
206
  else:
186
- assert 0, f'Unrecognised command: {arg=}.'
187
- try:
188
- arg = next(args)
189
- except StopIteration:
190
- break
207
+ assert 0
191
208
 
192
209
 
193
210
  def show_help():
@@ -280,7 +297,7 @@ def build(implementations=None, build_type=None, build_isolation=None, venv_quic
280
297
  gh_release.run(f'pip install{build_isolation_text} -vv {pymupdf_dir}', env_extra=env_extra)
281
298
 
282
299
 
283
- def test(implementations, valgrind, venv_quick=False, test_name=None, pytest_options=None):
300
+ def test(implementations, valgrind, venv_quick=False, test_name=None, pytest_options=None, timeout=None):
284
301
  '''
285
302
  Args:
286
303
  implementations:
@@ -310,7 +327,11 @@ def test(implementations, valgrind, venv_quick=False, test_name=None, pytest_opt
310
327
  log(f'{venv_quick=}: Not installing test packages: {gh_release.test_packages}')
311
328
  else:
312
329
  gh_release.run(f'pip install {gh_release.test_packages}')
313
- implementations_args = f' -i {implementations}' if implementations else ''
330
+ run_compound_args = ''
331
+ if implementations:
332
+ run_compound_args += f' -i {implementations}'
333
+ if timeout:
334
+ run_compound_args += f' -t {timeout}'
314
335
  env_extra = None
315
336
  if valgrind:
316
337
  log('Installing valgrind.')
@@ -320,7 +341,7 @@ def test(implementations, valgrind, venv_quick=False, test_name=None, pytest_opt
320
341
 
321
342
  log('Running PyMuPDF tests under valgrind.')
322
343
  command = (
323
- f'{python} {pymupdf_dir_rel}/tests/run_compound.py{implementations_args}'
344
+ f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args}'
324
345
  f' valgrind --suppressions={pymupdf_dir_rel}/valgrind.supp --error-exitcode=100 --errors-for-leak-kinds=none --fullpath-after='
325
346
  f' {python} -m pytest {pytest_options} {pytest_arg}'
326
347
  )
@@ -332,12 +353,12 @@ def test(implementations, valgrind, venv_quick=False, test_name=None, pytest_opt
332
353
  # On OpenBSD `pip install pytest` doesn't seem to install the pytest
333
354
  # command, so we use `python -m pytest ...`. (This doesn't work on
334
355
  # Windows for some reason so we don't use it all the time.)
335
- command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{implementations_args} {python} -m pytest {pytest_options} {pytest_arg}'
356
+ command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args} {python} -m pytest {pytest_options} {pytest_arg}'
336
357
  else:
337
- command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{implementations_args} {python} -m pytest {pytest_options} {pytest_arg}'
358
+ command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args} {python} -m pytest {pytest_options} {pytest_arg}'
338
359
 
339
360
  log(f'Running tests with tests/run_compound.py and pytest.')
340
- gh_release.run(command, env_extra=env_extra)
361
+ gh_release.run(command, env_extra=env_extra, timeout=timeout)
341
362
 
342
363
  finally:
343
364
  log('\n' + venv_info(pytest_args=f'{pytest_options} {pytest_arg}'))
@@ -1072,7 +1072,7 @@ with open( f'{g_root}/READMErb.md', encoding='utf-8') as f:
1072
1072
  # We generate different wheels depending on g_flavour.
1073
1073
  #
1074
1074
 
1075
- version = '1.23.16'
1075
+ version = '1.23.19'
1076
1076
  version_b = '1.23.9'
1077
1077
 
1078
1078
  tag_python = None