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 | dcb37b07582bb69e3344fc09185d79cd80446bc7 (patch) | |
| tree | 97b1f20e51bac7d9390619a51837211dbe5bd467 /setuptools/command/build_py.py | |
| parent | 62a667e2d9be0af88aed8e7e39c4bd017ca3c8d6 (diff) | |
| download | python-setuptools-bitbucket-dcb37b07582bb69e3344fc09185d79cd80446bc7.tar.gz | |
Issue #310: Non-ascii characters in a namespace __init__.py causes errors.
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" |
