Pyinstaller hook#41
Conversation
|
Thank you very much for the PR. We reviewed it (@gr0uch0dev and I) and we have few questions:
|
There can be a globally defined constant containing all available locales which can even be used by the import mechanism in locale = 'en'
if locale in LOCALES:
# Import the locale module and use it
else:
# Fall back to default locale or raise exceptionBut after taking another look at the
This would be a major overhaul of the whole timeago library to make it easier to maintain. Not sure if everyone would agree with such changes.
I gave some sample code and the PyInstaller command in #40 which demonstrates the issue. With this PR it should print the properly formatted string because all the locales are known to PyInstaller, otherwise they can't be imported because they aren't bundled with the produced executable. |
|
Hi @alexitx, Thanks a lot for the exhaustive feedback, you're right, we would need a rewrite and a simplification. I'll get on it as soon as I get time, I might write some specs at some point in some issues. About PyInstaller, I think that I need to run it on a Windows machine as everything is working on my Mac |
Added a hook for PyInstaller to package the dynamically imported locales (#40)