-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encoding in __boot__.py #105
Comments
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). It is currently not possible to change the encoding. I'm not yet sure as to what is the best approach to fix this issue. The easiest workaround if you are using python 3 (which you likely are given the error message) is to patch py2app/bootstrap/build_app.py in the py2app source or installation tree. Look for the open statement and add
The final solution will either try to determine the encoding (PEP 263 with the appropriate default encoding), or will just compile the script to a pyc file when building the app bundle (just like all other source files are compiled). The latter is more likely as compiling the source file is useful for other reasons as well (see #47) |
Original comment by Ivan Romanko (Bitbucket: ivanromanko, GitHub: ivanromanko). Thanks a lot, Ronald! |
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). Reopened because I want to fix this properly in a future release, and keeping the issue open ensures that I won't forget about this problem. |
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). Allow encodings other than ASCII in the main script This primarily affects Python 3.x because source files There is some code duplication, but that cannot easily be Fixes #105 |
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). merge, fixes #105 |
Original report by Ivan Romanko (Bitbucket: ivanromanko, GitHub: ivanromanko).
There is "with open" in generated app/Contents/Resources/boot.py.
This open contains
Is it possible to add explicit encoding there via option or permanent change?
I'm too stupid to make this change myself.
I need this because of
The text was updated successfully, but these errors were encountered: