i wrote a small python app to automatically login a user to specific service using the keyring module (for storing the password in the windows credential vault) and wxpython for a login gui. The login tool for this service doesnt support the storage of login credentials but has a cmd login method i am using in my script.
The script is now finished and works perfectly but i would like to deploy this as exe to several other systems.
Keyring doesnt seem to play nice with pyinstaller but i got my program to start atleast after adding a huge list of hidden imports:
'json',
'json.decoder',
'json.encoder',
'json.scanner',
'keyring.backends.file',
'keyring.backends.Gnome',
'keyring.backends.Google',
'keyring.backends.keyczar',
'keyring.backends.kwallet',
'keyring.backends.multi',
'keyring.backends.OS_X',
'keyring.backends.pyfs',
'keyring.backends.SecretService',
'keyring.backends.Windows',
'keyring.backends._win_crypto',
'keyring.util.escape',
'keyring.util.XDG',
'keyring.credentials'
With those the app starts without any errors of missing modules but it still crashes when it tries to access the credential vault:
c:\PY\novell_login>dist\thread_test\thread_test.exe
Logging in User: test
Traceback (most recent call last):
File "c:\PY\build\thread_test\out00-PYZ.pyz\wx._core", line 16766, in <lambda>
File "<string>", line 119, in LongTaskDone
File "c:\PY\build\thread_test\out00-PYZ.pyz\keyring.core", line 44, in set_password
File "c:\PY\build\thread_test\out00-PYZ.pyz\keyring.backends.file", line 87, in set_password
File "c:\PY\build\thread_test\out00-PYZ.pyz\keyring.backends.Windows", line 81, in encrypt
NameError: global name '_win_crypto' is not defined
I dont know what else to do to fix this... Can anyone help me to properly include keyring or knows an alternative i could use. I would really like to keep using the windows crendential vault for storing the password.
Thanks!
Python: 2.7.9 pyinstaller: 2.1 keyring: 5.6 pywin: Build 219