Repository navigation
Conversation
…h system MuPDF. This was handled in 1.28.0 and is still documented at the top of setup.py, but was lost in 2.0. Without it libpaths is None with system MuPDF, and on MacOS pipcl.macos_patch2() fails with TypeError: 'NoneType' object is not iterable.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In 2.0,
_extension_flags()no longer readsPYMUPDF_MUPDF_LIB, although the docstring at the top ofsetup.pystill documents it and 1.28.0 used it. When building against system MuPDF (PYMUPDF_SETUP_MUPDF_BUILD=),libpathsis thereforeNone.On Linux the build still works if
LDFLAGShas the right-L. On macOS,pipcl.build_extension()callsmacos_patch2(path_so, libpaths, libs)after linking, and that fails:This PR restores the 1.28.0 behaviour: with system MuPDF,
libpathscomes from colon-separatedPYMUPDF_MUPDF_LIBandlibrariesisNone. Behaviour whenmupdf_libis set is unchanged.Seen and verified in the conda-forge build of 2.0, which applies the same change as a patch: macOS builds went from failing to passing (conda-forge/pymupdf-feedstock#60).
🤖 Generated with Claude Code