diff options
author | Jeroen Demeyer <jdemeyer@cage.ugent.be> | 2015-04-21 14:03:36 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2015-04-25 17:16:30 +0200 |
commit | 8b142e8ed56607bcb5d3195625d9d69dcd193d76 (patch) | |
tree | 242c1cf28efa46064dc698028fbc8ad8b600cc6f | |
parent | 41fe46c7495b388640104bec2cae714a71c61606 (diff) | |
download | cython-8b142e8ed56607bcb5d3195625d9d69dcd193d76.tar.gz |
Fix relative cimport for Cython package dirs
-rw-r--r-- | Cython/Build/Dependencies.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py index e22f8caac..3fe68856a 100644 --- a/Cython/Build/Dependencies.py +++ b/Cython/Build/Dependencies.py @@ -45,7 +45,7 @@ except ImportError: from distutils.extension import Extension from .. import Utils -from ..Utils import cached_function, cached_method, path_exists, find_root_package_dir +from ..Utils import cached_function, cached_method, path_exists, find_root_package_dir, is_package_dir from ..Compiler.Main import Context, CompilationOptions, default_options join_path = cached_function(os.path.join) @@ -383,7 +383,7 @@ def resolve_depend(depend, include_dirs): @cached_function def package(filename): dir = os.path.dirname(os.path.abspath(str(filename))) - if dir != filename and path_exists(join_path(dir, '__init__.py')): + if dir != filename and is_package_dir(dir): return package(dir) + (os.path.basename(dir),) else: return () |