Discussion:
[pygtk] ANNOUNCE: PyGTK All-in-one Installer 2.22.6
Dieter Verfaillie
2011-01-19 19:23:24 UTC
Permalink
We are pleased to announce release 2.22.6 of the PyGTK All-in-one
installer for Windows.

More information can be found in the README file at:
https://github.com/dieterv/pygtk-installer#readme

* What is it?
=============

The PyGTK All-in-one installer provides an alternative installation
method for PyGTK users on Windows. It bundles PyGTK, PyGObject,
PyCairo, PyGtkSourceView2, PyGooCanvas, PyRsvg, the gtk+-bundle
and Glade in one handy installer.

Currently 32 bit Python 2.6 and 2.7 versions are supported
on Windows XP and up.

Some screenshots can be seen at:
https://github.com/dieterv/pygtk-installer/wiki

* What's changed in 2.22.6 ?
============================

* Updated bundled GTK+ runtime packages to
gtk+-bundle_2.22.1-20101227_win32 which fixes the svg pixbuf
loader issues described in
https://bugzilla.gnome.org/show_bug.cgi?id=637742.
* Grammatical fixes to the README and build_installer.py script
by David Ripton.
* Updated glade3-3.6.7 packages + the build_glade.sh script is now
tracked at https://bugzilla.gnome.org/show_bug.cgi?id=634978

The PyGTK, PyGObject, PyCairo, PyGtkSourceView2, PyGooCanvas and
PyRsvg extension modules remain unchanged.

* Where to get it?
==================

binaries:

http://download.gnome.org/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.6.win32-py2.6.msi
md5sum : 1ce2abcaa4b232e52111a71e937f52e9
size : 32,3M

http://download.gnome.org/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.6.win32-py2.7.msi
md5sum : 75cfe879a13ae99d5b19fee4f1597bb5
size : 32,3M

source code of the installer build tool:

https://github.com/dieterv/pygtk-installer/tree/release-2.22.6
https://github.com/dieterv/pygtk-installer/tarball/release-2.22.6
https://github.com/dieterv/pygtk-installer/zipball/release-2.22.6


Enjoy!

The PyGTK Team
Tim Lebedkov
2011-01-19 19:52:12 UTC
Permalink
Hello Dieter,

am I right that files like
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
are just overwritten with a newer version of the installer?
Would it be possible to leave the old installers at their place and
put the new under other names?

--Tim

On Wed, Jan 19, 2011 at 8:23 PM, Dieter Verfaillie
Post by Dieter Verfaillie
We are pleased to announce release 2.22.6 of the PyGTK All-in-one
installer for Windows.
https://github.com/dieterv/pygtk-installer#readme
* What is it?
=============
The PyGTK All-in-one installer provides an alternative installation
method for PyGTK users on Windows. It bundles PyGTK, PyGObject,
PyCairo, PyGtkSourceView2, PyGooCanvas, PyRsvg, the gtk+-bundle
and Glade in one handy installer.
Currently 32 bit Python 2.6 and 2.7 versions are supported
on Windows XP and up.
https://github.com/dieterv/pygtk-installer/wiki
* What's changed in 2.22.6 ?
============================
 * Updated bundled GTK+ runtime packages to
   gtk+-bundle_2.22.1-20101227_win32 which fixes the svg pixbuf
   loader issues described in
   https://bugzilla.gnome.org/show_bug.cgi?id=637742.
 * Grammatical fixes to the README and build_installer.py script
   by David Ripton.
 * Updated glade3-3.6.7 packages + the build_glade.sh script is now
   tracked at https://bugzilla.gnome.org/show_bug.cgi?id=634978
The PyGTK, PyGObject, PyCairo, PyGtkSourceView2, PyGooCanvas and
PyRsvg extension modules remain unchanged.
* Where to get it?
==================
http://download.gnome.org/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.6.win32-py2.6.msi
 md5sum    : 1ce2abcaa4b232e52111a71e937f52e9
 size      : 32,3M
http://download.gnome.org/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.6.win32-py2.7.msi
 md5sum    : 75cfe879a13ae99d5b19fee4f1597bb5
 size      : 32,3M
https://github.com/dieterv/pygtk-installer/tree/release-2.22.6
https://github.com/dieterv/pygtk-installer/tarball/release-2.22.6
https://github.com/dieterv/pygtk-installer/zipball/release-2.22.6
Enjoy!
The PyGTK Team
_______________________________________________
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Dieter Verfaillie
2011-01-19 21:01:34 UTC
Permalink
Post by Tim Lebedkov
am I right that files like
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
are just overwritten with a newer version of the installer?
Correct. We do not (yet?) detect the presence of the separate pycairo,
pygobject, pygtk, pyrsvg, pygoocanvas and pygtksourceview2 packages.
Neither the .exe nor .msi installers. This rather unfortunate behavior
is documented in the README [1] in the "Migrating from
PyGTK+PyGObject+PyCairo packages" section.

I guess detecting the separate .exe installers could be done by checking
for either or both the "?-wininst.log"/"Remove?.exe" files in Python's
installation directory (this idea would need some serious testing though).
Detecting the separate .msi installers is a whole other matter: in this case
distutils' bdist_msi command does not create the "?-wininst.log" or
"Remove?.exe" files. Detection by windows installer product codes might
work for known previous releases but we simply can't predict every
future release that's going to be created. That and maintaining such a
table of product codes would be a maintenance nightmare...

Even if the aio installer would grow such a detection method, we cannot
provide the same for the inverse situation without seriously hacking
about with distutils' bdist_wininst and bdist_msi commands. So it is
equally possible to overwrite the aio installers' files by executing
on of the separate .exe or .msi installer...
Post by Tim Lebedkov
Would it be possible to leave the old installers at their place and
put the new under other names?
Not really, the all-in-one installer repackages the content of the separate
.msi installers exactly as they are. That's the whole point of the aio
installer exercise, really (and was the tedious part to get right).

To clarify things, both 2.22.5 and 2.22.6 include the following
extension modules (replace the ? with 6 or 7):
pycairo-1.8.10.win32-py2.?.msi
pygobject-2.26.0-1.win32-py2.?.msi
pygtk-2.22.0-1.win32-py2.?.msi
pygtksourceview-2.10.1.win32-py2.?.msi
pygoocanvas-0.14.2.win32-py2.?.msi
pyrsvg-2.32.1.win32-py2.6.msi

It is however true that the -1 revision part of the version string
for pygtk and pygobject did not show in the "Custom Setup" page when
installing. I've fixed that in the build description file [2] and
the next version will be more clear about what package versions are
included in the UI.

Regards,
Dieter

[1] https://github.com/dieterv/pygtk-installer#readme
[2] https://github.com/dieterv/pygtk-installer/blob/master/wix/2.22.7.win32.xml
Tim Lebedkov
2011-01-19 22:02:15 UTC
Permalink
Hello Dieter,

I am really sorry. I have formulated my question so that you have
completely misunderstood it.
I hope that at least your explanations could be useful for somebody else.

Let me explain my concerns in detail. In Npackd (package manager) I
download packages from different
locations like http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
To check that the download was OK, I compute the SHA1 checksum of the file.
For this to work a file placed at a specific URL should never be changed.

So here is my plea: don't overwrite files, but put new installers
under a different URL and don't delete old installers.
Examples:
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-2.win32-py2.7.msi
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-3.win32-py2.7.msi

Thank You

--Tim

On Wed, Jan 19, 2011 at 10:01 PM, Dieter Verfaillie
Post by Dieter Verfaillie
Post by Tim Lebedkov
am I right that files like
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
are just overwritten with a newer version of the installer?
Correct. We do not (yet?) detect the presence of the separate pycairo,
pygobject, pygtk, pyrsvg, pygoocanvas and pygtksourceview2 packages.
Neither the .exe nor .msi installers. This rather unfortunate behavior
is documented in the README [1] in the "Migrating from
PyGTK+PyGObject+PyCairo packages" section.
I guess detecting the separate .exe installers could be done by checking
for either or both the "?-wininst.log"/"Remove?.exe" files in Python's
installation directory (this idea would need some serious testing though).
Detecting the separate .msi installers is a whole other matter: in this case
distutils' bdist_msi command does not create the "?-wininst.log" or
"Remove?.exe" files. Detection by windows installer product codes might
work for known previous releases but we simply can't predict every
future release that's going to be created. That and maintaining such a
table of product codes would be a maintenance nightmare...
Even if the aio installer would grow such a detection method, we cannot
provide the same for the inverse situation without seriously hacking
about with distutils' bdist_wininst and bdist_msi commands. So it is
equally possible to overwrite the aio installers' files by executing
on of the separate .exe or .msi installer...
Post by Tim Lebedkov
Would it be possible to leave the old installers at their place and
put the new under other names?
Not really, the all-in-one installer repackages the content of the separate
.msi installers exactly as they are. That's the whole point of the aio
installer exercise, really (and was the tedious part to get right).
To clarify things, both 2.22.5 and 2.22.6 include the following
pycairo-1.8.10.win32-py2.?.msi
pygobject-2.26.0-1.win32-py2.?.msi
pygtk-2.22.0-1.win32-py2.?.msi
pygtksourceview-2.10.1.win32-py2.?.msi
pygoocanvas-0.14.2.win32-py2.?.msi
pyrsvg-2.32.1.win32-py2.6.msi
It is however true that the -1 revision part of the version string
for pygtk and pygobject did not show in the "Custom Setup" page when
installing. I've fixed that in the build description file [2] and
the next version will be more clear about what package versions are
included in the UI.
Regards,
Dieter
[1] https://github.com/dieterv/pygtk-installer#readme
[2] https://github.com/dieterv/pygtk-installer/blob/master/wix/2.22.7.win32.xml
John Stowers
2011-01-20 03:12:07 UTC
Permalink
Post by Tim Lebedkov
Hello Dieter,
I am really sorry. I have formulated my question so that you have
completely misunderstood it.
I hope that at least your explanations could be useful for somebody else.
Let me explain my concerns in detail. In Npackd (package manager) I
download packages from different
locations like http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
To check that the download was OK, I compute the SHA1 checksum of the file.
For this to work a file placed at a specific URL should never be changed.
So here is my plea: don't overwrite files, but put new installers
under a different URL and don't delete old installers.
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-2.win32-py2.7.msi
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-3.win32-py2.7.msi
Old installers are *never* deleted nor silently replaced on the GNOME
site. In fact that was the reason for the creation of the -1 variant; to
fix packaging bugs in windows, no PyGObject code was changed so we didnt
think it necessary to make a new PyGObject release with a version bump.

I'm think Dieter misunderstood your question and offered an incorrect
reply. See below.
Post by Tim Lebedkov
Thank You
--Tim
On Wed, Jan 19, 2011 at 10:01 PM, Dieter Verfaillie
Post by Dieter Verfaillie
Post by Tim Lebedkov
am I right that files like
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
are just overwritten with a newer version of the installer?
Correct. We do not (yet?) detect the presence of the separate pycairo,
pygobject, pygtk, pyrsvg, pygoocanvas and pygtksourceview2 packages.
Neither the .exe nor .msi installers.
We don't detect if these have been *installed* on the users system. But
that is orthogonal to your questions (I think). If the all-in-one
installer requires new versions of the component installers then this
will be noted in the release notes and the README.

As mentioned in the release notes, this installer only contains updated
gtk+ runtime, and updated glade installers. PyG* remain unchanged so no
installers were ever silently replaced on the GNOME servers.

So in conclusion, if the all-in-one installer requires newer component
installer for any other PyG* packages, those component installers will
be uploaded to the GNOME servers with a new filename, and the README and
release notes of the all-in-one installer will make this clear.

Hope that clears things up.

John
Post by Tim Lebedkov
This rather unfortunate behavior
Post by Dieter Verfaillie
is documented in the README [1] in the "Migrating from
PyGTK+PyGObject+PyCairo packages" section.
I guess detecting the separate .exe installers could be done by checking
for either or both the "?-wininst.log"/"Remove?.exe" files in Python's
installation directory (this idea would need some serious testing though).
Detecting the separate .msi installers is a whole other matter: in this case
distutils' bdist_msi command does not create the "?-wininst.log" or
"Remove?.exe" files. Detection by windows installer product codes might
work for known previous releases but we simply can't predict every
future release that's going to be created. That and maintaining such a
table of product codes would be a maintenance nightmare...
Even if the aio installer would grow such a detection method, we cannot
provide the same for the inverse situation without seriously hacking
about with distutils' bdist_wininst and bdist_msi commands. So it is
equally possible to overwrite the aio installers' files by executing
on of the separate .exe or .msi installer...
Post by Tim Lebedkov
Would it be possible to leave the old installers at their place and
put the new under other names?
Not really, the all-in-one installer repackages the content of the separate
.msi installers exactly as they are. That's the whole point of the aio
installer exercise, really (and was the tedious part to get right).
To clarify things, both 2.22.5 and 2.22.6 include the following
pycairo-1.8.10.win32-py2.?.msi
pygobject-2.26.0-1.win32-py2.?.msi
pygtk-2.22.0-1.win32-py2.?.msi
pygtksourceview-2.10.1.win32-py2.?.msi
pygoocanvas-0.14.2.win32-py2.?.msi
pyrsvg-2.32.1.win32-py2.6.msi
It is however true that the -1 revision part of the version string
for pygtk and pygobject did not show in the "Custom Setup" page when
installing. I've fixed that in the build description file [2] and
the next version will be more clear about what package versions are
included in the UI.
Regards,
Dieter
[1] https://github.com/dieterv/pygtk-installer#readme
[2] https://github.com/dieterv/pygtk-installer/blob/master/wix/2.22.7.win32.xml
_______________________________________________
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Tim Lebedkov
2011-01-20 06:58:38 UTC
Permalink
yes, thank you

On Thu, Jan 20, 2011 at 4:12 AM, John Stowers
Post by John Stowers
Post by Tim Lebedkov
Hello Dieter,
I am really sorry. I have formulated my question so that you have
completely misunderstood it.
I hope that at least your explanations could be useful for somebody else.
Let me explain my concerns in detail. In Npackd (package manager) I
download packages from different
locations like http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
To check that the download was OK, I compute the SHA1 checksum of the file.
For this to work a file placed at a specific URL should never be changed.
So here is my plea: don't overwrite files, but put new installers
under a different URL and don't delete old installers.
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-2.win32-py2.7.msi
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-3.win32-py2.7.msi
Old installers are *never* deleted nor silently replaced on the GNOME
site. In fact that was the reason for the creation of the -1 variant; to
fix packaging bugs in windows, no PyGObject code was changed so we didnt
think it necessary to make a new PyGObject release with a version bump.
I'm think Dieter misunderstood your question and offered an incorrect
reply. See below.
Post by Tim Lebedkov
Thank You
--Tim
On Wed, Jan 19, 2011 at 10:01 PM, Dieter Verfaillie
Post by Dieter Verfaillie
Post by Tim Lebedkov
am I right that files like
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
are just overwritten with a newer version of the installer?
Correct. We do not (yet?) detect the presence of the separate pycairo,
pygobject, pygtk, pyrsvg, pygoocanvas and pygtksourceview2 packages.
Neither the .exe nor .msi installers.
We don't detect if these have been *installed* on the users system. But
that is orthogonal to your questions (I think). If the all-in-one
installer requires new versions of the component installers then this
will be noted in the release notes and the README.
As mentioned in the release notes, this installer only contains updated
gtk+ runtime, and updated glade installers. PyG* remain unchanged so no
installers were ever silently replaced on the GNOME servers.
So in conclusion, if the all-in-one installer requires newer component
installer for any other PyG* packages, those component installers will
be uploaded to the GNOME servers with a new filename, and the README and
release notes of the all-in-one installer will make this clear.
Hope that clears things up.
John
Post by Tim Lebedkov
This rather unfortunate behavior
Post by Dieter Verfaillie
is documented in the README [1] in the "Migrating from
PyGTK+PyGObject+PyCairo packages" section.
I guess detecting the separate .exe installers could be done by checking
for either or both the "?-wininst.log"/"Remove?.exe" files in Python's
installation directory (this idea would need some serious testing though).
Detecting the separate .msi installers is a whole other matter: in this case
distutils' bdist_msi command does not create the "?-wininst.log" or
"Remove?.exe" files. Detection by windows installer product codes might
work for known previous releases but we simply can't predict every
future release that's going to be created. That and maintaining such a
table of product codes would be a maintenance nightmare...
Even if the aio installer would grow such a detection method, we cannot
provide the same for the inverse situation without seriously hacking
about with distutils' bdist_wininst and bdist_msi commands. So it is
equally possible to overwrite the aio installers' files by executing
on of the separate .exe or .msi installer...
Post by Tim Lebedkov
Would it be possible to leave the old installers at their place and
put the new under other names?
Not really, the all-in-one installer repackages the content of the separate
.msi installers exactly as they are. That's the whole point of the aio
installer exercise, really (and was the tedious part to get right).
To clarify things, both 2.22.5 and 2.22.6 include the following
pycairo-1.8.10.win32-py2.?.msi
pygobject-2.26.0-1.win32-py2.?.msi
pygtk-2.22.0-1.win32-py2.?.msi
pygtksourceview-2.10.1.win32-py2.?.msi
pygoocanvas-0.14.2.win32-py2.?.msi
pyrsvg-2.32.1.win32-py2.6.msi
It is however true that the -1 revision part of the version string
for pygtk and pygobject did not show in the "Custom Setup" page when
installing. I've fixed that in the build description file [2] and
the next version will be more clear about what package versions are
included in the UI.
Regards,
Dieter
[1] https://github.com/dieterv/pygtk-installer#readme
[2] https://github.com/dieterv/pygtk-installer/blob/master/wix/2.22.7.win32.xml
_______________________________________________
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
Dieter Verfaillie
2011-01-20 21:35:30 UTC
Permalink
Post by John Stowers
Post by Tim Lebedkov
Let me explain my concerns in detail. In Npackd (package manager) I
download packages from different
locations like http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
To check that the download was OK, I compute the SHA1 checksum of the file.
For this to work a file placed at a specific URL should never be changed.
We're doing something similar in the aio installer build script and
build description file, except they are md5 checksums.
Post by John Stowers
Old installers are *never* deleted nor silently replaced on the GNOME
site. In fact that was the reason for the creation of the -1 variant; to
fix packaging bugs in windows, no PyGObject code was changed so we didnt
think it necessary to make a new PyGObject release with a version bump.
Yes. And in the unlikely event where your SHA1 (and by definition our
md5) should no longer match for a certain file on ftp.gnome.org, you
likely hit a bad mirror. Something like that should then probably be
reported as a bug.
Post by John Stowers
I'm think Dieter misunderstood your question and offered an incorrect
reply. See below.
Yes, I completely misunderstood the question. My apologies for the
confusion.
Post by John Stowers
As mentioned in the release notes, this installer only contains updated
gtk+ runtime, and updated glade installers. PyG* remain unchanged so no
installers were ever silently replaced on the GNOME servers.
So in conclusion, if the all-in-one installer requires newer component
installer for any other PyG* packages, those component installers will
be uploaded to the GNOME servers with a new filename, and the README and
release notes of the all-in-one installer will make this clear.
Indeed, that's the general idea.

Regards,
Dieter
F Wolff
2011-01-26 12:00:41 UTC
Permalink
Post by Dieter Verfaillie
We are pleased to announce release 2.22.6 of the PyGTK All-in-one
installer for Windows.
https://github.com/dieterv/pygtk-installer#readme
Thank you for these, Dieter!

Any chance of a version for Python 2.5? It would be a great help.

Thanks again.
Friedel



--
Recently on my blog:
http://translate.org.za/blogs/friedel/en/content/versions-dependencies-different-distributions
Dieter Verfaillie
2011-01-26 12:25:56 UTC
Permalink
Post by F Wolff
Post by Dieter Verfaillie
We are pleased to announce release 2.22.6 of the PyGTK All-in-one
installer for Windows.
https://github.com/dieterv/pygtk-installer#readme
Thank you for these, Dieter!
No problem :)
Post by F Wolff
Any chance of a version for Python 2.5? It would be a great help.
The distutils based setup.py files used to generate the separate
pygobject/pygtk installers (which are then used to create the aio
installer) dropped support for Python versions older than 2.6 in
the following commits (a couple of weeks before I started contributing):
- pygobject:
http://git.gnome.org/browse/pygobject/commit/?id=33b59fd7437009b6c3ed43412e171d2cc91ee317
- pygtk:
http://git.gnome.org/browse/pygtk/commit/?id=e89fa3ce5a99aa2ed8ada7d3d545770357d52d45

The interesting part is that the autotools' configure.ac files list
the following minimum versions:
- pygobject: m4_define(python_min_ver, 2.5.2)
- pygtk: AM_PATH_PYTHON(2.3.5)

So it might be possible to restore Python 2.5 support on windows. I'll add
your request to my already overly large todo list. So no promises on when
i'll have time to look into it...

Off course, contributions are always more than welcome :)

Regards,
Dieter


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Antoine Martin
2011-03-27 19:13:17 UTC
Permalink
Hi,

I am using the "PyGTK All-in-one Installer 2.22.6" and it works
beautifully (thank you for making my life easier!) but when I bundle my
application with py2exe the "jpeg" loader is no longer found.

At first I thought that I just needed to run gdk-pixbuf-query-loaders to
generate a new loaders config before bundling, but as I explored I found
no trace of the jpeg loader DLL and the resulting loaders config makes
no mention of jpeg (the config from the installer doesn't either).
In previous builds there was a "libpixbufloader-jpeg.dll", I guess this
is now built-in somehow? Why isn't it found once bundled then?

I thought it might need to be on the PATH or PYTHONPATH, so I tried
setting those variables before running my application EXE but this did
not help either (but this could just be py2exe overriding the environment)

Any hints would be much appreciated.
Cheers
Antoine

PS: the code:
loader = gtk.gdk.PixbufLoader("jpeg")
loader.write(img_data, len(img_data))
pixbuf = loader.get_pixbuf()
loader.close()

The strange thing is that it does not error out, pixbuf is just set to None.
Dieter Verfaillie
2011-03-27 19:49:06 UTC
Permalink
Post by Antoine Martin
I am using the "PyGTK All-in-one Installer 2.22.6" and it works
beautifully (thank you for making my life easier!) but when I bundle my
application with py2exe the "jpeg" loader is no longer found.
At first I thought that I just needed to run gdk-pixbuf-query-loaders to
generate a new loaders config before bundling, but as I explored I found
no trace of the jpeg loader DLL and the resulting loaders config makes
no mention of jpeg (the config from the installer doesn't either).
In previous builds there was a "libpixbufloader-jpeg.dll", I guess this
is now built-in somehow? Why isn't it found once bundled then?
GTK+ windows binaries have been using GDI+ to load most image formats
for some time now. That explains why we no longer have separate loader
dll's except for svg. Does your target bin directory contain
libgdk_pixbuf-2.0-0.dll?
Post by Antoine Martin
I thought it might need to be on the PATH or PYTHONPATH, so I tried
setting those variables before running my application EXE but this did
not help either (but this could just be py2exe overriding the environment)
Be careful with PATH, doing so does not always behave as you would
expect (it's always a good idea to verify with Dependency Walker what
libraries are loaded and if those correspond with what you intended).
Post by Antoine Martin
loader = gtk.gdk.PixbufLoader("jpeg")
loader.write(img_data, len(img_data))
pixbuf = loader.get_pixbuf()
loader.close()
I'll try py2exe'ing the above tomorrow morning...
Post by Antoine Martin
The strange thing is that it does not error out, pixbuf is just set to None.
That might be expected behavior, but then again I have not yet
studied the gdi+ loader code used by gdk...

mvg,
Dieter
Dieter Verfaillie
2011-03-28 08:01:47 UTC
Permalink
Post by Antoine Martin
I am using the "PyGTK All-in-one Installer 2.22.6" and it works
beautifully (thank you for making my life easier!) but when I bundle my
application with py2exe the "jpeg" loader is no longer found.
At first I thought that I just needed to run gdk-pixbuf-query-loaders to
generate a new loaders config before bundling, but as I explored I found
no trace of the jpeg loader DLL and the resulting loaders config makes
no mention of jpeg (the config from the installer doesn't either).
In previous builds there was a "libpixbufloader-jpeg.dll", I guess this
is now built-in somehow? Why isn't it found once bundled then?
I thought it might need to be on the PATH or PYTHONPATH, so I tried
setting those variables before running my application EXE but this did
not help either (but this could just be py2exe overriding the environment)
Any hints would be much appreciated.
I've attached an example that works (for me). Put the 3 files into some
directory and run 'setup.py py2exe'. Then execute dist/bin/test.exe

mvg,
Dieter


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Antoine Martin
2011-03-28 13:38:37 UTC
Permalink
Post by Dieter Verfaillie
Post by Antoine Martin
I am using the "PyGTK All-in-one Installer 2.22.6" and it works
beautifully (thank you for making my life easier!) but when I bundle my
application with py2exe the "jpeg" loader is no longer found.
At first I thought that I just needed to run gdk-pixbuf-query-loaders to
generate a new loaders config before bundling, but as I explored I found
no trace of the jpeg loader DLL and the resulting loaders config makes
no mention of jpeg (the config from the installer doesn't either).
In previous builds there was a "libpixbufloader-jpeg.dll", I guess this
is now built-in somehow? Why isn't it found once bundled then?
I thought it might need to be on the PATH or PYTHONPATH, so I tried
setting those variables before running my application EXE but this did
not help either (but this could just be py2exe overriding the
environment)
Any hints would be much appreciated.
I've attached an example that works (for me). Put the 3 files into some
directory and run 'setup.py py2exe'. Then execute dist/bin/test.exe
Your code correctly closes the loader before calling get_pixbuf() and my
code did not...

Since my code used to work with older versions of PyGTK on win32... and
still worked on Linux and OSX... I assumed it was correct, which it was not!

Many many thanks!
Antoine
Post by Dieter Verfaillie
mvg,
Dieter
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
Loading...