##// END OF EJS Templates
Backport PR #9955: Catch UnicodeDecodeError from file lying about its encoding...
Backport PR #9955: Catch UnicodeDecodeError from file lying about its encoding Closes gh-9954 I'd like to show a more useful error, but we're several layers away from the code that knows the filename, and I don't want to duplicate a load of code from the traceback module. This prevents it from crashing IPython, at least.

File last commit:

r13387:3b4dba0a
r22896:c86e43f8
Show More
setupegg.py
7 lines | 217 B | text/x-python | PythonLexer
#!/usr/bin/env python
"""Wrapper to run setup.py using setuptools."""
# Import setuptools and call the actual setup
import setuptools
with open('setup.py', 'rb') as f:
exec(compile(f.read(), 'setup.py', 'exec'))