Skip to content

Issue compiling with Nuitka #4126

@RedTTG

Description

@RedTTG

Description of the bug

pymupdf.mupdf fails to compile with nuitka due to the massive c file it generates.
I have mentioned this issue to nuitka but maybe you can take a look at it too
Nuitka/Nuitka#3243

How to reproduce the bug

install python 3.9 (tested in other versions and OSes too)
pip install nuitka pymupdf
have a test.pdf and a simple code as such in a file for example named test_pymupdf.py:

import pymupdf

pdf = pymupdf.open('test.pdf', filetype='pdf')

pdf_page = pdf[0]

pdf_page.get_pixmap().writePNG('test.png')

try to compile it with nuitka:
nuitka --mode=app --script-name=test_pymupdf.py
PASS 1 will take an absurdly long time (hour or so)
Then the compilation of the massive c file for mupdf will usually overload github action memory, on a beefy machine it might compile but probably after a few hours

PyMuPDF version

1.25.0

Operating system

Windows

Python version

3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions