PyMuPDF 1.24.6__tar.gz → 1.24.8__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 (202) hide show
  1. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/PKG-INFO +1 -1
  2. PyMuPDF-1.24.6/READMErb.md → PyMuPDF-1.24.8/READMEb.md +1 -1
  3. PyMuPDF-1.24.8/READMEd.md +4 -0
  4. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/changes.txt +24 -0
  5. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/pipcl.py +21 -15
  6. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/scripts/gh_release.py +61 -13
  7. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/scripts/sysinstall.py +1 -1
  8. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/scripts/test.py +27 -6
  9. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/setup.py +209 -159
  10. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/__init__.py +165 -236
  11. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/_apply_pages.py +1 -1
  12. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/extra.i +17 -5
  13. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/utils.py +8 -8
  14. PyMuPDF-1.24.8/tests/resources/test_3615.epub +0 -0
  15. PyMuPDF-1.24.8/tests/resources/test_3654.docx +0 -0
  16. PyMuPDF-1.24.8/tests/resources/test_3677.pdf +0 -0
  17. PyMuPDF-1.24.8/tests/resources/test_3687-3.epub +0 -0
  18. PyMuPDF-1.24.8/tests/resources/test_3687.epub +0 -0
  19. PyMuPDF-1.24.8/tests/resources/text-find-ligatures.pdf +0 -0
  20. PyMuPDF-1.24.8/tests/test_codespell.py +66 -0
  21. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_drawings.py +1 -1
  22. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_font.py +23 -0
  23. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_general.py +35 -3
  24. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_pagedelete.py +1 -1
  25. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_remove-rotation.py +1 -1
  26. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_showpdfpage.py +1 -1
  27. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_story.py +1 -1
  28. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_textextract.py +18 -4
  29. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_textsearch.py +15 -0
  30. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/wdev.py +87 -48
  31. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/COPYING +0 -0
  32. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/README.md +0 -0
  33. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/pyproject.toml +0 -0
  34. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/pytest.ini +0 -0
  35. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/__main__.py +0 -0
  36. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/fitz___init__.py +0 -0
  37. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/fitz_table.py +0 -0
  38. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/fitz_utils.py +0 -0
  39. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/pymupdf.py +0 -0
  40. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src/table.py +0 -0
  41. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/__init__.py +0 -0
  42. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/__main__.py +0 -0
  43. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/_config.h +0 -0
  44. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/fitz_old.i +0 -0
  45. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-annot.i +0 -0
  46. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-convert.i +0 -0
  47. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-defines.i +0 -0
  48. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-devices.i +0 -0
  49. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-fields.i +0 -0
  50. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-fileobj.i +0 -0
  51. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-geo-c.i +0 -0
  52. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-geo-py.i +0 -0
  53. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-globals.i +0 -0
  54. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-other.i +0 -0
  55. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-pdfinfo.i +0 -0
  56. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-pixmap.i +0 -0
  57. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-portfolio.i +0 -0
  58. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-python.i +0 -0
  59. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-select.i +0 -0
  60. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-stext.i +0 -0
  61. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/helper-xobject.i +0 -0
  62. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/utils.py +0 -0
  63. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/src_classic/version.i +0 -0
  64. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/README.md +0 -0
  65. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/conftest.py +0 -0
  66. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/gentle_compare.py +0 -0
  67. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/001003ED.pdf +0 -0
  68. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/1.pdf +0 -0
  69. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/2.pdf +0 -0
  70. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/2201.00069.pdf +0 -0
  71. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/3.pdf +0 -0
  72. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/4.pdf +0 -0
  73. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/Bezier.epub +0 -0
  74. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/PragmaticaC.otf +0 -0
  75. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/battery-file-22.pdf +0 -0
  76. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/bug1945.pdf +0 -0
  77. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/bug1971.pdf +0 -0
  78. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/chinese-tables.pdf +0 -0
  79. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/chinese-tables.pickle +0 -0
  80. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/circular-toc.pdf +0 -0
  81. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/cython.pdf +0 -0
  82. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/cython.pickle +0 -0
  83. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/dotted-gridlines.pdf +0 -0
  84. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/full_toc.txt +0 -0
  85. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/github_sample.pdf +0 -0
  86. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/has-bad-fonts.pdf +0 -0
  87. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/image-file1.pdf +0 -0
  88. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/img-transparent.png +0 -0
  89. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/joined.pdf +0 -0
  90. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/metadata.txt +0 -0
  91. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/mupdf_explored.pdf +0 -0
  92. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/nur-ruhig.jpg +0 -0
  93. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/quad-calc-0.pdf +0 -0
  94. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/simple_toc.txt +0 -0
  95. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/small-table.pdf +0 -0
  96. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/strict-yes-no.pdf +0 -0
  97. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/symbol-list.pdf +0 -0
  98. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/symbols.txt +0 -0
  99. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-2333.pdf +0 -0
  100. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-2462.pdf +0 -0
  101. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-2812.pdf +0 -0
  102. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-3143.pdf +0 -0
  103. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-3150.pdf +0 -0
  104. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-3207.pdf +0 -0
  105. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-3591.pdf +0 -0
  106. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-707448.pdf +0 -0
  107. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test-707673.pdf +0 -0
  108. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test2093.pdf +0 -0
  109. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test2182.pdf +0 -0
  110. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test2238.pdf +0 -0
  111. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_1645_expected_1.22.pdf +0 -0
  112. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_1645_expected_1.24.2.pdf +0 -0
  113. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_1645_expected_1.24.pdf +0 -0
  114. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_1645_expected_1.25.pdf +0 -0
  115. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_1824.pdf +0 -0
  116. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2108.pdf +0 -0
  117. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2270.pdf +0 -0
  118. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2533.pdf +0 -0
  119. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2548.pdf +0 -0
  120. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2553-2.pdf +0 -0
  121. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2553.pdf +0 -0
  122. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2596.pdf +0 -0
  123. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2608_expected +0 -0
  124. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2634.pdf +0 -0
  125. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2635.pdf +0 -0
  126. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2645_1.pdf +0 -0
  127. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2645_2.pdf +0 -0
  128. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2645_3.pdf +0 -0
  129. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2710.pdf +0 -0
  130. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2730.pdf +0 -0
  131. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2742.pdf +0 -0
  132. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2788.pdf +0 -0
  133. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2791_content.pdf +0 -0
  134. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2791_coverpage.pdf +0 -0
  135. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2861.pdf +0 -0
  136. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2871.pdf +0 -0
  137. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2885.pdf +0 -0
  138. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2904.pdf +0 -0
  139. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2907.pdf +0 -0
  140. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2954.pdf +0 -0
  141. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2957_1.pdf +0 -0
  142. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2957_2.pdf +0 -0
  143. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2969.pdf +0 -0
  144. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_2979.pdf +0 -0
  145. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3058.pdf +0 -0
  146. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3062.pdf +0 -0
  147. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3070.pdf +0 -0
  148. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3072.pdf +0 -0
  149. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3087.pdf +0 -0
  150. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3179.pdf +0 -0
  151. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3186.pdf +0 -0
  152. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3197.pdf +0 -0
  153. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3357.pdf +0 -0
  154. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3362.pdf +0 -0
  155. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3376.pdf +0 -0
  156. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3493.epub +0 -0
  157. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_3594.pdf +0 -0
  158. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_annot_file_info.pdf +0 -0
  159. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_delete_image.pdf +0 -0
  160. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/test_toc_count.pdf +0 -0
  161. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/type3font.pdf +0 -0
  162. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/v110-changes.pdf +0 -0
  163. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/resources/widgettest.pdf +0 -0
  164. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/run_compound.py +0 -0
  165. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_2548.py +0 -0
  166. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_2634.py +0 -0
  167. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_2791.py +0 -0
  168. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_2904.py +0 -0
  169. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_2907.py +0 -0
  170. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_annots.py +0 -0
  171. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_badfonts.py +0 -0
  172. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_balance_count.py +0 -0
  173. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_cluster_drawings.py +0 -0
  174. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_crypting.py +0 -0
  175. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_docs_samples.py +0 -0
  176. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_embeddedfiles.py +0 -0
  177. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_extractimage.py +0 -0
  178. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_flake8.py +0 -0
  179. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_geometry.py +0 -0
  180. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_imagebbox.py +0 -0
  181. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_import.py +0 -0
  182. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_insertimage.py +0 -0
  183. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_insertpdf.py +0 -0
  184. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_linequad.py +0 -0
  185. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_metadata.py +0 -0
  186. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_mupdf_regressions.py +0 -0
  187. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_named_links.py +0 -0
  188. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_nonpdf.py +0 -0
  189. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_object_manipulation.py +0 -0
  190. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_objectstreams.py +0 -0
  191. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_optional_content.py +0 -0
  192. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_page_links.py +0 -0
  193. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_pagelabels.py +0 -0
  194. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_pixmap.py +0 -0
  195. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_pylint.py +0 -0
  196. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_tables.py +0 -0
  197. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_tesseract.py +0 -0
  198. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_textbox.py +0 -0
  199. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_toc.py +0 -0
  200. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_widgets.py +0 -0
  201. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/tests/test_word_delimiters.py +0 -0
  202. {PyMuPDF-1.24.6 → PyMuPDF-1.24.8}/valgrind.supp +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyMuPDF
3
- Version: 1.24.6
3
+ Version: 1.24.8
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
@@ -1,4 +1,4 @@
1
- # PyMuPDF 1.24.6
1
+ # PyMuPDFb
2
2
 
3
3
  This wheel contains [MuPDF](https://mupdf.readthedocs.io/) shared libraries for
4
4
  use by [PyMuPDF](https://pymupdf.readthedocs.io/).
@@ -0,0 +1,4 @@
1
+ # PyMuPDFd
2
+
3
+ This wheel contains [MuPDF](https://mupdf.readthedocs.io/) build-time files
4
+ that were used to build [PyMuPDF](https://pymupdf.readthedocs.io/).
@@ -2,6 +2,30 @@ Change Log
2
2
  ==========
3
3
 
4
4
 
5
+ **Changes in version 1.24.8 (2024-07-22)**
6
+
7
+ * Fixed issues:
8
+
9
+ * **Fixed** `3636 <https://github.com/pymupdf/PyMuPDF/issues/3636>`_: API documentation for the open function is not obvious to find.
10
+ * **Fixed** `3654 <https://github.com/pymupdf/PyMuPDF/issues/3654>`_: docx parsing was broken in 1.24.7
11
+ * **Fixed** `3677 <https://github.com/pymupdf/PyMuPDF/issues/3677>`_: Unable to extract subset font name using the newer versions of PyMuPDF : 1.24.6 and 1.24.7.
12
+ * **Fixed** `3687 <https://github.com/pymupdf/PyMuPDF/issues/3687>`_: Page.get_text results in AssertionError for epub files
13
+
14
+ Other:
15
+
16
+ * Fixed various spelling mistakes spotted by codespell.
17
+ * Improved how we modify MuPDF's default configuration on Windows.
18
+ * Make text search to work with ligatures.
19
+
20
+
21
+ **Changes in version 1.24.7 (2024-06-26)**
22
+
23
+ * Fixed issues:
24
+
25
+ * **Fixed** `3615 <https://github.com/pymupdf/PyMuPDF/issues/3615>`_: Document.pagemode or Document.pagelayout crashes for epub files
26
+ * **Fixed** `3616 <https://github.com/pymupdf/PyMuPDF/issues/3616>`_: not last version reported
27
+
28
+
5
29
  **Changes in version 1.24.6 (2024-06-25)**
6
30
 
7
31
  * Fixed issues:
@@ -516,13 +516,7 @@ class Package:
516
516
  assert re.match('([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$', name, re.IGNORECASE), \
517
517
  f'Bad name: {name!r}'
518
518
 
519
-
520
- # PEP-440.
521
- assert re.match(
522
- r'^([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$',
523
- version,
524
- ), \
525
- f'Bad version: {version!r}.'
519
+ _assert_version_pep_440(version)
526
520
 
527
521
  # https://packaging.python.org/en/latest/specifications/binary-distribution-format/
528
522
  if tag_python:
@@ -614,7 +608,10 @@ class Package:
614
608
  # pypi.org.
615
609
  #
616
610
  import setuptools
617
- tag_platform = setuptools.distutils.util.get_platform().replace('-', '_').replace('.', '_')
611
+ tag_platform1 = setuptools.distutils.util.get_platform()
612
+ tag_platform2 = sysconfig.get_platform()
613
+ assert tag_platform1 == tag_platform2, f'{tag_platform1=} != {tag_platform2=}'
614
+ tag_platform = tag_platform2.replace('-', '_').replace('.', '_').lower()
618
615
 
619
616
  # We need to patch things on MacOS.
620
617
  #
@@ -1471,7 +1468,7 @@ def build_extension(
1471
1468
  debug2 = ''
1472
1469
  if debug:
1473
1470
  debug2 = '/Zi' # Generate .pdb.
1474
- # debug2 = '/Z7' # Embded debug info in .obj files.
1471
+ # debug2 = '/Z7' # Embed debug info in .obj files.
1475
1472
 
1476
1473
  # As of 2023-08-23, it looks like VS tools create slightly
1477
1474
  # .dll's each time, even with identical inputs.
@@ -1493,7 +1490,7 @@ def build_extension(
1493
1490
 
1494
1491
  # Input/output files:
1495
1492
  {T}{path_cpp} # /Tp specifies C++ source file.
1496
- /Fo{path_obj} # Output file.
1493
+ /Fo{path_obj} # Output file. codespell:ignore
1497
1494
 
1498
1495
  # Include paths:
1499
1496
  {includes_text}
@@ -1786,7 +1783,7 @@ def git_items( directory, submodules=False):
1786
1783
  ret = []
1787
1784
  for path in text.decode('utf8').strip().split( '\n'):
1788
1785
  path2 = os.path.join(directory, path)
1789
- # Sometimes git ls-files seems to list empty/non-existant directories
1786
+ # Sometimes git ls-files seems to list empty/non-existent directories
1790
1787
  # within submodules.
1791
1788
  #
1792
1789
  if not os.path.exists(path2):
@@ -1832,7 +1829,7 @@ def run( command, capture=False, check=1, verbose=1):
1832
1829
  nl = '\n'
1833
1830
  if verbose:
1834
1831
  log1( f'Running: {nl.join(lines)}')
1835
- sep = ' ' if windows() else '\\\n'
1832
+ sep = ' ' if windows() else ' \\\n'
1836
1833
  command2 = sep.join( lines)
1837
1834
  cp = subprocess.run(
1838
1835
  command2,
@@ -1884,8 +1881,8 @@ class PythonFlags:
1884
1881
 
1885
1882
  if windows():
1886
1883
  wp = wdev.WindowsPython()
1887
- self.includes = f'/I"{wp.root}\\include"'
1888
- self.ldflags = f'/LIBPATH:"{wp.root}\\libs"'
1884
+ self.includes = f'/I"{wp.include}"'
1885
+ self.ldflags = f'/LIBPATH:"{wp.libs}"'
1889
1886
 
1890
1887
  elif pyodide():
1891
1888
  _include_dir = os.environ[ 'PYO3_CROSS_INCLUDE_DIR']
@@ -2113,7 +2110,7 @@ def run_if( command, out, *prerequisites):
2113
2110
  '''
2114
2111
  doit = False
2115
2112
  cmd_path = f'{out}.cmd'
2116
-
2113
+
2117
2114
  if not doit:
2118
2115
  out_mtime = _fs_mtime( out)
2119
2116
  if out_mtime == 0:
@@ -2247,6 +2244,15 @@ def _fs_mtime( filename, default=0):
2247
2244
  except OSError:
2248
2245
  return default
2249
2246
 
2247
+
2248
+ def _assert_version_pep_440(version):
2249
+ assert re.match(
2250
+ r'^([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))*((a|b|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))?(\.dev(0|[1-9][0-9]*))?$',
2251
+ version,
2252
+ ), \
2253
+ f'Bad version: {version!r}.'
2254
+
2255
+
2250
2256
  g_verbose = int(os.environ.get('PIPCL_VERBOSE', '1'))
2251
2257
 
2252
2258
  def verbose(level=None):
@@ -59,6 +59,10 @@ action inputs, which can't be easily translated into command-line arguments.
59
59
 
60
60
  Building for Pyodide
61
61
 
62
+ If GITHUB_EVENT_NAME is 'schedule' we assume we are running as a scheduled
63
+ Github workflow, and if inputs_PYMUPDF_SETUP_MUPDF_BUILD is unset we change
64
+ it to use MuPDF master branch.
65
+
62
66
  If `inputs_wheels_linux_pyodide` is true and we are on Linux, we clone
63
67
  `emsdk.git`, set it up, and run `pyodide build`. This runs our setup.py
64
68
  with CC etc set up to create Pyodide binaries in a wheel called, for
@@ -73,6 +77,7 @@ import glob
73
77
  import inspect
74
78
  import os
75
79
  import platform
80
+ import re
76
81
  import shlex
77
82
  import subprocess
78
83
  import sys
@@ -208,6 +213,14 @@ def build( platform_=None, valgrind=False):
208
213
  # Build Pyodide wheel if specified.
209
214
  #
210
215
  if platform.system() == 'Linux' and inputs_wheels_linux_pyodide:
216
+ # In scheduled runs (by .github/workflows/test_pyodide.yml), use MuPDF
217
+ # master.
218
+ GITHUB_EVENT_NAME = os.getenv('GITHUB_EVENT_NAME')
219
+ if GITHUB_EVENT_NAME == 'schedule':
220
+ if inputs_PYMUPDF_SETUP_MUPDF_BUILD in ('', None):
221
+ log(f'Overriding inputs_PYMUPDF_SETUP_MUPDF_BUILD because {GITHUB_EVENT_NAME=} {inputs_PYMUPDF_SETUP_MUPDF_BUILD=}.')
222
+ inputs_PYMUPDF_SETUP_MUPDF_BUILD = 'git:--branch master https://github.com/ArtifexSoftware/mupdf.git'
223
+ log(f'{inputs_PYMUPDF_SETUP_MUPDF_BUILD=}')
211
224
  build_pyodide_wheel(inputs_wheels_implementations, inputs_PYMUPDF_SETUP_MUPDF_BUILD)
212
225
 
213
226
  # Build sdist(s).
@@ -250,7 +263,14 @@ def build( platform_=None, valgrind=False):
250
263
  # external symbol PyUnicode_DecodeRawUnicodeEscape`.
251
264
  # 2024-06-05: musllinux on aarch64 fails because libclang cannot find
252
265
  # libclang.so.
253
- set_if_unset( 'CIBW_SKIP', '"pp* *i686 cp36* cp37* *musllinux*aarch64*"')
266
+ #
267
+ # 2024-07-09: exclude Windows 32-bit Python-3.13 because when running
268
+ # under 32-bit Python-3.13, there is no 64-bit Python-3.13 available
269
+ # via `py -3.13`, which we need because libclang fails on 32-bit
270
+ # Windows. Hopefully this will work when Python-3.13 is officially
271
+ # released.
272
+ #
273
+ set_if_unset( 'CIBW_SKIP', 'pp* *i686 cp36* cp37* *musllinux*aarch64* cp313-win32')
254
274
 
255
275
  def make_string(*items):
256
276
  ret = list()
@@ -261,6 +281,15 @@ def build( platform_=None, valgrind=False):
261
281
 
262
282
  cps = inputs_wheels_cps if inputs_wheels_cps else 'cp38* cp39* cp310* cp311* cp312*'
263
283
  set_if_unset( 'CIBW_BUILD', cps)
284
+ for cp in cps.split():
285
+ m = re.match('cp([0-9]+)[*]', cp)
286
+ assert m
287
+ v = int(m.group(1))
288
+ if v == 313:
289
+ # Need to set CIBW_PRERELEASE_PYTHONS, otherwise cibuildwheel
290
+ # will refuse.
291
+ log(f'Setting CIBW_PRERELEASE_PYTHONS for Python version {cp=}.')
292
+ set_if_unset( 'CIBW_PRERELEASE_PYTHONS', '1')
264
293
 
265
294
  if platform.system() == 'Linux':
266
295
  set_if_unset(
@@ -346,6 +375,9 @@ def build( platform_=None, valgrind=False):
346
375
 
347
376
  run('pip install cibuildwheel')
348
377
 
378
+ # We include MuPDF build-time files on certain platforms.
379
+ flavour_d = platform.system() in ('Linux', 'Windows') and cpu_bits() == 64
380
+
349
381
  if inputs_flavours:
350
382
  # Build and test PyMuPDF and PyMuPDFb wheels.
351
383
  #
@@ -353,9 +385,13 @@ def build( platform_=None, valgrind=False):
353
385
  # First build PyMuPDFb wheel. cibuildwheel will build a single wheel
354
386
  # here, which will work with any python version on current OS.
355
387
  #
356
- env_set( 'PYMUPDF_SETUP_FLAVOUR', 'b', pass_=1)
388
+ flavour = 'b'
389
+ if flavour_d:
390
+ # Include MuPDF build-time files.
391
+ flavour += 'd'
392
+ env_set( 'PYMUPDF_SETUP_FLAVOUR', flavour, pass_=1)
357
393
  run( f'cibuildwheel{platform_arg}', env_extra)
358
- run( 'echo after flavour=b')
394
+ run( 'echo after {flavour=}')
359
395
  run( 'ls -l wheelhouse')
360
396
 
361
397
  # Now set environment to build PyMuPDF wheels. cibuildwheel will build
@@ -385,15 +421,21 @@ def build( platform_=None, valgrind=False):
385
421
 
386
422
  set_cibuild_test()
387
423
 
388
- env_set( 'PYMUPDF_SETUP_FLAVOUR', 'p', pass_=1)
424
+ # Build main PyMuPDF wheel.
425
+ flavour = 'p'
426
+ env_set( 'PYMUPDF_SETUP_FLAVOUR', flavour, pass_=1)
427
+ run( f'cibuildwheel{platform_arg}', env_extra=env_extra)
389
428
 
390
429
  else:
391
430
  # Build and test wheels which contain everything.
392
431
  #
432
+ flavour = 'pb'
433
+ if flavour_d:
434
+ flavour += 'd'
393
435
  set_cibuild_test()
394
- env_set( 'PYMUPDF_SETUP_FLAVOUR', 'pb', pass_=1)
436
+ env_set( 'PYMUPDF_SETUP_FLAVOUR', flavour, pass_=1)
395
437
 
396
- run( f'cibuildwheel{platform_arg}', env_extra=env_extra)
438
+ run( f'cibuildwheel{platform_arg}', env_extra=env_extra)
397
439
 
398
440
  run( 'ls -lt wheelhouse')
399
441
 
@@ -563,8 +605,11 @@ def pyodide_setup(clean=False):
563
605
  # Clone emsdk.
564
606
  #
565
607
  dir_emsdk = 'emsdk'
566
- if clean and os.path.exists(dir_emsdk):
567
- shutil.rmtree( dir_emsdk, ignore_errors=1)
608
+ if clean:
609
+ shutil.rmtree(dir_emsdk, ignore_errors=1)
610
+ # 2024-06-25: old `.pyodide-xbuildenv` directory was breaking build, so
611
+ # important to remove it here.
612
+ shutil.rmtree('.pyodide-xbuildenv', ignore_errors=1)
568
613
  if not os.path.exists(dir_emsdk):
569
614
  command += f' && echo "### cloning emsdk.git"'
570
615
  command += f' && git clone https://github.com/emscripten-core/emsdk.git {dir_emsdk}'
@@ -675,9 +720,8 @@ def log(text, caller=0):
675
720
  filename = frame_record.filename
676
721
  line = frame_record.lineno
677
722
  function = frame_record.function
678
- prefix = f'{relpath(filename, pymupdf_dir)}:{function}(): '
679
- print(textwrap.indent(text, prefix))
680
- sys.stdout.flush()
723
+ prefix = f'{relpath(filename, pymupdf_dir)}:{line}:{function}(): '
724
+ print(textwrap.indent(text, prefix), flush=1)
681
725
 
682
726
 
683
727
  def run(command, env_extra=None, check=1, timeout=None):
@@ -697,10 +741,14 @@ def run(command, env_extra=None, check=1, timeout=None):
697
741
  leave processes running if timeout expires.
698
742
  '''
699
743
  env = None
744
+ message = 'Running:'
700
745
  if env_extra:
701
746
  env = os.environ.copy()
702
747
  env.update(env_extra)
703
- log(f'Running: {command}')
748
+ for n, v in env_extra.items():
749
+ message += f' {n}={v}'
750
+ message += f' {command}'
751
+ log(message, caller=1)
704
752
  return subprocess.run(command, check=check, shell=1, env=env, timeout=timeout)
705
753
 
706
754
 
@@ -716,7 +764,7 @@ def platform_tag():
716
764
  assert 0, f'Unrecognised: {platform.system()=}'
717
765
 
718
766
 
719
- test_packages = 'pytest fontTools pymupdf-fonts flake8 pylint'
767
+ test_packages = 'pytest fontTools pymupdf-fonts flake8 pylint codespell'
720
768
  if platform.system() == 'Windows' and cpu_bits() == 32:
721
769
  # No pillow wheel available, and doesn't build easily.
722
770
  pass
@@ -15,7 +15,7 @@ We run install commands with `sudo` if `--root /` is used.
15
15
  Note that we run some commands with sudo; it's important that these use the
16
16
  same python as non-sudo, otherwise things can be build and installed for
17
17
  different python versions. For example when we are run from a github action, it
18
- should not do `- uses: actions/setup-python@v2` but instead use whatever system
18
+ should not do `- uses: actions/setup-python@v5` but instead use whatever system
19
19
  python is already defined.
20
20
 
21
21
  Args:
@@ -17,7 +17,7 @@ Examples:
17
17
  Build and test using internal checkout of mupdf 1.24.x branch from Github.
18
18
 
19
19
  Usage:
20
- scripts/test.py <options> <commands>
20
+ scripts/test.py <options> <command(s)>
21
21
 
22
22
  * Commands are handled in order, so for example `build` should usually be
23
23
  before `test`.
@@ -60,7 +60,7 @@ Options:
60
60
  Location of local mupdf/ directory or 'git:...' to be used
61
61
  when building PyMuPDF. [This sets environment variable
62
62
  PYMUPDF_SETUP_MUPDF_BUILD, which is used by PyMuPDF/setup.py. If not
63
- specifed PyMuPDF will download its default mupdf .tgz.]
63
+ specified PyMuPDF will download its default mupdf .tgz.]
64
64
  -p <pytest-options>
65
65
  Set pytest options; default is ''.
66
66
  -t <names>
@@ -81,6 +81,10 @@ Options:
81
81
  If true (the default on non-OpenBSD systems), we let pip create and use
82
82
  its own new venv to build PyMuPDF. Otherwise we force pip to use the
83
83
  current venv.
84
+ --build-flavour <build_flavour>
85
+ Combination of 'p', 'b', 'd'. See ../setup.py's description of
86
+ PYMUPDF_SETUP_FLAVOUR. Default is 'pb', i.e. self-contained PyMuPDF
87
+ wheels without MuPDF build-time files.
84
88
  --build-mupdf 0|1
85
89
  Whether to rebuild mupdf when we build PyMuPDF. Default is 1.
86
90
  --gdb 0|1
@@ -101,6 +105,8 @@ Commands:
101
105
  test
102
106
  Runs PyMuPDF's pytest tests in venv. Default is to test rebased and
103
107
  unoptimised rebased; use `-i` to change this.
108
+ wheel
109
+ Build wheel.
104
110
 
105
111
  Environment:
106
112
  PYMUDF_SCRIPTS_TEST_options
@@ -131,8 +137,10 @@ def main(argv):
131
137
  build_isolation = None
132
138
  valgrind = False
133
139
  s = True
140
+ build_do = 'i'
134
141
  build_type = None
135
142
  build_mupdf = True
143
+ build_flavour = 'pb'
136
144
  gdb = False
137
145
  test_fitz = True
138
146
  implementations = None
@@ -187,6 +195,8 @@ def main(argv):
187
195
  timeout = float(next(args))
188
196
  elif arg == '-v':
189
197
  venv = int(next(args))
198
+ elif arg == '--build-flavour':
199
+ build_flavour = next(args)
190
200
  elif arg == '--build-mupdf':
191
201
  build_mupdf = int(next(args))
192
202
  elif arg == '--gdb':
@@ -202,7 +212,7 @@ def main(argv):
202
212
 
203
213
  commands = list()
204
214
  while 1:
205
- assert arg in ('build', 'buildtest', 'test'), \
215
+ assert arg in ('build', 'buildtest', 'test', 'wheel'), \
206
216
  f'Unrecognised command: {arg=}.'
207
217
  commands.append(arg)
208
218
  try:
@@ -223,13 +233,15 @@ def main(argv):
223
233
  )
224
234
  return
225
235
 
226
- def do_build():
236
+ def do_build(wheel=False):
227
237
  build(
228
238
  implementations=implementations,
229
239
  build_type=build_type,
230
240
  build_isolation=build_isolation,
231
241
  venv_quick=venv_quick,
232
242
  build_mupdf=build_mupdf,
243
+ build_flavour=build_flavour,
244
+ wheel=wheel,
233
245
  )
234
246
  def do_test():
235
247
  test(
@@ -254,6 +266,8 @@ def main(argv):
254
266
  elif command == 'buildtest':
255
267
  do_build()
256
268
  do_test()
269
+ elif command == 'wheel':
270
+ do_build(wheel=True)
257
271
  else:
258
272
  assert 0
259
273
 
@@ -312,6 +326,8 @@ def build(
312
326
  build_isolation=None,
313
327
  venv_quick=False,
314
328
  build_mupdf=True,
329
+ build_flavour='pb',
330
+ wheel=False,
315
331
  ):
316
332
  '''
317
333
  Args:
@@ -363,7 +379,12 @@ def build(
363
379
  env_extra['PYMUPDF_SETUP_MUPDF_REBUILD'] = '0'
364
380
  if build_type:
365
381
  env_extra['PYMUPDF_SETUP_MUPDF_BUILD_TYPE'] = build_type
366
- gh_release.run(f'pip install{build_isolation_text} -vv {pymupdf_dir}', env_extra=env_extra)
382
+ if build_flavour:
383
+ env_extra['PYMUPDF_SETUP_FLAVOUR'] = build_flavour
384
+ if wheel:
385
+ gh_release.run(f'pip wheel{build_isolation_text} -v {pymupdf_dir}', env_extra=env_extra)
386
+ else:
387
+ gh_release.run(f'pip install{build_isolation_text} -v {pymupdf_dir}', env_extra=env_extra)
367
388
 
368
389
 
369
390
  def test(
@@ -440,7 +461,7 @@ def test(
440
461
  elif gdb:
441
462
  command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args} gdb --args {python} -m pytest {pytest_options} {pytest_arg}'
442
463
  elif platform.system() == 'Windows':
443
- # `python -m pytest` doesn' seem to work.
464
+ # `python -m pytest` doesn't seem to work.
444
465
  command = f'{python} {pymupdf_dir_rel}/tests/run_compound.py{run_compound_args} pytest {pytest_options} {pytest_arg}'
445
466
  else:
446
467
  # On OpenBSD `pip install pytest` doesn't seem to install the pytest