From: Greg S. <sw...@la...> - 2010-03-17 20:11:01
|
Dear Stef, and others, When I explicitly include the tga files as data_files in my setup.py module for py2exe, it works ok when one of the py2exe options is "skip_archive":1 In this case, the library.zip is not created, and the three tga files appear in folder ...\dist\visual. However, just omitting that "skip_archive" option, thus trying to get everything into library.zip, makes a MyProgram.exe which fails with the following log: Traceback (most recent call last): File "MyProgram.py", line 6, in <module> File "visual\__init__.pyc", line 77, in <module> File "visual\ui.pyc", line 3, in <module> File "visual\materials.pyc", line 151, in <module> File "visual\materials.pyc", line 129, in loadTGA IOError: [Errno 2] No such file or directory: 'C:\\DOCUME~1\\092710\\MYDOCU~1\\python\\dist\\library.zip\\visual/turbulence3.tga' In this case, py2exe has put the tga files in dist\visual again, instead of in dist\library.zip\visual. Manually adding the tga files into library.zip\visual does not fix this traceback report. If I explicitly try to have setup.py's data_files put the tga files into "library.zip\visual", py2exe complains "could not create ......\dist\library.zip: cannot create a file when that file already exists. Any ideas? Thank you, Greg At 05:01 PM 3/16/2010, you wrote: >Message: 5 >Date: Tue, 16 Mar 2010 18:46:20 +0100 >From: Stef Mientki <ste...@gm...> >Subject: Re: [Visualpython-users] vpython 5 and py2exe >To: vis...@li... >Message-ID: <4B9...@gm...> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >On 16-03-2010 18:23, Greg Swift wrote: > > Has anyone gotten vpython 5 to work with py2exe's library.zip? The > > three *.tga files are causing trouble. > > >you should explicitly include the tga files as datafiles. > >cheers, >Stef Greg Swift Condensed Matter and Magnet Science Group, Los Alamos National Laboratory Postal address: Mail Stop K764, Los Alamos National Laboratory, Los Alamos NM 87545 Package address: Mail Stop K764 - Drop Point O3U, TA-3 SM-30 Bikini Atoll Road, Los Alamos NM 87545 Phone 505-665-0640, fax 505-665-7652 (License exception: TSPA/Correspondence) |