Thanks for the quick replies.
My copy of PyInstaller (2.0 from the front page) didn't have
collect_data_files, so I updated to a clone of the latest version from
github.
Since mpl_toolkits.basemap.pyproj is a module, not a package, I had to
write the hook as:
hook-mpl_toolkits.basemap.py:
from PyInstaller.hooks.hookutils import collect_data_files
datas = collect_data_files('mpl_toolkits.basemap')
And I needed an empty file at hook-mpl_toolkits.py
This builds without complaint (and the file is large enough that I suspect
the data has been included), but when I run the executable I get a long
delay and then:
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "<path>/pyinstaller/PyInstaller/loader/pyi_importers.py", line 268,
in load_module
exec(bytecode, module.__dict__)
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/pkg_resources", line
730, in <module>
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/pkg_resources", line
733, in Environment
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/pkg_resources", line
115, in get_supported_platform
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/pkg_resources", line
227, in _macosx_vers
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/platform", line 804,
in mac_ver
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/platform", line 781,
in _mac_ver_xml
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/plistlib", line 78,
in readPlist
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/plistlib", line 406,
in parse
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/plistlib", line 418,
in handleEndElement
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/plistlib", line 452,
in end_key
File "<path>/build/pyi.darwin/trex-mac/out00-PYZ.pyz/plistlib", line 436,
in getData
LookupError: no codec search functions registered: can't find encoding
Is this likely to be a bug in the latest git version? Is there a known-good
recent version I can use instead?
Many thanks,
Andrew
On Monday, February 4, 2013 4:24:54 PM UTC, Martin Z wrote:
>
> shorter modification could be
>
> from PyInstaller.hooks.hookutils import collect_data_files
> datas = collect_data_files('mpl_toolkits.basemap.pyproj')
>
>
> Bryan A. Jones píše v Po 04. 02. 2013 v 09:51 -0600:
> > My guess for the hook file (will probably need tweaking):
> >
> > from hookutils import collect_data_files
> >
> >
> > def hook(mod):
> >
> > global datas
> >
> > datas = collect_data_files('mpl_toolkits.basemap.pyproj')
> >
> >
> > return mod
>
>
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.