Issue242

Title Standalone: Problem on windows with pygobject
Priority bug Status testing
Superseder Nosy List alfazaz
Assigned To alfazaz Keywords standalone, wrong_execution

Created on 2015-09-06.15:13:59 by alfazaz, last changed by alfazaz.

Files
File name Uploaded Type Edit Remove
Test.dwi alfazaz, 2015-09-07.21:12:42 application/octet-stream
Messages
msg1535 (view) Author: alfazaz Date: 2015-09-12.13:04:24
All right, thanks. I can do without for the moment so no problem !

Have a nice day
Alfazaz
msg1534 (view) Author: kayhayen Date: 2015-09-12.13:02:45
So, this will need a Nuitka plugin, that makes sure the meta path based loader 
works for it too. It needs to generate hidden dependencies and to patch the 
meta path based loader.

Seems doable but trick. Plugins are not yet ready for prime time. I am going 
to finish "multiprocessing" first, then tackle this.

Yours,
Kay
msg1533 (view) Author: alfazaz Date: 2015-09-12.13:01:15
Ok. So do I need to do something ?
msg1532 (view) Author: kayhayen Date: 2015-09-12.12:43:55
So, thanks to the link you gave, I was able to install PyGTK. It's incredible how the download link 
is broken, pip does garbage, ... I wonder how relevant it really is these days.

And I could reproduce the issue.

Seems caused by this:

----
from ..importer import DynamicImporter # that will be "gi.importer".

sys.meta_path.append(DynamicImporter('gi.repository'))
---

That's from "gi.repository" package code.

Yours,
Kay
msg1523 (view) Author: alfazaz Date: 2015-09-10.20:08:03
On the last message of 
https://sourceforge.net/p/pygobjectwin32/tickets/28/
the pygi maintainer says that there is a Nuitka problem : there is no specific
pygi support like pyqt.

He also posted a protocol to be able to run a program compiled with nuitka and
using pygi on
https://sourceforge.net/p/pygobjectwin32/discussion/general/thread/b8d6781c/

Perhaps nuitka could be more efficient with pygi.

Hope this helps !
msg1510 (view) Author: alfazaz Date: 2015-09-07.21:12:42
I don't know if it can help, but here is the Dependency Walker file related to
the execution of my Test.exe...
msg1509 (view) Author: alfazaz Date: 2015-09-07.21:05:15
Hi !

I retried with factory branch from git on windows and I get same errors as in my
first message. :-(

More informations :

* On linux, no problems for me, even on my big program : everything works great
with nuitka (and it's really cool !).

* On windows, my python programs with gtk work fine without freezing with nuitka
but, after freeze, I have the errors I told before. I use Gtk comes from
https://sourceforge.net/projects/pygobjectwin32 (installed with
pygi-aio-3.14.0_rev21-setup).

I can do everything you tell me to debug this (even if windows is not my "cup of
tea" but I must do with it :-( ).

Thanks in advance !
Alfazaz
msg1508 (view) Author: kayhayen Date: 2015-09-07.19:32:59
Hello,

I was trying to reproduce on Linux, and got another error, which I fixed, and then it worked. Maybe you 
can retry. Last time I tried to install GTK for Windows, it was hell. But maybe that was the issue 
already. Use the "factory" branch of official git.

Yours,
Kay
msg1503 (view) Author: alfazaz Date: 2015-09-06.15:13:59
Hello !

I have a problem with executable made with nuitka on windows with a big program.
To help on debug, I made a simple test case. Here it is...

* First, I create Test.py with only one line :

from gi.repository import Gtk

* Then, I compile it with 

nuitka --standalone Test.py

There is no error on linux and windows here.

* Then, I execute Test.exe : there's no problem on linux but on windows, I get
this :
-------------------------------------------
E:\Chemin\Test.dist>Test.exe
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 2158, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Chemin\Test.dist\Test.py",
line 1, in <module>
  File "E:\Chemin\Test.dist\gi\importe
r.py", line 53, in find_module
ImportError: cannot import name Gtk, introspection typelib not found
--------------------------------------------

On windows, Gtk comes from https://sourceforge.net/projects/pygobjectwin32 .

Do you know how to make Gtk working with nuitka ? Is there any mistake from me ?

Thanks in advance for help...

Alfazaz
History
Date User Action Args
2015-09-12 13:04:24alfazazsetmessages: + msg1535
2015-09-12 13:02:45kayhayensetmessages: + msg1534
2015-09-12 13:01:15alfazazsetmessages: + msg1533
2015-09-12 12:43:55kayhayensetmessages: + msg1532
2015-09-10 20:08:03alfazazsetmessages: + msg1523
2015-09-07 21:12:42alfazazsetfiles: + Test.dwi
messages: + msg1510
2015-09-07 21:05:15alfazazsetmessages: + msg1509
2015-09-07 19:35:27kayhayensettitle: Problem on windows with pygobject -> Standalone: Problem on windows with pygobject
2015-09-07 19:32:59kayhayensetstatus: unread -> testing
assignedto: alfazaz
messages: + msg1508
keyword: + wrong_execution, standalone
2015-09-06 15:13:59alfazazcreate