fonttools / skia-pathops

Python bindings for the Skia library's Path Ops
https://skia.org/docs/dev/present/pathops/
BSD 3-Clause "New" or "Revised" License
47 stars 14 forks source link

rewrite as a pure-python wrapper of kyamagu/skia-python? #38

Open anthrotype opened 3 years ago

anthrotype commented 3 years ago

Building skia is slow, we have to do it each time we push. There's a new project that provides cross-platform python bindings to the Skia library and publishes wheels for the three platforms we support:

https://github.com/kyamagu/skia-python

I'm thinking that we could rewrite skia-pathops such that it imports from this skia-python bindings, while maintaining our current fontmake-friendly interface.

anthrotype commented 3 years ago

Or maybe I just build the linux and macos skia static libraries once and for all, like we already do for windows in https://github.com/fonttools/skia-builder, and download the pre-compiled object that can I link in the cython extension module..

alerque commented 3 years ago

Or maybe I just build the linux and macos skia static libraries once and for all, like we already do for windows in fonttools/skia-builder, and download the pre-compiled object that can I link in the cython extension module..

Your first idea was better. This one would make for a downstream nightmare when packaging for distros (I say this as one of the the Arch Linux maintainers for both this an python-skia). Downloading blobs as part of a build process is a pretty big no-no for many distros.

anthrotype commented 3 years ago

downloading the pre-compiled blobs is only meant for the CI setup that builds the python wheels. skia-pathops extension module can be built from source without problems (bulinding from source is the default setting), whether with an embedded skia static library or by pointing to an external skia library (the latter is likely the preferred approach for distro maintainers).

alerque commented 3 years ago

downloading the pre-compiled blobs is only meant for the CI setup that builds the python wheels

Oh, my bad. I misunderstood what you were talking about there. As long as building from source is the default (or a possible) build configuration for distro packaging purposes I guess it doesn't matter to me much how PyPi comes by its wheels.