Skip to content

pygobject/cairo-win-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cairo-win-build

cairo-win-build is a companion project to the pycairo Python bindings for the cairo graphics library. It provides a static Windows build of cairo including all its dependencies (zlib, pixman, libpng) which pycairo uses for its binary Windows wheels.

In addition to cairo it also provides a static build of pkgconf which is required by pycairo during its wheel build process for locating dependencies.

The build process is based on the meson build system and uses Visual Studio on GitHub Actions to automatically build and publish everything. See the workflow file for details. You can of course also build everything locally yourself, see the instructions below.

Let us know if there is anything we can do to make things better or to cover a wider range of use cases.

Manual build instructions

# install meson and ninja
pip install -r requirements.txt

# build cairo
cd cairo-build
meson setup buildDir --prefix=/
meson compile -C buildDir
meson install -C buildDir --destdir ../dist
# see ./dist for the result

# build pkgconf
cd ../pkgconf-build
meson setup buildDir --prefix=/
meson compile -C buildDir
meson install -C buildDir --destdir ../dist
# see ./dist for the result

Updating dependencies

All dependencies and cairo itself are included via the meson wrap system and we depend on the meson WrapDB for updates. The following is required to pull in new versions from pypi and wrapdb:

# manually update meson/ninja in requirements.txt
pip install -r requirements.txt
# update wrap files from wrapdb
meson wrap update --sourcedir cairo-build
meson wrap update --sourcedir pkgconf-build

Creating a new release

  • Create a new release in the GH UI
  • GHA will do the rest