Pyinstaller does not link pyd and dll files with -onefile

I am trying to bundle cefpython1 application in one exe with pyinstaller. I have a working spec file that builds the distribution for the cefpython1 example, cefsimple:

# -*- mode: python -*-

def get_cefpython_path():
    import cefpython1 as cefpython

    path = os.path.dirname(cefpython.__file__)
    return "%s%s" % (path, os.sep)

cefp = get_cefpython_path()

a = Analysis(['cefsimple.py'],
             hiddenimports=["json.decoder", "json.scanner", "json.encoder"])
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='cefsimple.exe',
          debug=False,
          strip=None,
          upx=False,
          console=False )
coll = COLLECT(exe,
               a.binaries + [('icudt.dll', '%s/icudt.dll' % cefp, 'BINARY')],
               a.zipfiles,
               a.datas + [('locales/en-US.pak', '%s/locales/en-US.pak' % cefp, 'DATA'), ('cefsimple.html', 'cefsimple.html', 'DATA'), ('icon.ico', 'icon.ico', 'DATA')],
               strip=None,
               upx=False,
               name='cefsimple')

      

The project files can be found on my Google Drive . Don't care about setup.py, it contains the py2exe assembly I played alongside pyinstaller. You need Python 2.7, Win32gui, cefpython1 and of course the pyinstaller packages to run this, I only tested this with the Win32 version! I even tried to install the pyinstaller development program if it makes any changes.

If I try to run pyinstaller with the -onefile attribute it doesn't seem to change anything, pyinstaller just creates a distribution directory under dist. The command I'm using:pyinstaller --onefile cefsimple.spec

The one tested is one file with a simple python Hello World file and it works with that. What causes pyinstaller not to create a single exe? The log doesn't show anything interesting, but there are some things I don't understand in the warning file . Ex. it says there is no module named cefpython1.cefpython, but the correct pyd is copied to the dist directory and the app still works.

Here is a list of files created in dist /: cefsimple.lst This may help find the problem.

+3


source to share





All Articles