python - cx_freeze & pygobject in a subdirectory -


I have a small program that uses py27 & amp; PyGTK. I can stop it with Cx_Freeze very gladly.

I'm trying to "port" it and it's py33 & amp; Pygobject It has been completed successfully and I am not trying to adopt our setup.py cx_freeze script to "freeze" my setup now.

I can freeze a test application, but when I try to use the Tweaked version I get an ImportError. Whatever I have done, I have made all the binary data in a subdirectory (bin) The root has tried to keep the bit uncluttered.

As it has been mentioned that py27 & amp; Pygtk.

I have compressed it into a simple pipe and setup to display it:

TEST.py

  ###### ################################################## ############### Import OS Import System If Gateter (System, 'Frozen', Falls): # crop friction script wrapping sys.path.append (os.path.join (Os) .path.dirname (sys.executable), 'bin') sys.path.append (os.path.join (os.path.dirname (sys.executable), 'bin \\ etc') sys.path .append (Os.path.join (os.path.dirname (sys.executable), 'bin \\ lib')) sys.path.append (os.path.join (os.path.dirname (sys.executable), ' Bin \\ Shared ')) sys.path.append (os.path.join (os.path.dirname (sys.executable),' bin \\ library.zip ') os.environ [' TCL_LI BRARY '] = Os.path.join (os.path.dirname (sys.executable),' bin \\ tcl ') os.environ [' TK_LIBRARY '] = os.path.join (OS path.dirname (sys) .executable), 'bin \\ tk') os.environment ['MATPLOTLIBDATA'] = os.path.join (os.path.dirname (sys.executable), 'bin \\ mpl-data') GI import gi. Gi.repositor y import gtk from repository import ####################################### ###########################  

setup.py

< Code> ## ############################################## ####################### From Cx_Freeze Import Setup, import executable import site site import site_dir = site.getsitepackages () [1] include_dll_path = os .path.join (Site_dir, "gnome") missing_dll = ['libgtk-3-0.dll', 'libgdk-3-0.dll', 'libatk-1.0-0.dll', 'libcairo-gobject-2 .dll ',' Libgdk_pixbuf-2.0-0.dll ',' libjpeg-8.dll ',' Libpango-1.0-0.dll ',' libpangocairo-1.0-0.dll ',' libpangoft2-1.0-0.dll ',' libpangowin32- 1.0-0.dll ',' libgnutls-26.dll ', # 'Libgcrypt-11.dll', # 'libp11-kit-0.dll'] gtk_libs = ['etc.', 'Lib', 'Shared'] Include_files = [] missing_dll for dll: include_files.append (( Os.path.join (include_dll_path, dll), dll)) for Lib in Gtk_libs: include_files.append ((os.path.join (include_dll_path, lib), lib)) = ['gi'] is not included in [ = '' Wx ',' email ',' pydoc_data ',' curses'] package = ['g'] sys.path.append (os.path.join (os.path.dirname (__ file__), '.' , 'Bin')) EXE1 = Executable (script = "test.py", initScript (version = "9999", description = none, base = 'console', targetDir = "dist", targetName = "test.exe ", Compress = True, copyDependentFiles = True, Ape Descriptroxe = True, AppendScriptTibary = False, "test", author = "jrb", name = "test", options = {"build_exe": {"contains": includes, "excluded": is not included , "Package": package, 'include_files': include_files, "path": Sys.path, 'append_script_to_exe': false, 'build_exe': "dist / bin", 'compressed': true, 'copy_dependent_files': true , 'Create_shared_zip': True, 'include_in_shared_zip': True, 'Optimization': 2,}}, Executable = [EXE1] #################### ################################################## ##

Now when I run: / c / Python33 / python -OO setup.py build and then dist / tes Execute t.exe I have printed the console:

Error: Route: No typelist found for GTK traceback (most recent call final): The file "c: \ Python33 \ lib \ site- Packages \ cx_frreeze \ initscripts \ Console3.py ", line 27, exec (code, m. dict ) Import file "test.py", in line 19, in import: name can not import Gtk

I checked and typed files, but any Due to the Python & amp; I can not find them, I thought that this could be a missing path for gearpiece, but he did not do it right. Any ideas?

  os.environment ['GI_TYPELIB_PATH'] = os.path.join (Os.path .dirname (sys.executable), 'bin \\ lib \ girepository-1.0')  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -