diff options
author | Lennart Regebro <regebro@gmail.com> | 2012-08-22 18:01:49 +0200 |
---|---|---|
committer | Lennart Regebro <regebro@gmail.com> | 2012-08-22 18:01:49 +0200 |
commit | 0d962727403be73b0b1eac234ed81b941dd7cae9 (patch) | |
tree | b99589afd84c001882602369b3c4235c1b1afea9 /setuptools/command/build_py.py | |
parent | ea687a55fe5d94167a1bf1ff4a75a0c14b5407cd (diff) | |
download | external_python_setuptools-0d962727403be73b0b1eac234ed81b941dd7cae9.tar.gz external_python_setuptools-0d962727403be73b0b1eac234ed81b941dd7cae9.tar.bz2 external_python_setuptools-0d962727403be73b0b1eac234ed81b941dd7cae9.zip |
Issue #310: Non-ascii characters in a namespace __init__.py causes errors.
--HG--
branch : distribute
extra : rebase_source : 668e1c79a2bcc314bcf1f7213b317766bb8511ab
Diffstat (limited to 'setuptools/command/build_py.py')
-rw-r--r-- | setuptools/command/build_py.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index d53960fe..505dd4f3 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -215,8 +215,8 @@ class build_py(_build_py, Mixin2to3): else: return init_py - f = open(init_py,'rU') - if 'declare_namespace' not in f.read(): + f = open(init_py,'rbU') + if 'declare_namespace'.encode() not in f.read(): from distutils import log log.warn( "WARNING: %s is a namespace package, but its __init__.py does\n" |