GObject introspection support #22314

Closed
wants to merge 13 commits into
from

Projects

None yet

6 participants

@krrk
Contributor
krrk commented Sep 4, 2013

Here are a variety of patches adding gobject introspection support to a number of packages along with some version bumps. pygobject3 has been forked off from the pygobject formula, which will be retained to support the 2.0 series. While pygobject3 has a with-tests option to run the package's testsuite, this currently fails on my machine, hanging in test_tree_view (test_override_gtk.TestTreeView) with high CPU usage after most other tests have succeeded. Python 3 support would require py3cairo and can be added in the future. GObject Introspection is necessary for Gtk+3 python bindings and thus Gtk+3's dependencies (gdk-pixbuf, atk and pango) require gobject intorospection.

@jacknagel
Contributor

Note, please don't update gnome software to x.{odd} versions, they are considered development releases.

@samueljohn
Contributor

Glad someone tackles this! 👍 @krrk

@krrk
Contributor
krrk commented Sep 5, 2013

I have realized that to support pygobject3 for python 3 it would need to be a separate formula to have a separate name. In Debian the packages for python GObject bindings are as follows:

python-gobject: Python 2.x bindings for GObject - transitional package (version 3.x)
python-gobject-2: deprecated static Python bindings for the GObject library (version 2.x)
python3-gi: Python 3 bindings for gobject-introspection libraries (version 3.x)
python3-gi-cairo: Python 3 Cairo bindings for the GObject library (version 3.x)

I believe that python3-gi and python3-gi-cairo do not need to be separate and cairo support can be built along with gobject-introspection for the same build. I have prepared a formula for py3cairo to do this, but what would be the best naming convention for pygobject3 for python 2.x and pygobject3 for python 3.x?

@samueljohn
Contributor

For pyqt and PySide I was able to create python bindings for 2.x and 3.x so we don't end up with all those -py3 and -py3 formulae.
I wrote a bit in the wiki about the python do ... end block to support such a thing.

@adamv
Contributor
adamv commented Sep 10, 2013

Can this be split into two (or more) pull requests? Some of these changes can possibly be pulled ahead of other ones.

@adamv
Contributor
adamv commented Sep 17, 2013

For instance, separate out a pull request that games gnome-common to 3.6.x

@krrk
Contributor
krrk commented Sep 20, 2013

Hi Adam, I will be able to get to this next week. I have been extremely
busy recently.
On Sep 17, 2013 1:47 PM, "Adam Vandenberg" notifications@github.com wrote:

For instance, separate out a pull request that games gnome-common to 3.6.x


Reply to this email directly or view it on GitHubhttps://github.com/mxcl/homebrew/pull/22314#issuecomment-24608050
.

@MikeMcQuaid
Member

@BrewTestBot test this please

krrk added some commits Sep 4, 2013
@krrk krrk gdk-pixbuf: Enable gobject introspection
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
899b1c7
@krrk krrk atk: Enable gobject introspection
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
3b27170
@krrk krrk gtk+3: Enable gobject introspection
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
df6a860
@krrk krrk pango: Enable gobject introspection
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
1652dd9
@krrk krrk gobject-introspection: Override GOBJECT_INTROSPECTION_LIBDIR
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
1ff4e1a
@krrk krrk gobject-introspection: Add optional tests
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
afbd4ea
@krrk krrk pygobject3: Add formula for 3.8.3
Due to the major bump, we have retained the pygobject 2.0 line.

Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
9afd706
@krrk krrk pygobject3: Add tests
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
d3db3cf
@krrk krrk pygobject3: Fix XDG_DATA_DIRS
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
651ad1b
@krrk krrk py3cairo: Add formula for py3cairo 1.10.0. This seems necessary as `p…
…ip3 install pycairo` failed to install. The name py3cairo matches what Debian uses but disagrees with the developers calling it pycairo; however, the pygobject and other projects look for py3cairo.

Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
db79bcb
@krrk
Contributor
krrk commented Oct 13, 2013

@mikemcquaid I have rebased this pull request on the up-to-date master to address the failed test build.
@adamv I have opened 5 new pull requests for prerequisites
@BrewTestBot test this please

@manphiz manphiz commented on the diff Oct 13, 2013
Library/Formula/pango.rb
@@ -26,7 +27,6 @@ def install
--prefix=#{prefix}
--enable-man
--with-html-dir=#{share}/doc
- --disable-introspection
@manphiz
manphiz Oct 13, 2013 Contributor

Prefer to be explicit here with --enable-introspection=yes.

@krrk
krrk Oct 13, 2013 Contributor

I have pushed a commit for this.

@manphiz manphiz commented on the diff Oct 13, 2013
Library/Formula/gtk+3.rb
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--disable-glibtest",
- "--disable-introspection",
@manphiz
manphiz Oct 13, 2013 Contributor

Prefer to be explicit here with --enable-introspection=yes.

@krrk
krrk Oct 13, 2013 Contributor

I have pushed a commit for this.

@jacknagel jacknagel and 1 other commented on an outdated diff Oct 16, 2013
Library/Formula/gobject-introspection.rb
- system "make install"
+ inreplace 'configure' do |s|
+ s.change_make_var! 'GOBJECT_INTROSPECTION_LIBDIR', HOMEBREW_PREFIX/'lib'
+ end
+
+ if build.with? 'tests'
+ system "./configure", "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--with-cairo"
+ system "make install"
+ system "make check"
+ else
+ system "./configure", "--disable-dependency-tracking",
+ "--prefix=#{prefix}"
+ system "make install"
+ end
@jacknagel
jacknagel Oct 16, 2013 Contributor

Instead of repeating this, use an array for the arguments and conditionally push "--with-cairo" onto the array:

args = %W[--disable-dependency-tracking --prefix=#{prefix}]
args << "--with-cairo" if build.with? 'tests'

system "./configure", *args
@krrk
krrk Oct 16, 2013 Contributor

This is a very neat way of doing it! I've committed it.

@krrk krrk Clean up execution of --with-tests
Signed-off-by: Kieran Ramos <ramos.kieran@gmail.com>
30ca847
@jacknagel jacknagel was assigned Oct 18, 2013
@jacknagel
Contributor

I applied the other outstanding pull requests. I am working on the cairo/tests patch for gobject-introspection; it doesn't apply cleanly anymore but I will fix it up locally.

What's left here is the new formulae for py3cairo and pygobject3: it would make review easier for these to be in separate pull requests with a single commit for each. Thanks!

@jacknagel jacknagel closed this Oct 19, 2013
@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.