Reputation: 321
I’m trying to compile a small python file which sends email based on the yagmail
library, which itself relies on the keyring
library.
Compiling works fine. Executing with dry-run options works fine. However, when I actually try it, it prompts for the password (as the yagmail
library normally does), but once the password entered, it comes back with an error telling me that there was no keyring backend found.
Obviously, there is a keyring backend (on Windows it’s Credentials manager I believe) and it works fine when I use the same program in the python form using the python runtime.
How can I package a keyring backend in the exe
file using Nuitka (or pyinstaller, for that matter)?
Upvotes: 1
Views: 225
Reputation: 77
I'm not familiar with keyring, but here are a few suggestions on getting outside code/files to work with Nuitka.
If your test results from steps 3 and 5 are different, you are likely not properly including all necessary files. You can manually copy and paste files into the .dist folder, or you can use the following Nuitka options to have them added at the time of the build.
--include-data-files=/AbsolutePathToCurrentFile/file.txt=relativePathInDistFolder/file.txt
--include-data-dir=/AbsolutePathToCurent/myDirectory=relativePathInDistFolder/myDirectory
--include-module=myModule
--include-package=myPackage
If you have absolute file paths for non-py files in your code, you will probably need to modify them to look at the copy in the .dist folder.
Upvotes: -2