Hello, i have been working on converting a app from pygtk/gtk2 to pygi/gtk3 and i have the app running when running from python, however when trying to bbfreeze the app trying to load the app from the bbfreeze folder it says something along the lines of unable to load name GObject. And i notice in a bbfreeze of the pygtk/gtk2 build theres a gi_gi.pyd AND gobject.gobject.pyd file but in the pygi/gtk3 there is ONLY gi_gi.pyd. I also noticed in some of the old builds provided here of pygi/gtk3 there was a gobject pyd but not the newer ones is there something special that needs to be done? Or can we get these pyd's in next update?
Edit: Im fairly new to python/gtk this is one of the biggest projects ive tried so any help would be much appreciated.
with pygi-aio-3.10.2-win32_rev18-setup.exe i am able to add "gi._glib", "gi._gobject" to the bbfreeze(with 3.14 it says no module found with bbfreeze ven though the app runs fine when run from python/scripts dir)
however i get
C:\deluge-bbfreeze-1.4.0>deluge-debug
21:18:12 [ERROR ][root ] Could not find any typelib for GObject
21:18:12 [ERROR ][root ] Could not find any typelib for Gdk
21:18:12 [ERROR ][deluge.ui.ui] cannot import name GObject
Traceback (most recent call last):
File "deluge\ui\ui.py", line 144, in init
File "deluge\ui\gtkui__init__.py", line 1, in <module>
File "deluge\ui\gtkui\gtkui.py", line 15, in <module>
ImportError: cannot import name GObject
21:18:12 [ERROR ][deluge.ui.ui] There was an error whilst launching the reques
t UI: gtk
21:18:12 [ERROR ][deluge.ui.ui] Look at the traceback above for more informati
on.
Which is similar to what i had gotten with 3.14 however i dont remeber the typelib part.
Last edit: Josh Brown 2015-08-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FYI, pygtk was marked as "legacy" and became seperated from aio, it need minimal preinstalled pygi aio to works and need manual installation (extract to python x.y site-packages).
Assuming it is a packaging issue, you probably want to make sure that "gnome" folder which contain typelib and runtime is available in your PATH environment when your app not ran in interpreter mode.
I need more info on how you mix the app and pygi because there are various ways to do bundling.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
so basically as you can see im trying to update deluge fairly popular torrent client that currently runs on pygtk which as you said is "legacy" now which is why im trying to update it for pygi/gtk3. The source code for deluge can be seen here and a branch with my updates to pygi/gtk3 here. Ill appologize in advance if my explaination isnt good. If youd be willing im in deluge's irc(freenode #deluge) faily often might be easyer/quicker to comunicate there.
The issue is most definaly a packaging issue. The bbfreeze(packaging) script that once worked with pygtk no longer works with pygi-aio-3.14.0_rev19-setup.exe(nor earlier version of your package). However one difference ive noticed is with earlyer versions of your package that has the pyd files i mentioned before alows me to add for example "gobject" to my includes in the bbfreeze script where your newer packages when adding "gobject" to includes says it cant find that module and the script stops.
with deluge "python setup.py build" byte compiles python files and makes egg. Then "python setup.py install" copies the files to python/scripts and python/site to be run as a normal python program. At this point deluge runs fine with pygi-aio-3.14.0_rev19-setup.exe. Under my branch linked above ive updated all the imports from pygtk imports to pygi/gtk3 imports and so forth. However when runing bbfreeze it does not pick up all the modules needed to be run. What bbfreeze does is make a standalone copy of all the programs files and the modules and libs needed to run so the user can run the python program without needing python and modules etc etc installed. Part of the issue seems to be that bbfreeze doesnt do things like compile modules to pyd/lib files therefore if they are not included in the pygi-aio setup then the script fails or just doesnt include them(because it cant because it doesnt exist). In the bbfreeze process it includes all the pyd's eggs libs and so forth needed to run (if it can find them). Like i said before i cant add the modules though without the pyd files.
So basically im requesting that current(rebuild) or future versions of your package be made with pyd files included as they where before so i can add them to the include list in my bbfreeze script. So at the very least i can start narrowing it down to missing libs/pyds.(what i need to add to my includes list) The program is open source so you can see all of it and my converted branch. Like i said im pretty new to python and all the modules deluge runs with. I wish i could explaian better. Im just trying to finish this project(conversion of deluge) of mine and one of only like 3 issues that remain is packaging deluge(bbfreezing) so it can be added to a windows installer. And it seems bbfreeze needs pyd files in order to make this standalone copy of deluge.
Last edit: Josh Brown 2015-08-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not familiar with bbfreze but that is common issue will other bundler too. But first, if you have port to pygi why you still need gobject subdir (which part of legacy pygtk)? Does deluge offer dual mode (I can't see it in your repo)? The only required pygi's pyd are _gi_cairo.pyd, _gi.pyd and _cairo.pyd. Required subdirs are gi, pygtkcompat and cairo. What I want to say is there is no missing pyd files in the installer to run pygi based app.
Due to the nature of typelib which python don't understand and gnome runtime's modular arhitecture, bundler won't include most of runtime files, you need instruct bbfreeze to copy files inside gnome subdir to (usually) deluge root (alongside executable stub).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the current state my conversion to pygi doesnt have dual compatibility with pygi and pygtk this may change in the future depending on what the devs want to do im not really an official dev im just trying to help the project. Ok so yea i didnt know gobject was legacy its still included in the gi folder and still works (even without warrning?) ,where other parts that are depricated/legacy, they have warrnings for when imported in the app. Because of this i thought maybe it was just in error that the pyd wasnt there. And yes bbfreeze(similar to py2exe and cx_freeze) has whats called recipies that tell it to copy things like lib-gtk.dll and what not which seems to be working. The other mentioned python modules are being picked up and copied so i think the only one is gobject which since its legacy now i just need to convert.
Thank you for taking the time to help me resolve this.(hopefully i can convert the remaining gobject parts and not run into any other issues) Also thank you for providing this package other than this error, which is my own fault, it works very nicely and i appreciate the work you have done and look forward to future builds. Also just as a side note is there any plans for maybe a dev package that just has the basics of gi and gtk without all the apps?(just a thought)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, i have been working on converting a app from pygtk/gtk2 to pygi/gtk3 and i have the app running when running from python, however when trying to bbfreeze the app trying to load the app from the bbfreeze folder it says something along the lines of unable to load name GObject. And i notice in a bbfreeze of the pygtk/gtk2 build theres a gi_gi.pyd AND gobject.gobject.pyd file but in the pygi/gtk3 there is ONLY gi_gi.pyd. I also noticed in some of the old builds provided here of pygi/gtk3 there was a gobject pyd but not the newer ones is there something special that needs to be done? Or can we get these pyd's in next update?
Edit: Im fairly new to python/gtk this is one of the biggest projects ive tried so any help would be much appreciated.
with pygi-aio-3.10.2-win32_rev18-setup.exe i am able to add "gi._glib", "gi._gobject" to the bbfreeze(with 3.14 it says no module found with bbfreeze ven though the app runs fine when run from python/scripts dir)
however i get
C:\deluge-bbfreeze-1.4.0>deluge-debug
21:18:12 [ERROR ][root ] Could not find any typelib for GObject
21:18:12 [ERROR ][root ] Could not find any typelib for Gdk
21:18:12 [ERROR ][deluge.ui.ui] cannot import name GObject
Traceback (most recent call last):
File "deluge\ui\ui.py", line 144, in init
File "deluge\ui\gtkui__init__.py", line 1, in <module>
File "deluge\ui\gtkui\gtkui.py", line 15, in <module>
ImportError: cannot import name GObject
21:18:12 [ERROR ][deluge.ui.ui] There was an error whilst launching the reques
t UI: gtk
21:18:12 [ERROR ][deluge.ui.ui] Look at the traceback above for more informati
on.
Which is similar to what i had gotten with 3.14 however i dont remeber the typelib part.
Last edit: Josh Brown 2015-08-11
FYI, pygtk was marked as "legacy" and became seperated from aio, it need minimal preinstalled pygi aio to works and need manual installation (extract to python x.y site-packages).
Assuming it is a packaging issue, you probably want to make sure that "gnome" folder which contain typelib and runtime is available in your PATH environment when your app not ran in interpreter mode.
I need more info on how you mix the app and pygi because there are various ways to do bundling.
so basically as you can see im trying to update deluge fairly popular torrent client that currently runs on pygtk which as you said is "legacy" now which is why im trying to update it for pygi/gtk3. The source code for deluge can be seen here and a branch with my updates to pygi/gtk3 here. Ill appologize in advance if my explaination isnt good. If youd be willing im in deluge's irc(freenode #deluge) faily often might be easyer/quicker to comunicate there.
The issue is most definaly a packaging issue. The bbfreeze(packaging) script that once worked with pygtk no longer works with pygi-aio-3.14.0_rev19-setup.exe(nor earlier version of your package). However one difference ive noticed is with earlyer versions of your package that has the pyd files i mentioned before alows me to add for example "gobject" to my includes in the bbfreeze script where your newer packages when adding "gobject" to includes says it cant find that module and the script stops.
with deluge "python setup.py build" byte compiles python files and makes egg. Then "python setup.py install" copies the files to python/scripts and python/site to be run as a normal python program. At this point deluge runs fine with pygi-aio-3.14.0_rev19-setup.exe. Under my branch linked above ive updated all the imports from pygtk imports to pygi/gtk3 imports and so forth. However when runing bbfreeze it does not pick up all the modules needed to be run. What bbfreeze does is make a standalone copy of all the programs files and the modules and libs needed to run so the user can run the python program without needing python and modules etc etc installed. Part of the issue seems to be that bbfreeze doesnt do things like compile modules to pyd/lib files therefore if they are not included in the pygi-aio setup then the script fails or just doesnt include them(because it cant because it doesnt exist). In the bbfreeze process it includes all the pyd's eggs libs and so forth needed to run (if it can find them). Like i said before i cant add the modules though without the pyd files.
So basically im requesting that current(rebuild) or future versions of your package be made with pyd files included as they where before so i can add them to the include list in my bbfreeze script. So at the very least i can start narrowing it down to missing libs/pyds.(what i need to add to my includes list) The program is open source so you can see all of it and my converted branch. Like i said im pretty new to python and all the modules deluge runs with. I wish i could explaian better. Im just trying to finish this project(conversion of deluge) of mine and one of only like 3 issues that remain is packaging deluge(bbfreezing) so it can be added to a windows installer. And it seems bbfreeze needs pyd files in order to make this standalone copy of deluge.
Last edit: Josh Brown 2015-08-15
I'm not familiar with bbfreze but that is common issue will other bundler too. But first, if you have port to pygi why you still need gobject subdir (which part of legacy pygtk)? Does deluge offer dual mode (I can't see it in your repo)? The only required pygi's pyd are _gi_cairo.pyd, _gi.pyd and _cairo.pyd. Required subdirs are gi, pygtkcompat and cairo. What I want to say is there is no missing pyd files in the installer to run pygi based app.
Due to the nature of typelib which python don't understand and gnome runtime's modular arhitecture, bundler won't include most of runtime files, you need instruct bbfreeze to copy files inside gnome subdir to (usually) deluge root (alongside executable stub).
In the current state my conversion to pygi doesnt have dual compatibility with pygi and pygtk this may change in the future depending on what the devs want to do im not really an official dev im just trying to help the project. Ok so yea i didnt know gobject was legacy its still included in the gi folder and still works (even without warrning?) ,where other parts that are depricated/legacy, they have warrnings for when imported in the app. Because of this i thought maybe it was just in error that the pyd wasnt there. And yes bbfreeze(similar to py2exe and cx_freeze) has whats called recipies that tell it to copy things like lib-gtk.dll and what not which seems to be working. The other mentioned python modules are being picked up and copied so i think the only one is gobject which since its legacy now i just need to convert.
Thank you for taking the time to help me resolve this.(hopefully i can convert the remaining gobject parts and not run into any other issues) Also thank you for providing this package other than this error, which is my own fault, it works very nicely and i appreciate the work you have done and look forward to future builds. Also just as a side note is there any plans for maybe a dev package that just has the basics of gi and gtk without all the apps?(just a thought)