Whoops, guess I'm not a member of the users' list.

-----Original Message-----
From: Davidson, Josh 
Sent: Friday, December 16, 2011 4:09 PM
To: pydev-us...@lists.sourceforge.net
Subject: PyDev PYTHONPATH settings don't expand Eclipse variables

I am aware that the recommended way to add another project's source folder 
within a workspace to a project's PYTHONPATH is to use the Project References 
section of the project properties.  This is pretty slick (uses the referenced 
project's source folders) when dealing with pure Python projects and I think 
this should continue to work as-is.  However, if you are working with mixed 
CDT/Python projects where the CDT projects have more than one build 
configuration, you can't do this.  The reasons are somewhat convoluted, but 
suffice it to say, you don't want to use Project References with CDT (CDT 
provides its own project references configuration for this very reason).  
Anyways, what needs to happen in this scenario is to not use the built-in 
Project References and instead set the PYTHONPATH via the" PyDev - PYTHONPATH" 
configuration.  However, if I open the ExternalLibraries tab and attempt to add 
a project's source directory using Eclipse variables like {workspace_loc} or 
${WorkspaceDirPath} (this is really a CDT variable) the variables aren't 
expanded and I get an "Invalid external source folder specified" error.  If I 
add the project's source directory using the "Add source folder" option, it 
will work, but it leaves the absolute path in the project configuration, 
breaking the portability of the project.  I have seen other plugins 
automatically substitute ${workspace_loc} for portions of an absolute path that 
match the project's workspace.

So in summary, PyDev isn't doing anything wrong.  However, it really should 
resolve Eclipse variables in the External Libraries tab of PyDev - PYTHONPATH.

Thanks,
Josh

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
pydev-code mailing list
pydev-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-code

Reply via email to