On Mon, Mar 29, 2010 at 4:36 PM, Giovanni Bajo <[email protected]> wrote:

> On Mon, 2010-03-29 at 14:15 -0700, Peter wrote:
>
> > So, then I tried the approach suggested at
> > http://www.mail-archive.com/[email protected]/msg01210.html,
> > adding
> > 'a.data += [('c:\\fdu-build\mkisofs.exe','DATA','/temp/mkisofs.exe')]'
> > to the spec file.  But that produces this error:
> > 'AttributeError: Analysis instance has no attribute 'data'.
>
> Typo here, you should try with "datas" instead of data, as seen here:
>
> > # -*- mode: python -*-
> > a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'),
> > os.path.join(HOMEPATH,'support\\useUnicode.py'), 'makeisogui.py'],
> >              pathex=['C:\\fdu-build'])
> > a.data += [('/fdu-build/mkisofs.exe','DATA','/temp/mkisofs.exe')]
> > pyz = PYZ(a.pure)
> > exe = EXE( pyz,
> >           a.scripts,
> >           a.binaries,
> >           a.zipfiles,
> >           a.datas,
>             ^^^^^^^^
>
> The correct line is something like this:
>
> a.datas += [('\\your\\path\\to\\mkisofs.exe', 'DATA', 'mkisofs.exe')]
>
> Then, you will find the file in the temporary directory whose name is
> stored at runtime in os.environ['_MEIPASS2'].
>
> All of this will eventually become smoother of course, it's just a
> matter of time :)
>
> --
> Giovanni Bajo   ::  [email protected]
> Develer S.r.l.  ::  http://www.develer.com
>
> Yay, that worked!  Thanks.  Actually, it works but I'm getting some weird
behavior.  I first changed the spec file in a directory on the local drive
(C:) of my Windows VM, and it worked, as mentioned.  Then, I used the same
script, spec file and mkisofs.exe but sitting on a network drive (V:)
exported from my Ubuntu box via samba; this time it failed, saying

"Cannot find ("V:\pythonstuff\fdu-build\mkisofs.exe','DATA','mkisofs.exe',
0,'b')
<several lines of traceback>
IOError: [Errno 2] No such file or directory: 'DATA'

I moved the files that worked from the C: drive to the V: drive and they
still failed (to prove to myself I didn't have just a typo).  I then moved
the files originally on V: to C: and then Build.py ran successfully.  So, I
just figured it doesn't like running on a network drive for some reason; I
can live with that.  (Python.exe and the pyinstaller files are all on the
local C: drive and I've been giving their full paths when I run Build.py.)
Today in the office (I was at home yesterday), I'm trying to do the same
thing, but even though I have all the files on the local C:, I'm getting the
same "No such file or directory: 'DATA'" error.  Any idea what I'm doing
wrong?  Thanks.

Peter

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

Reply via email to