-
Notifications
You must be signed in to change notification settings - Fork 467
Description
PyInstaller has supported Babel for ages (it has had a hook for Babel since 2009). #505 actually broke PyInstaller support AFAICS (tested on Python 3.6 with PyInstaller dev version and Python 3.5 with the latest PyInstaller release). PyInstaller will automatically bundle the data files (babel/locale-data) using the hook and when the executable is run, these files are extracted to a temporary folder, say $TMP/_MEI123456/babel/locale-data. However the new code will look for it in {sys._MEIPASS}/locale-data, i.e., $TMP/_MEI123456/locale-data and fail.
PyInstaller actually sets __file__ for "frozen" modules to a path relative to the temp folder that the data files get extracted to (see pyinstaller/pyinstaller#1598 (comment)). So the old was already doing the right thing - if it didn't work in some setup, that was really a PyInstaller bug.