Collected data files during analysis are not part of binary

10 views
Skip to first unread message

gnanesh k p

unread,
Mar 16, 2022, 4:04:22 AM3/16/22
to pyins...@googlegroups.com
Hi All, 

I have a hook function written for a package which collects all (datas, binaries, HIddenImports) and my hook looks as below.

      from PyInstaller.utils.hooks import collect_all

      datas, binaries, hiddenimports = collect_all("common")
      print(f"Common datas: {datas} ++++++++++++++")

 
When the binary gets built, from the logs I can see that it has collected all the datas from the package, however  when I view the 
final binary I do not see the data files in place. 

I am not getting what is the reason for this behavior, and how to solve this Issue.


Regards,
Gnanesh 

Eric Fahlgren

unread,
Mar 16, 2022, 11:35:34 AM3/16/22
to pyins...@googlegroups.com
'collect_all' simply locates the items, putting that information into its return values.  'datas' should then be used in 'EXE' to include them into a one-file, or be provided as an argument to 'COLLECT' for a one-dir.  It's easiest to see by just writing a hello-world and running 'pyinstaller --onefile/--onedir hello.py' on it, then looking where 'datas' appears in the generated .spec file.



--
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 pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CAA%2BSF7mhKsxGfG4HUs2z-%2Bt7RdG%3D_TPfbbYo-eZ1uJ%2BEFBC%3DRw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages