Re: pygtk2 and its numpy dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> pygtk2 implements a function called gtk.gdk.get_pixels_array(), which
> returns the pixel contents of a GDK pixbuf as a numpy array.  Fine and
> dandy, but this means it links against numpy (7 megs) which is itself
> linked against atlas (12 megs).  Kind of a lot for a single function,
> especially on a live image.
>
> Especially for a function that's basically unused!  gnome-applet-music
> uses it to implement a poor-man's Porter-Duff blend, and that's the only
> caller currently packaged in Fedora, at least according to package deps.
> I have a patch (attached) that fixes that [1], which means we could
> compile our pygtk2 without numpy support and not break anything in
> Fedora proper.
>
> However, google codesearch does turn up what look like a few other users
> of that function, some of which we may actually want to ship someday.
> So we've got options:
>
> a) remove the explicit Requires: numpy from pygtk2, require apps that
> actually want this function to Require it themselves
>
> b) fake the numpy data type ABI in pygtk2 itself by cult-and-pasting it
> from numpy
>
> c) declare that get_pixels_array() just doesn't work in Fedora
> (historically true, back in like FC3)
>
> d) leave things as they are
>
> I lean towards a).  I think b) is icky but doable, since that ABI is
> effectively unbreakable anyway (inherited from the older python-numeric
> module).  The other two are way lame.
>
> Thoughts?

I know sugar use numpy and pygtk. They had forked pygtk packages with
patches so that they could use the functionality in older releases.
I'm not sure whether including adding numpy to the requires would work
or not as I don't know the codebase.

Peter

> [1] - Readers are invited to count the wtf's in the code being replaced,
> as well as in its callers.  Don't treat it as a drinking game though.

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux