The format of the tuple that you gave to a.binaries may not be correct. Here is a tuple from my PyInstaller/Cython project that works:

a.binaries + [(
    'usb_comm.so',
    '/home/zakf/pyi_projects/usb_comm.so',
    'BINARY')]

The above format definitely works for me. I include the .so suffix in both the first and second strings, and I include the full path including the filename in the second string, not just the parent directory.

Another tip (I know it is on the PyInstaller wiki): Always try --onedir mode first. Make sure --onedir mode works, make sure it is packaging everything, and then you can attack --onefile. In this particular case it probably doesn't matter.

Zak Fallows

On 3/19/13 5:32 PM, dbv wrote:
This project is on Ubuntu 12.04 with PyInstaller 2.0 and is organized into separate folders for .py, .pyx, .so and pyinstaller files. The .spec file includes the statement:

    a.binaries + [("myconst", "/home/ubuntu/Programs/myproject_so",
    "BINARY"), ...],


The .so files have been generated (and located in the .so directory). PyInstaller is executed with:

    (bs)~/Programs/pyinstaller-2.0$ python pyinstaller.py --onefile
    ~/Programs/myproject_pi2/myproject.spec


generates the following error:

    Cannot find ('myconst', '/home/ubuntu/Programs/myproject_so', 1, 'b')

    Traceback (most recent call last):
      File "pyinstaller.py", line 91, in <module>
        main()
      File "pyinstaller.py", line 86, in main
        run_build(opts, spec_file)
      File "pyinstaller.py", line 50, in run_build
        PyInstaller.build.main(spec_file, **opts.__dict__)
      File
    "/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/build.py", line
    1625, in main
        build(specfile, buildpath)
      File
    "/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/build.py", line
    1582, in build
        execfile(spec)
      File "/home/ubuntu/Programs/myproject_pi2/myproject.spec", line
    24, in <module>
        console=True )
      File
    "/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/build.py", line
    987, in __init__
        crypt=self.crypt)
      File
    "/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/build.py", line
    880, in __init__
        self.__postinit__()
      File
    "/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/build.py", line
    315, in __postinit__
        self.assemble()
      File
    "/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/build.py", line
    933, in assemble
        archive.build(self.name, mytoc)
      File
    "/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/archive.py",
    line 199, in build
        self.add(tocentry)   # the guts of the archive
      File
    "/home/ubuntu/Programs/pyinstaller-2.0/PyInstaller/loader/carchive.py",
    line 225, in add
        s = open(pathnm, 'rb').read()

    IOError: [Errno 21] Is a directory:
    '/home/ubuntu/Programs/myproject_so'


Have I missed something obvious?
--
You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to