[pygtk] Pygtk and Windows... how to build for release?

Stuart Axon stuaxo2 at yahoo.com
Mon Jan 11 09:44:41 WST 2010


The git learning is great :)

I might try building stable stuff tomorrow, although I may as well try and build HEAD too.

So far I got pygobject starting to build, but now I can see the real hassle, that of course the problem is not the python, but the other stuff...

[C:\usr\pygtk-git\pygobject]python setup.py build
**********************************************************************
Building PyGObject using distutils is NOT SUPPORTED.
It's mainly included to be able to easily build win32 installers
You may continue, but only if you agree to not ask any questions
To build PyGObject in a supported way, read the INSTALL file

Build fixes are of course welcome and should be filed in bugzilla
**********************************************************************
Not supported, ok [y/N]? y
C:\usr\pygtk-git\pygobject\dsextras.py:354: DeprecationWarning: object.__new__() takes no parameters
  return object.__new__(cls,*args, **kwds)
running build
running build_py
running build_clib
building 'pyglib' library
running build_ext
building 'gio._gio' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYGOBJECT_MAJOR_VERSIO
N=2 -DPYGOBJECT_MINOR_VERSION=21 -DPYGOBJECT_MICRO_VERSION=2 -DVERSION="""2.21.2""" -Iglib -IC:/usr/gtk/include/glib-2.0
 -IC:/usr/gtk/lib/glib-2.0/include -Igobject -IC:/usr/gtk/include/glib-2.0 -IC:/usr/gtk/lib/glib-2.0/include -IC:\usr\Py
thon26\include -IC:\usr\Python26\PC /Tcgio/gio.c /Fobuild\temp.win32-2.6\Release\gio/gio.obj
gio.c
gmemoryoutputstream.override(44) : warning C4244: 'function' : conversion from 'goffset' to 'Py_ssize_t', possible loss
of data
gio/gio.c(19534) : error C2065: 'G_TYPE_CONVERTER_FLAGS' : undeclared identifier
gio/gio.c(19535) : error C2065: 'G_TYPE_CONVERTER_RESULT' : undeclared identifier
gio/gio.c(19563) : error C2065: 'G_TYPE_ZLIB_COMPRESSOR_FORMAT' : undeclared identifier
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2



...... I had a brief look at gio.c, line 19534
The flags G_TYPE_APP_INFO_CREATE_FLAGS seem to work, but the next don't... I really don't have a clue where the working ones come from (couldn't find gio.h - maybe it was here), or where they should be declared.

Still, will look more, but is a good 10 years since I did any C, hopefully I can find some time tomorrow to try doing some more.


----- Original Message ----
From: John Stowers <john.stowers.lists at gmail.com>
To: Stuart Axon <stuaxo2 at yahoo.com>
Cc: pygtk at daa.com.au
Sent: Mon, January 11, 2010 1:01:11 AM
Subject: Re: [pygtk] Pygtk and Windows... how to build for release?

On Sun, 2010-01-10 at 16:49 -0800, Stuart Axon wrote:
> Cheers all the git stuff worked, and I'm pretty sure my distutils.cfg is correct for msvc now.
> 
> in pygobject I tried
> 
> python setup.py build
> 
> However it's complaining:
> 
> Warning: Too old version of glib-2.0
>          Need glib-2.0, but 2.22.3 is installed
> 
> I added some debug and it's looking for version 2.22.4 of glib...  since this appears to be the development version, do I need to build this too (and possibly gtk itself)

The answer is both probably, and it depends :-). If you want to build
pygtk version that is bleeding edge, then you will need newer versions
of everything. However you do not have to do this.

In the previous step you merged with orgin/master (HEAD). You could
instead just merge up to the last stable releases (my pygtk branch has
merged up to and including pygtk 2.16 IIRC).

repeating the previous steps (or resetting your tree back to the start)
you can then merge up to and including whatever commit/tag is recent
enough for you. For example, to update pygtk to 2.17 you need to do
something like

git checkout your-branch
git merge PYGTK_2_17_0

Sorry if this is becoming a git lesson, you have to learn it sometime!

John

> 
> ?
> 
> 
> 
> 
> ----- Original Message ----
> From: John Stowers <john.stowers.lists at gmail.com>
> To: Stuart Axon <stuaxo2 at yahoo.com>
> Cc: pygtk at daa.com.au
> Sent: Mon, January 11, 2010 12:06:47 AM
> Subject: Re: [pygtk] Pygtk and Windows... how to build for release?
> 
> On Sun, 2010-01-10 at 15:52 -0800, Stuart Axon wrote:
> > Ooops, immediately after found your one:
> > http://github.com/nzjrs/pygobject/blob/master-windows/
> 
> Correct.
> 
> 
>      


      


More information about the pygtk mailing list