On Wednesday, 5 September 2012 14:04:15 UTC+1, Martin Z wrote:
>
> Naib píše v St 05. 09. 2012 v 05:50 -0700:
> > something is still pulling in pyqt4 and pyTk. It has to be matplotlib
> > (its the only module which can utilise these other toolkits).
>
>
> > Any other suggestions as to where an override could be added?
>
> Look at the following file and add similar hook() function to the
> matplotlib hook and then replace 'ImageTk' with the modules you want to
> ignore.
>
> ./PyInstaller/hooks/shared_PIL_SpiderImagePlugin.py
>
Apologies for being really annoying but it seems Matplotlib is as annoying
as me. I have tried doing something along these lines in the
matplotlob.backends file. such hook methods do not seem to work since the
module that is returned is matplotlib (ie the parent module) and not
dependancies.
I have gone as far as
def matplotlib_backends():
"""
Return matplotlib backends availabe in current Python installation.
All matplotlib backends are hardcoded. We have to try import them
and return the list of successfully imported backends.
"""
all_bk = eval_statement('import matplotlib; print
matplotlib.rcsetup.all_backends')
# only use the ones we want otherwise exe grows too big
all_bk = ['GTK']#,'GTKAgg','GTKCairo']
avail_bk = []
import_statement = """
...
within hookutils.py (and it shows only backend_gtk is being selected). its
just there seems to be other methods that either pyinstaller or matplotlib
is reporting possible backend and as such qt4 and tk are still being pulled
in.
I can uninstall qt4 for now (but I am in the process of converting to pyqt4
so kind of need it).
I have done --log-level=DEBUG and I can see it has found qt4 and tkinter.
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pyinstaller/-/nwwnf9EPfCoJ.
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.