From 1762be1f11bedc5829bb524b8dd8e0d311fc03fa Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 11 Aug 2013 16:58:26 +0200 Subject: [PATCH] fix base path finding for in-place compilation --- Cython/Build/Cythonize.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Cython/Build/Cythonize.py b/Cython/Build/Cythonize.py index f702693..22da438 100644 --- a/Cython/Build/Cythonize.py +++ b/Cython/Build/Cythonize.py @@ -60,14 +60,13 @@ def find_package_base(path): def cython_compile(path_pattern, options): pool = None + paths = map(os.path.abspath, glob.iglob(path_pattern)) try: - for path in glob.iglob(path_pattern): - path = os.path.abspath(path) + for path in paths: if options.build_inplace: - if is_package_dir(path): - base_dir = find_root_package_dir(path) - else: - base_dir = path + base_dir = path + while not os.path.isdir(base_dir) or is_package_dir(base_dir): + base_dir = os.path.dirname(base_dir) else: base_dir = None -- 2.7.4