diff --git a/aksetup_helper.py b/aksetup_helper.py index a52976dc03d310ab43e2cde42dc2a0b371ddae9c..3f09d3365bf425e4a824e1d4a3473a2aea02ce7e 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):