Commit bc3a9dd8 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix infinite recursion in cythonize().

--HG--
extra : transplant_source : %CCQr%12%0AY%10%1F%DA%5D%CD%7C4%C8%CA%B4%90%81%3Er
parent 9f98dac8
......@@ -282,8 +282,8 @@ class DependencyTree(object):
#@cached_method
def package(self, filename):
dir = os.path.dirname(filename)
if os.path.exists(os.path.join(dir, '__init__.py')):
dir = os.path.dirname(os.path.abspath(filename))
if dir != filename and os.path.exists(os.path.join(dir, '__init__.py')):
return self.package(dir) + (os.path.basename(dir),)
else:
return ()
......
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