4Suite / McMillan Installer / py2exe
Thomas Heller
theller at python.net
Wed Sep 4 15:41:13 EDT 2002
"Thomas Korb" <Doc at goodweb.de> wrote in message news:doc.m3admxkclw.fsf at goodweb.de...
> Hi! I am using the XSLT-Processor from 4Suite (0.12.0a2), i.e.
>
> from Ft.Xml.Xslt.Processor import Processor
> from Ft.Xml.InputSource import DefaultFactory
> from Ft.Xml import ReaderException
>
> On Linux, I can use McMillan's Installer to create a distribution;
> on Windows, it fails (problems with a Math.py-module in the 4Suite
> package). And py2exe complains about missing modules.
>
> I can overcome the py2exe-problem by importing everything from
> Ft.Xml.Xslt, i.e.
>
> import Ft.Xml.Xslt.ApplyImportsElement
> import Ft.Xml.Xslt.ApplyTemplatesElement
> etc. etc. (a lot of etc. :-)
>
> (Too many module to include them on the commmand line with py2exe's
> '-p' option; more than 1024 characters!)
>
Hm, you can also list them in the setup.cfg file.
Something like this:
[py2exe]
includes=Ft.Xml.Xslt.ApplyImportsElement,
Ft.Xml.Xslt.ApplyTemplatesElement,
....
And IIRC you can also use (on the command line)
--includes Ft.Xml.Xslt.*
or even
--packages Ft.Xml.Xslt
> After that, py2exe still complains about missing modules (some of
> which even do not exist on the system; I think at least some of them
> are Mac-specific!), but it works (as far as I could check up to now).
>
> But now the program takes quite a time to start (many imports), and
If you don't go the setup.cfg solution, you can probably speed it up
by only importing the modules in a dummy function (which is never
executed). Something like this:
def py2exe_hints():
import Ft.Xml.Xslt.ApplyImportsElement
import Ft.Xml.Xslt.ApplyTemplatesElement
etc. etc. (a lot of etc. :-)
> I actually do not really trust this solution. Moreover, I would have
> to check and test all the above imports with each new version of 4Suite.
>
> Does someone know how to use 4Suite with the McMillan Installer or
> py2exe on Windows? Any help or hints would be highly appreciated!
>
I never used 4Suite, so no. I even heard ;-) that py2exe
doesn't work so good with _xmlplus.
Thomas
More information about the Python-list
mailing list