Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and update installation dependencies in documentation #1391

Closed
jeroenlandheer opened this issue Jul 10, 2021 · 5 comments · Fixed by #1405
Closed

Add and update installation dependencies in documentation #1391

jeroenlandheer opened this issue Jul 10, 2021 · 5 comments · Fixed by #1405
Labels
documentation Problems or improvements needed on the documentation or on the website
Milestone

Comments

@jeroenlandheer
Copy link

On this page: .../v52.5/docs/install.rst

The installation instructions for Alpine do not mention the package python3-dev. This package is needed for CFFI, since this is built from source when you install it via pip.

Hope this helps.

@jeroenlandheer jeroenlandheer changed the title Alpine needs the package python3-dev WeasyPrint on Alpine depends the package python3-dev when installing via pip Jul 10, 2021
@mikerockett
Copy link

Bumped into this as well, for the latest beta. On a similar note, it seems that harfbuzz and zopfli are required, the latter seemingly is specific to Alpine (?).

After fixing (using -dev), and getting the dependencies straight (one by one, after errors), I cannot get v53 beta 2 to run in an Alpine CI environment. It always exits with signal 11 (segfault).

I have the following to setup dependencies:

apk add -q fontconfig-dev gcc gdk-pixbuf-dev harfbuzz-dev jpeg-dev libffi-dev musl-dev \
  pango-dev py3-brotli py3-cffi py3-pillow py3-pip py3-setuptools py3-wheel python3-dev zlib-dev zopfli-dev

Is this correct? I'm thinking something is missing, but not sure what it is as WeasyPrint gets installed correctly, using pip3 -q install WeasyPrint==53.0b2.

Then, output of --info:

/usr/lib/python3.9/site-packages/weasyprint/text/fonts.py:72: UserWarning: FontConfig: No fonts configured. Expect ugly output.
  warnings.warn(
System: Linux
Machine: x86_64
Version: #1 SMP Tue Mar 23 09:27:39 UTC 2021
Release: 5.10.25-linuxkit

WeasyPrint version: 53.0b2
Python version: 3.9.5
Pydyf version: 0.0.3
Pango version: 14805

But, back to the issue opened here, I think that the docs really need to be updated to include instructions for installing globally on various Linux distros, just like the old docs did. Most people will install from source, as OS package managers are generally behind a version or two (see #1384 for a related issue, found with pango). v53 will not land in major OS distros any time soon (a lot of them are still using v51), and finding repos for these things isn't always easy (for the average user, anyway) or convenient.

@liZe
Copy link
Member

liZe commented Jul 10, 2021

Bumped into this as well, for the latest beta. On a similar note, it seems that harfbuzz and zopfli are required, the latter seemingly is specific to Alpine (?).

We’ll check this. We shouldn’t have to rely on gcc and all the -dev packages if py3-cffi is installed.

After fixing (using -dev), and getting the dependencies straight (one by one, after errors), I cannot get v53 beta 2 to run in an Alpine CI environment. It always exits with signal 11 (segfault).

That’s probably because of the warning you get with --info. Installing some fonts could fix the problem.

But, back to the issue opened here, I think that the docs really need to be updated to include instructions for installing globally on various Linux distros, just like the old docs did.

You’re right.

@liZe liZe changed the title WeasyPrint on Alpine depends the package python3-dev when installing via pip Add and update installation dependencies in documentation Jul 10, 2021
@liZe liZe added the documentation Problems or improvements needed on the documentation or on the website label Jul 10, 2021
@liZe liZe added this to the 53.0 milestone Jul 10, 2021
@AlexanderNeilson
Copy link

I was listening to a Talk Python to Me episode the other day on running docker in production and they were talking about how Alpine linux uses a different C library that isn't the same as how binary wheels are build currently. So this additional requirement may all stem from an inability to use the binary wheels when working with Alpine.

I don't work using Alpine linux nor do I deploy on docker. So I can't talk with much authority however if others are in the same boat this may help guide understanding for documenting this.

@mikerockett
Copy link

Thanks @liZe – I'll try installing a font to see if it makes a difference.

@liZe
Copy link
Member

liZe commented Jul 12, 2021

(We should take care of the latest comment of #1384 too.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Problems or improvements needed on the documentation or on the website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants