From 3512e08865c9fc60f003b0af7a320f0f356ea3e3 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 6 May 2009 13:54:33 -0400 Subject: [PATCH] Update aksetup_helper to find include paths for development-mode packages. --- aksetup_helper.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/aksetup_helper.py b/aksetup_helper.py index a52976dc..3f09d336 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -50,8 +50,15 @@ class PyUblasExtension(NumpyExtension): def get_module_include_path(self, name): from imp import find_module file, pathname, descr = find_module(name) - from os.path import join - return join(pathname, "..", "include") + from os.path import join, exists + installed_path = join(pathname, "..", "include") + development_path = join(pathname, "..", "src", "cpp") + if exists(installed_path): + return installed_path + elif exists(development_path): + return development_path + else: + raise RuntimeError("could not find C include path for module '%s'" % name) @property def include_dirs(self): -- GitLab