From 71d73d09dd222fcd7d38b971775566c64999ca27 Mon Sep 17 00:00:00 2001 From: fedepell Date: Wed, 3 May 2017 13:21:33 +0200 Subject: [PATCH] eclipse: create the pydev python path configuration from the waf setup so the symbols can be correctly resolved in the IDE --- waflib/extras/eclipse.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/waflib/extras/eclipse.py b/waflib/extras/eclipse.py index 9e317934..9b3a27ee 100644 --- a/waflib/extras/eclipse.py +++ b/waflib/extras/eclipse.py @@ -60,6 +60,14 @@ class eclipse(Build.BuildContext): if not isinstance(tg, TaskGen.task_gen): continue + # Add local Python modules paths to configuration so object resolving will work in IDE + if 'py' in tg.features: + pypath = tg.path.relpath() + py_installfrom = getattr(tg, 'install_from', None) + if py_installfrom: + pypath += os.sep + py_installfrom + pythonpath.append(pypath) + tg.post() if not getattr(tg, 'link_task', None): continue