From dumping out some 'datas' values, it looks like it's simply a list of
tuples: [(src, dst), (src, dst), ...]  So, you should be able to add
something like this to the hook:

import os
from PyInstaller.utils.hooks import get_module_file_attribute

src = os.path.join(os.path.dirname(get_module_file_attribute('bokeh')),
'_sri.json')
dst = 'deduce from dumping original collect_data_files output'
datas = [(src, dst)] + \
             collect... all the original stuff


On Wed, Mar 11, 2020 at 1:17 AM Dan Cutright <[email protected]> wrote:

> I've had success with PyInstaller and Bokeh v1.4.0, but the subsequent
> version (v2.0.0) produces the following error:
>
> FileNotFoundError: [Errno 2] No such file or directory:
> '/var/folders/w9/59qs933d4dq1j2214v_dz1sr0000gn/T/_MEI8f9v8X/bokeh/_sri.json'
>
> Per Bryan over at Bokeh:
> https://discourse.bokeh.org/t/bokeh-2-0-0-and-pyinstaller/4904/2
> "_sri.json is a new file that must be present in the package."
>
> Can this be included by editing my .spec file?  Or perhaps the bokeh hook?
>
> My current hook file:
> from PyInstaller.utils.hooks import collect_data_files
>
>
> # core/_templates/*
> # server/static/**/*
> # subcommands/*.py
>
>
> datas = collect_data_files('bokeh.core') + \
>         collect_data_files('bokeh.server') + \
>         collect_data_files('bokeh.command.subcommands', include_py_files=
> True)
>
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/pyinstaller/f973760d-00d7-4bb6-a68f-146b350c7a20%40googlegroups.com
> <https://groups.google.com/d/msgid/pyinstaller/f973760d-00d7-4bb6-a68f-146b350c7a20%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/CAP2Qz%2BV1iJoMfnnBRHXSZwy2f%3DtbU_awLjtWQLBc8dUDudR6tw%40mail.gmail.com.

Reply via email to