Giter VIP home page Giter VIP logo

Comments (5)

julian-smith-artifex-com avatar julian-smith-artifex-com commented on August 24, 2024

[Making PyMuPDF use an installed MuPDF is non-trivial because we require MuPDF's Python bindings, which are probably not installed.]

I have an experimental PyMuPDF musllinux wheel at: http://ghostscript.com/~julian/PyMuPDF-1.24.5-cp312-none-musllinux_1_2_x86_64.whl

I've no idea whether it will work on Alpine Linux, but if you could try it out that would be appreciated. For example:

wget http://ghostscript.com/~julian/PyMuPDF-1.24.5-cp312-none-musllinux_1_2_x86_64.whl
pip install PyMuPDF-1.24.5-cp312-none-musllinux_1_2_x86_64.whl

[I can build for a different Python version if required.]

from pymupdf.

julian-smith-artifex-com avatar julian-smith-artifex-com commented on August 24, 2024

Apologies, the wheel above is for x86_64, not aarch64.

Unfortunately building for musllinux aarch64 on Github does not work because the Python libclang package appears to be broken - it cannot find libclang.so at runtime.

If you have a working build (even if very slow), could you give details of the system?

from pymupdf.

quinnjr avatar quinnjr commented on August 24, 2024

I'm currently running the following Docker container and copying the completed wheel out of it for install. Haven't had much time recently to test full compatibility due to work crunch (not detecting its building for musl linux).

FROM --platform=arm64 alpine:latest

RUN apk update && apk add python3 py3-pip py3-wheel musl-dev jpeg-dev zlib-dev freetype-dev clang clang-dev llvm m4 cmake python3-dev build-base swig

ENV VERSION=1.24.5

WORKDIR /tmp

RUN <<EOF
  pip install --break-system-packages libclang
  wget https://github.com/pymupdf/PyMuPDF/archive/refs/tags/$VERSION.tar.gz
  tar -xvf $VERSION.tar.gz
  cd PyMuPDF-$VERSION
  PYMUPDF_SETUP_MUPDF_TESSERACT=0 python3 setup.py bdist_wheel
EOF

WORKDIR /project
docker build -t pymupdf .
docker run -v $(pwd):/project -it pymupdf

cp /tmp/PyMuPDF-1.24.5/dist/PyMuPDF-1.24.5-cp312-none-linux_aarch64.whl /project

from pymupdf.

julian-smith-artifex-com avatar julian-smith-artifex-com commented on August 24, 2024

Do you know why this uses --break-system-packages in the command pip install --break-system-packages libclang?

This looks like it might be working around the problem that i'm seeing.

from pymupdf.

quinnjr avatar quinnjr commented on August 24, 2024

from pymupdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.