Hi

 

I’m trying to build a onefile distribution on Windows XP, for Activestate Python 2.4.1, using the excellent PyInstaller 1.0.

 

I want to include some binaries with the installation so my users don’t have to install other applications.

 

My initial spec file looks like this:

 

a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'), os.path.join(HOMEPATH,'support\\useUnicode.py'), 'synpy.py'],

             pathex=['C:\\ian\\mine\\synpy'])

pyz = PYZ(a.pure)

exe = EXE( pyz,

          a.scripts,

          a.binaries,

          name='synpy.exe',

          debug=0,

          strip=0,

          console=1 )

 

Which was generated by Makespec, and works fine, and I can run the generated synpy.exe, although I obviously have to provide the additional binaries separately.

 

I’m probably being particularly thick, but I find the description of spec files has lots of detail of the syntax of the implementation but is very opaque on its application.  In particular some explicit examples for onefile setup or how to add binaries would be useful (to me, at least).

 

So, when I try to add one of the binaries, I add a collect line on the end (although I’m not the least confident if/why this is right even though the syntax is correct):

 

collect = COLLECT(a.binaries+['dot.exe','c:\\program files\\att\\graphviz\\bin\\dot.exe','BINARY'])

 

but now doing a build fails with this output:

 

C:\ian\mine\synpy>c:\Python24\lib\site-packages\pyinstaller_1.0\Build.py synpy.spec

checking Analysis

checking PYZ

checking PKG

checking ELFEXE

checking COLLECT

building out4.toc because out4.toc missing

building COLLECT out4.toc

Traceback (most recent call last):

  File "c:\Python24\lib\site-packages\pyinstaller_1.0\Build.py", line 816, in ?

    build(sys.argv[1])

  File "c:\Python24\lib\site-packages\pyinstaller_1.0\Build.py", line 62, in build

    exec open(spec, 'r').read()+'\n'

  File "<string>", line 11, in ?

  File "c:\Python24\lib\site-packages\pyinstaller_1.0\Build.py", line 606, in __init__

    self.__postinit__()

  File "c:\Python24\lib\site-packages\pyinstaller_1.0\Build.py", line 80, in __postinit__

    self.assemble()

  File "c:\Python24\lib\site-packages\pyinstaller_1.0\Build.py", line 642, in assemble

    os.mkdir(self.name)

OSError: [Errno 22] Invalid argument: 'C:\\ian\\mine\\synpy\\dist_C:\\ian\\mine\\synpy\\buildsynpy\\out4'

 

Which doesn’t seem to have much correlation to the change I made to the spec file.

 

I’ve tried different paths to the binary, and putting the collect line in different places, but the result was the same.

 

Can anyone help?

 

Regards

Ian Barnard

 

 
 

-------------------------------------------------------------------------------------
Don’t miss out! Join us at this year’s User Group Conference.
9 – 10 November, Marlow, Buckinghamshire, UK.
http://www.telelogic.com/UKugc

Ian Barnard
Principal Consultant
Telelogic UK Ltd, Northbrook House
Robert Robinson Ave
Oxford Science Park, Oxford, OX4 4GA, United Kingdom
Phone: +44 (1865) 784 285
Fax: +44 (1865) 784 286
Mobile phone: +44 (798) 0798 813

[EMAIL PROTECTED]
http://www.telelogic.com

Telelogic - Requirements-Driven Innovation!
-------------------------------------------------------------


 

The information contained in this e-mail, including any attachment or enclosure, is intended only for the person or entity to which it is addressed and may contain confidential material. Any unauthorized use, review, retransmissions, dissemination, copying or other use of this information by persons or entities other than the intended recipient is prohibited.

 

_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller

Reply via email to