Re: pygobject for python3 for windows



On 10/06/2011 20:18, John Palmieri wrote:
> Works is a word that is relative right now.  The latest PyGObject will run
> under 3.x under Linux but the code generator will not generate 3.x code so
> PyGTK and other modules will not work under Linux or Windows.  In Linux we
> have moved to using GObject-Introspection for accessing functionality that
> used to be provided by PyGTK.  I'm not sure if GI is ported to windows or if
> anyone has tried to get it to run.

Tor Lillqvist seems to have managed just that at the end of 2009.
Unfortunately, his patch only made it to bugzilla [1] about half
a year later, so it was already outdated by then. Unfortunately
he also seems to have stepped down as the resident GNOME-Windows
guru [2].

So, I've been spending most of my spare time (the last 2 weeks of
April and these last 2 weeks) re-applying the still relevant parts
of that patch and fixing what seems like countless issues as I
encounter them just to get it building again (with MinGW/MSYS).
Most of those due to an important part of gobject-introspection
- giscanner - being written in Python2.

Problem is there's no MSYS Python port (*not* MinGW, I really mean
MSYS here!) so we're forced to use the native Windows Python from
python.org. But that means anytime giscanner launches a subprocess
during a build (libtool, for example), it's a subprocess that's
intended to run inside an msys bash session and not as a native
Windows process [3]. Confused yet?

Then there's me sometimes just being able to fix the most obscure
(in my eyes at least) stuff in a matter of hours, but getting stuck
on the most basic autotooling I can think of for days on end.
Go figure ;)

Well, the good news is it's already building the built-in .gir's
and .typelib's. The bad news is I'm currently stuck on one of
the test programs [4].

Oh well, keep an eye on [1]. I'll attach my patches there when I get
everything to build. Might take a while though (weeks or even months).
Or keep an eye on my branch on github [5] if you want to follow what's
going on or even help out.

> So while PyGObject should theoretically compile and run under Python 3.x
> for Windows, it is pretty useless without GI. It would be nice if a windows
> hacker can play with GObject-Introspection to see if they can get it running.

I don't even want to start thinking about Python 3 yet at this point.
That's PyGObject's domain, which without a working GObject-Introspection
is nothing but a distant dream...

mvg,
Dieter

[1] https://bugzilla.gnome.org/show_bug.cgi?id=620566
[2] http://tml-blog.blogspot.com/2011/03/gtk-on-windows-i-am-not-really-doing-it.html
[3] finally got around those problems by monkey-patching
    subprocess.Popen in giscanner's code...
[4] In file included from barapp.c:1:0:
    barapp.h:2:25: fatal error: glib-object.h: No such file or directory
    It's a problem in tests/scanner/Makefile.am somewhere, don't know what yet...
[5] https://github.com/dieterv/gobject-introspection


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