aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/build_py.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/build_py.py')
-rw-r--r--setuptools/command/build_py.py4
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"