Build wheels with compiled libraries
See original GitHub issueOne good thing about wheels is that it allow us to embed DLL files. So simply adding all DLL files and making the wheel platform specific would significantly help users by not installing system dependencies. I recently made a PR in cairocffi repo https://github.com/Kozea/cairocffi/pull/164 providing a way to do so. I got a nice repo which builds cairo as a single DLL file so I could do that. But here I couldn’t find the one for Pango ( I don’t think anything else is needed). So, finding a way to build that would be good or rather it can also be taken from msys2 in case of windows and brew in case of MacOS. I don’t about linux.
What I did there was not that correct I think but I don’t know. Possibly there should be a better solution and I started searching for similar libraries.
I found freetype-py
which had a script to build freetype same thing can be done here also I think.
Next, I found this issue https://github.com/pypa/wheel/issues/128 which is more related and from that thread I found pypandoc
where their implementation was very good IMHO, See setup.py
.
Next, I found this thread at stackoverflow https://stackoverflow.com/questions/45150304/how-to-force-a-python-wheel-to-be-platform-specific-when-building-it.
Next, I find another interesting thing which is used with cffi
is milksnake
which simply suited this one but I haven’t tried using it.
Sorry, for a braindump I thought I would organize it a little better but I didn’t find time.
Finally, the conclusion is there must be platform specific wheel so that weasyprint can simply be installed using pip
without any system dependencies.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (13 by maintainers)
Thank you!
The libraries directly used by WeasyPrint in
master
are Pango and some of its dependencies:I’m really scared of adding a way to specify custom DLL names in WeasyPrint, because I’m afraid that it will add another configuration layer and cause bugs with a more complex way to debug. If it’s only done in the wheel (with specific code in the building script), then why not.
Gdk-Pixbuf is not needed anymore 😉.
We’ve worked hard to remove
setup.py
, so it would be a good idea to find a solution without it 😉.