[Ironpython-users] Distributing apps

mchalkley at mail.com mchalkley at mail.com
Fri Mar 2 21:58:09 CET 2012

Friday, March 2, 2012, 12:57:46 PM, you wrote:

> On Fri, Mar 2, 2012 at 9:33 AM,  <mchalkley at mail.com> wrote:
>> Ok, thanks - that got me a long ways past where I was. The exe that it
>> builds doesn't include the standard python library stuff, like string,
>> even though it's in an import statement. So do I have to explicitly
>> include everything like that (datetime, sys, re, etc) in the pyc.py
>> command, or is there a better way to do it?

> Your best bet is probably to put the standard library in a zip file
> and use zipimport. That's how Mercurial does it, for example.

> - Jeff

Well, when you or whoever finds time to document the process, could
you include something about that, too? If put some of the standard
library files, but omit others, I get a message telling me which ones
are missing, but if I include everything, I get:

Unhandled Exception: Microsoft.Scripting.SyntaxErrorException: unexpected token '<newline>'
   at IronPython.Runtime.ThrowingErrorSink.Add(SourceUnit sourceUnit, String message, SourceSpan span, Int32 errorCode, Severity severity)
   at IronPython.Compiler.Parser.ReportSyntaxError(Int32 start, Int32 end, String message, Int32 errorCode)
   at IronPython.Compiler.Parser.ReportSyntaxError(Token t, IndexSpan span, Int32 errorCode, Boolean allowIncomplete)
   at IronPython.Compiler.Parser.ParsePrimary()
   at IronPython.Compiler.Parser.ParsePower()

So, it seems it doesn't like the libs being in a zip file... I'll keep
playing with it...



More information about the Ironpython-users mailing list