On 30 Mar, 15:00, "Simone Ramacci - Simosito.it" <[email protected]>
wrote:
> Giovanni Bajo ha scritto:
>
> > On dom, 2009-03-29 at 10:46 -0700, Simosito wrote:
>
> >> I know I can set PyInstaller to include only ASCII in my program but
> >> what if I want to include ONLY utf-8?
> >> How can I do that?
>
> > There is no explicit option for that. You can try playing games with the
> > "excludes" list in your spec file. If you look at the encodings package
> > (eg: encodings/euc_jpg.py) you will see that they are small files that
> > rely on external C libraries (eg: _codecs_jp, _multibytecodec, ecc.).
>
> > You're probably better off simply excluding those big guys from your
> > build. Notice that this will only have an effect on Linux and Mac were
> > those big modules are external dynamic libraries. On Windows, the
> > maintainers unfortunately decided to put all the large CJK codecs within
> > pythonXX.dll, so your only solution to trim down the executable size is
> > to recompile your own pythonXX.dll.
>
> I don't remember spec files' syntax very well. What if I use the ASCII
> option and then I set an include for the utf-8 codec?
> Is it possible? How can I do it?
>
> Cheers,
> S~
This is a snippet of my code:
import encodings
encs = set(os.path.splitext(n)[0]
for n in os.listdir(os.path.dirname(encodings.__file__)))
encs -= set(['__init__', 'aliases', 'utf_8', 'latin_1', 'cp850',
'idna', 'ascii'])
a = Analysis(.., excludes=map('encodings.'.__add__, encs))
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---