Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Monday, April 11, 2011

Session on GObject Introspection at the Ubuntu App Developer Week

The talk will be oriented to developers that use or want to use GNOME technologies and still haven't fully grasped how GObject Introspection is changing the game. It won't contain any distro specificities, so join without fear even if you don't use Ubuntu, if it's of your interest.

It should be of special interest to those willing to contribute to GNOME Shell or that plan to attend Martin Pitt's talk about life after PyGTK this Tuesday at 16 UTC.

You can find instructions about how to join in the link below, plus other interesting talks:

https://wiki.ubuntu.com/UbuntuAppDeveloperWeek

See you later today at 17 UTC.

Friday, October 1, 2010

Get the latest PyGObject and introspection bits!

So people are starting to port their apps to introspection from the about-to-be-obsolete PyGtk+ bindings and I'm getting questions in #python @ GIMPNet about how to get the latest and greatest version without having to build stuff.

For those in Fedora: you can get it already from F15, will be backported to F14 after it's out.

For those in Debian: watch experimental for updated packages soon.

For those in Ubuntu: update to Maverick and watch the telepathy PPA for updated packages soon.

Update from comments:

For those in openSUSE: you can get it already from openSUSE Factory, and will be backported to 11.3 as part of the GNOME 2.32 backport.

For those in Microsoft Windows: no binary packages have been built at this moment and nobody is currently known to be working on it.

If anybody has corrections or additions, please comment and I will update the main post.

Monday, June 7, 2010

PyGI now in Debian and Ubuntu

Thanks to the Debian GNOME Team, Laurent Bigonville and Canonical's Robert Ancell, PyGI is well on its way to Debian and Ubuntu:

http://packages.debian.org/sid/python-gi
https://launchpad.net/debian/+source/pygi/0.5.1-1

Thanks to everybody involved in this effort, upstream developers appreciate your work!

Monday, May 17, 2010

Telepathy and Ubuntu

As mentioned in my last post about the Ubuntu Developer Summit last week, there's interest in Ubuntu for using the Telepathy framework in more of their projects. There was discussion of using Telepathy in their telephony stack and also on some Ubuntu-specific changes in Empathy, but I was most interested in their effort to make easy and fun to code collaborative applications.

As part of the work on Sugar that Collabora is sponsoring, I also have a big interest in making as easy as possible to use the telepathy framework, be it in applications or in desktop components such as the Sugar shell.

For now, I'm going to help kickstart the process by implementing some toy-like API on top of Telepathy in the form of widgets for Quickly, here is the branch.

This is what we came up with in the brainstorming session about the "easy and fun" API:
class Client(Boo):
def __init__(self):
self.tube_handler = MessageTubeHandler("tubey")
self.tube_handler.connect("handle-channel", self.on_handle_channel)

def on_handle_channel(self, tube):
self.image_tube = tube
tube.connect("message-received", self.on_message_received)

def on_message_received(self, tube, msg):
if "img_url" in msg:
self._download_image(msg["img_url"])

def on_contact_selected(self, contact, account):
self.image_tube = tp.MessageTube(contact, account)
msg = {}
msg["note"] = self.label1.get_text()
self.image_tube.send(msg)

def on_tube_initiated(self, tube):
if "kenvandine" in tube.contact.props.identifier:
return


As PyGI is not packaged yet for Ubuntu and for the sake of getting started quickly, I'm going to do the initial implementation with the old telepathy-python bindings, but I hope that whatever gets into the Maverick release uses the much nicer telepathy-glib API through introspection.

Also will be trying to keep an eye on the collaboration needs of Sugar activities so more people benefit from this effort.

Ubuntu and GObject introspection

Canonical invited me to spend last week in Brussels at the Ubuntu Developer Summit, representing the upstream projects I'm part of: Telepathy, GNOME and Sugar.

On the GNOME front, I tried to understand Ubuntu plans regarding introspection and developing with Python. At the beginning I was very concerned because the developers I talked to didn't seemed to be aware of the changes that introspection would bring to GNOME and thus hadn't any strategy in place.

The most notable effect of the appearance of introspection support in GNOME is that the existing static bindings for Python and other languages will stop being maintained and no new bindings will be developed for new APIs. For downstreams such as Ubuntu this means that they will either have to maintain and develop static bindings themselves alone, or move to use introspection. See here for an explanation of how apps in python would use introspection to call GObject C code.

If Ubuntu limited itself to package whatever software upstream releases, they could just sit waiting for new releases and update the dependencies accordingly. But turns out they produce a lot of Python code themselves and thus need to get involved in this transition for their own good. They also have the goal of being a great platform for developing desktop apps with Python, and introspection will play a major role in that.

Jorge Castro was tremendously helpful by presenting myself to Barry Warsaw, who has a responsibility role in Ubuntu's use of Python. Barry has been working on the transition to Python 3 and GNOME's move to introspection can make it way easier by making obsolete an awful lot of CPython code. This will also make possible in the future to use other Python implementations than CPython for coding GNOME applications.

As the week progressed introspection got more and more present in Ubuntu's plans, which makes me very happy. Follows some of the most relevant mentions of it, check the whiteboard section of each blueprint for the details:

How do we get to Python 3 and do we go through 2.7 first? "Port PyGI to python3. Move python2 applications to use PyGI." There's lots we can do upstream to help with this, from providing a script to convert to the new API to create a compatibility layer in PyGI. We'll be discussing the creation of a mailing list for coordinating PyGObject and PyGI development and helping with the porting from the static bindings.

How GObject Introspection will change our platform "Actions: Package PyGI for Ubuntu (Python 2) [robert-ancell], create or hijack a mailing list for pygi development"

Fun and Easy Python API for Telepathy We are adding API to telepathy-glib in this direction and nobody has shown interest in working on new static bindings for it, so we need PyGI in order to access the new API.

packagekit as backend for software-center "Python API is out-of-date. It would require some adaption, especially since 0.6.x will break API. Packagekit-glib2 was written with gobject introspection support. So bindings could be generated in the future."

Review coming changes in GNOME and what we will want to do "Python introspection bindings well progressed at sprint. No resource for GLib introspection work. Libraries will stop making bindings and rely on introspection - we have to migrate at some time to keep bindings"

And there seems to have been also interest in introspection from the people pushing for Midgard in Ubuntu.

In summary, I'm very happy to count on Ubuntu in the development of PyGI, I plan to report in this blog about the progresses in polishing PyGI and porting apps to the new API.

P.S.: I'm under the impression that Planet GNOME is not widely read by Ubuntu people, so if someone could rely it to their planet, would be awesome.

Wednesday, May 5, 2010

Going to UDS-M

Canonical has been so nice to sponsor my attendance to the next Ubuntu Developer Summit in Brussels next week and Collabora is sponsoring my time there for Telepathy, Python and Sugar stuff. Thanks a lot to both companies.

The Ubuntu community has interest in making as easy as possible for regular users to create software and part of this effort is having a high-level API for having collaboration across the network. This of course will involve Telepathy and I have also a big interest in providing this experience to users of Sugar. Collabora are going to be flying as well some of their Telepathy developers to work on this and I look forward to finally meeting them.

Ubuntu has also committed heavily on Python for their development efforts, both on the desktop and in the server. For the desktop side of things, Python on GNOME is facing several challenges right now and I will be happy to help them make sure they don't lose any opportunities because of that. The challenges I have referred to are the obsolescence of static library bindings and the update to Python 3. On both issues Red Hat has contributed several developers to upstream and I will be happiest to discuss how we can also make Ubuntu contributors most welcome there. I'm also looking forward to finally meet Simon van der Linden in person after working together in PyGI for so long, he happens to live close to the venue so he'll jump to say hello and maybe do some hacking together (I have some patches in the queue that could use some review love).

There's also interest from Edubuntu in shipping Sugar, so I have registered to their blueprint and will be available to answer any questions they have regarding it. I have felt sad often when Ubuntu users have come asking how they could run Sugar on their machines and I had to point them to the instructions to build from the source, so it's great to have the possibility for Sugar to be accepted and supported by Ubuntu at last.