[MacPorts] #43423: Add gtk variant to py-graph-tool
#43423: Add gtk variant to py-graph-tool -------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: py-graph-tool -------------------------+-------------------------------- It would be nice to have a variant which installs gtk+ 3 in case users want interactive visualization. The variant would be useful, since the library librsvg would also needed to be installed, which is not triggered simply by installing gtk, and is nonintuitive for most users. -- Ticket URL: <https://trac.macports.org/ticket/43423> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: => maintainer Comment: Since you're the maintainer of the port, feel free to attach a patch to make this change, and we can review and commit it. -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Comment (by mmoll@…): Is it just a matter of adding the gtk3 and librsvg ports as dependencies? Maybe those should be included by default, since some of the sample graph- tool code probably uses it. Users might be surprised if demo code doesn't work. I have librsvg installed (but not gtk3) and never realized it was needed for graph-tool. -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Comment (by tiago@…): I agree it would be a good idea to enable it by default, but making it a variant would give the user the option of installing without pulling in the whole X/GTK dependency tree, at the expense of not being able to do interactive drawing. Without librsvg GTK+ cannot load SVG icons/images. I made use of some SVG icons in graph-tool, since I assumed GTK+ would always depend on librsvg... -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Comment (by mmoll@…): I installed py-graph-tool with a gtk variant. I tried to run the demo shown here: https://graph-tool.skewed.de/static/doc/demos/animation.html. I get errors like the one shown here: {{{ Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4 /site-packages/graph_tool/draw/gtk_draw.py", line 424, in draw lr = self.pos_to_device((self.base.get_width(), AttributeError: 'cairo.Surface' object has no attribute 'get_width' }}} According to http://cairographics.org/documentation/pycairo/2/reference/surfaces.html#cai... this is correct. I should mention that I have the Quartz variant of gtk3 installed (a more OS X native backend than the default X11-based one). Is there another way to do this? If I remove the get_width() and get_height() calls, the demo appears to work, but obviously window resizing doesn't work (which, I guess, is still better than a fatal error). -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Comment (by tiago@…): It expects a XlibSurface, which has the necessary attributes: http://cairographics.org/documentation/pycairo/3/reference/surfaces.html #class-xlibsurface-surface I guess with Quartz Gtk returns a different surface. Could you see what object is returned by `self.get_window()` in line 391 of `gtk_draw.py`? -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Comment (by tiago@…): Well, nevermind the actual surface which is returned, there is a simpler fix for that... Pleas apply the patch attached, and see if any issues remain. -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Comment (by mmoll@…): That works for me. This warning is shown repeatedly (with or without patch), but that could be a bug in the quartz version of gtk3 and/or [py]cairo: {{{ (foo.py:33533): Gdk-CRITICAL **: gdk_cairo_region: assertion 'region != NULL' failed }}} I'll commit the gtk3 variant and your patch. -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Comment (by tiago@…): Ok, I'll commit the patch to git, so it will not be necessary in the next release. That warning is internal to GTK, so there is nothing to be done, except complain to them. Most of such warnings are inconsequential, in any case. Thanks for the new Portfile! -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#43423: Add gtk variant to py-graph-tool ----------------------------+-------------------------------- Reporter: tiago@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: fixed | Keywords: maintainer Port: py-graph-tool | ----------------------------+-------------------------------- Changes (by mmoll@…): * status: new => closed * resolution: => fixed Comment: Committed in r119269. -- Ticket URL: <https://trac.macports.org/ticket/43423#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts