Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading description of 'binaries' in the doc of spec files #4283

Closed
KenTsui opened this issue Jun 24, 2019 · 1 comment · Fixed by #4476

Comments

@KenTsui
Copy link

@KenTsui KenTsui commented Jun 24, 2019

The following code is an example provided in the documentation of spec files to introduce how to use binaries.

a = Analysis(...
         binaries=[ ( '/usr/lib/libiodbc.2.dylib', 'libiodbc.dylib' ) ],
         ...

It seems to suggest that the syntax is binaries = [ (<binary path>, <destination path>) ].

But after inspecting the unzipped executable in a temp folder compiled using Pyinstaller 3.5.dev0 under Python 3.7 in Windows 10, it is discovered that the actual syntax is binaries = [ (<binary path>, <destination **folder**>) ].

For example, if you specify binaries = [ ( 'C:\\helloworld.exe', 'helloworld.exe' ) ]. You would find the folder structure of the unarchived executable as follows

unarchived-exe-temp-folder
├── helloworld.exe (*this is a folder)
│ └──helloworld.exe (*this is an executable)

P.S. My first time to open an issue in GitHub, please let me know if I need to provide any extra info.

@htgoebel

This comment has been minimized.

Copy link
Member

@htgoebel htgoebel commented Aug 7, 2019

Thanks for reporting. Indeed the documentation could be improved here.

For generating the destination names for both data and binaries, the same code is used (format_binaries_and_datas), thus they behave the same.

P.S. My first time to open an issue in GitHub, please let me know if I need to provide any extra info.

Well done! :-) Now what about submitting you first pull-request :-) See our Development Guide on how to create pull-requests for PyInstaller. Thanks.

You could adopt (correct) the example, maybe even add a second one, and refer to the Adding Data Files section for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.