After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685094 - pygobject should not hard depend in cairo
pygobject should not hard depend in cairo
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-29 10:23 UTC by jessevdk@gmail.com
Modified: 2012-10-15 05:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to make building tests optional (1.56 KB, patch)
2012-10-08 20:39 UTC, Patrick Welche
rejected Details | Review

Description jessevdk@gmail.com 2012-09-29 10:23:51 UTC
It's not really cool that pygobject has a hard dependency on cairo just so it can build the test. I'm using pygobject on OS X and I'm fine with not running the tests during the build. Having cairo as a dependency for my little library just because pygobject needs it to run a test during the build is not so nice.
Comment 1 Patrick Welche 2012-10-08 20:39:07 UTC
Created attachment 226071 [details] [review]
Patch to make building tests optional
Comment 2 Patrick Welche 2012-10-08 20:39:31 UTC
I just hit that yesterday, and wrote the following patch, which may well bear a striking resemblance to glib's --disable-modular-tests...
Comment 3 Martin Pitt 2012-10-11 13:00:08 UTC
Hm, does that actually work for you? It doesn't disable the usage of pycairo along with it, and pycairo needs libcairo already. Also, libcairo is already needed by GTK and Pango, i. e. even on a reasonably small GNOME-ish build you would already need it.

I think we need a more complete patch then to completely disable all usages of cairo in the code if you want to build this without cairo. It's not just the tests, it's also gi/pygi-foreign-cairo.c (which you couldn't build without cairo) and gi/overrides/Gdk.py, which you couldn't load without cairo either.
Comment 4 Patrick Welche 2012-10-12 14:31:26 UTC
I think you are missing the existence of "--disable-cairo" which already avoids compiling pygi-foreign-cairo.c and _gi_cairo.la.

The point is that even if you attempt configuring with --disable-cairo, you still can't build because of the cairo dependence on the tests.

That's why my patch adds a --disable-tests flags to avoid building the tests.

So configure --disable-cairo --disable-tests avoids the cairo dependence.

BTW do you have any thoughts on

  https://mail.gnome.org/archives/python-hackers-list/2012-October/msg00005.html

because it seems to me that libffi is no longer a direct dependency either...
Comment 5 Martin Pitt 2012-10-15 05:47:54 UTC
I still don't quite like this patch, to be honest.

It's a little more effort, but with this it's enough to just specify --disable-cairo and it will just skip the tests that actually need it:

http://git.gnome.org/browse/pygobject/commit/?id=75e373b99c3cb66dd60b13c803e5f7eec77cc415

With that, I get

----------------------------------------------------------------------
Ran 621 tests in 5.444s

OK (skipped=59, expected failures=1)

which still provides a good code coverage.

This only rearranges the build system a bit and otherwise only affects tests, so this is fine for 3.6.1 (which is due today).

As for libffi, I need to look into that. I'll answer on the ML.