Menu ▾ ▴

Plugin contributing to a project's pythonpath

2008-06-04
2013-03-15
  • Eric Wittmann

    Eric Wittmann - 2008-06-04

    I would like to expose some python code (an SDK in this case) as an Eclipse plugin.  The idea would be to ship as an exploded plugin, with the .py/.pyc/.pyo files stored in some bin directory within the plugin.

    Then I need a way to contribute that bin directory to the pythonpath of a project in the workspace so that the python code gets analyzed and is on the path at runtime.  Perhaps my SDK plugin contributes a project nature that adds the entries to the project's pythonpath?  Is that the best way to do this?

     
    • Eric Wittmann

      Eric Wittmann - 2008-06-08

      Well, I made my way through the pydev source code and have come up with a patch that gave me the extension point that I needed.  Fabio, what's the best way to get the .patch file to you so you can take a look at the change and approve/reject it?

      I ended up adding an extension point that gives plugins the opportunity to contribute to a project's python path.  The relevant change was made in PythonPathNature.getOnlyProjectPythonPathStr().

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2008-06-08

        Just create a bug with the patch. At http://pydev.sourceforge.net/developers.html there's an explanation on which patch format it should be, etc.

        Cheers,

        Fabio