使用 PyInstaller 冻结 Python 脚本时包括 C++ 可执行文件

Including a C++ executable when freezing a Python script with PyInstaller

我尝试通读 PyInstaller 文档并使用规范文件,以及 Google/SO,但没有找到任何明确的答案。

我使用 Biopython 编写了一个 python 脚本,并使用 PyInstaller 将其制作成可执行文件,并且运行良好。然而,该脚本使用了 Biopython 函数 (NcbiBlastnCommandline()),它是 NCBI Blast+ blastn 程序(用 C++ 编写)的包装器,目前用户仍然需要在本地安装 NCBI Blast+。

是否可以将 C++ .exe 与其他文件一起打包,以便最终用户只需要下载我的可执行文件而不需要下载其他文件?

阅读教程中关于adding binary files的部分:

To add binary files, make a list of tuples that describe the files needed. Assign the list of tuples to the binaries= argument of Analysis.

a = Analysis(...
     binaries=[ ( '/path/to/blastn.exe', 'blastn.exe' ) ],
     ...