Commit 3daa4bf5 authored by Robert Bradshaw's avatar Robert Bradshaw

Py3 fix

parent 86fa66ac
......@@ -64,6 +64,7 @@ if sys.version_info[0] < 3:
else:
def encode_filename_in_py2(filename):
return filename
basestring = str
def extended_iglob(pattern):
if '**/' in pattern:
......@@ -148,10 +149,7 @@ distutils_settings = {
@cython.locals(start=long, end=long)
def line_iter(source):
if isinstance(source, file):
for line in source:
yield line
else:
if isinstance(source, basestring):
start = 0
while True:
end = source.find('\n', start)
......@@ -160,6 +158,9 @@ def line_iter(source):
return
yield source[start:end]
start = end+1
else:
for line in source:
yield line
class DistutilsInfo(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment