From 6bdf07817105452f93d54c676e8da97f17c534dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3=20=C3=81gila=20Bitsch?= Date: Wed, 6 Nov 2024 15:21:34 +0100 Subject: [PATCH 1/2] Update install instructions for alpine As per the discussion in #699, document an easier way to install WeasyPrint from PyPI when using prebuilt wheels. --- docs/first_steps.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/first_steps.rst b/docs/first_steps.rst index 643365df4..04bda79e6 100644 --- a/docs/first_steps.rst +++ b/docs/first_steps.rst @@ -77,7 +77,13 @@ To install WeasyPrint using your distribution’s package:: apk add weasyprint -To install WeasyPrint, you need the following packages:: +To install WeasyPrint inside a virtualenv using wheels (if possible), you need +the following packages:: + + apk add py3-pip so:libgobject-2.0.so.0 so:libpango-1.0.so.0 so:libharfbuzz.so.0 so:libharfbuzz-subset.so.0 so:libfontconfig.so.1 so:libpangoft2-1.0.so.0 + +To install WeasyPrint inside a virtualenv without using wheels, you need the +following packages:: apk add py3-pip gcc musl-dev python3-dev pango zlib-dev jpeg-dev openjpeg-dev g++ libffi-dev harfbuzz-subset From 7562e08471fab2312019bb00aa381e8f36797f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3=20=C3=81gila=20Bitsch?= Date: Mon, 11 Nov 2024 19:31:10 +0100 Subject: [PATCH 2/2] Update install instructions for alpine without wheels Updated to match the format of the dependencies with wheels. Also added `libwebp-dev` to the build dependencies. Otherwise building would work but running ``` weasyprint https://weasyprint.org/ /tmp/test.pdf ``` would fail to include the webp images with error code ``` /usr/lib/python3.10/site-packages/PIL/Image.py:3496: UserWarning: image file could not be identified because WEBP support not installed ``` The prebuilt `Pillow` binary in the wheel includes `webp` support already. ``` --- docs/first_steps.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/first_steps.rst b/docs/first_steps.rst index 04bda79e6..0028ad75b 100644 --- a/docs/first_steps.rst +++ b/docs/first_steps.rst @@ -85,7 +85,8 @@ the following packages:: To install WeasyPrint inside a virtualenv without using wheels, you need the following packages:: - apk add py3-pip gcc musl-dev python3-dev pango zlib-dev jpeg-dev openjpeg-dev g++ libffi-dev harfbuzz-subset + apk add py3-pip so:libgobject-2.0.so.0 so:libpango-1.0.so.0 so:libharfbuzz.so.0 so:libharfbuzz-subset.so.0 so:libfontconfig.so.1 so:libpangoft2-1.0.so.0 + apk add gcc musl-dev python3-dev zlib-dev jpeg-dev openjpeg-dev libwebp-dev g++ libffi-dev Archlinux