<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 5, 2015 at 8:29 AM, Matthias Blaicher <span dir="ltr"><<a href="mailto:matthias@blaicher.com" target="_blank">matthias@blaicher.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/05/2015 04:17 PM, David Gobbi wrote:<br>
> On Mon, Oct 5, 2015 at 6:56 AM, Matthias Blaicher <<a href="mailto:matthias@blaicher.com">matthias@blaicher.com</a><br>
</span><div><div class="h5">> <mailto:<a href="mailto:matthias@blaicher.com">matthias@blaicher.com</a>>> wrote:<br>
>     However, this should obviously work without manually defining the search<br>
>     path. I propose to change the line to<br>
><br>
>     > from vtk.vtkCommonCorePython import *<br>
>     or<br>
>     > from .vtkCommonCorePython import *<br>
><br>
><br>
> This assumes that the extension modules are installed in the same<br>
> directory as the pure-python modules, which (for me at least) is<br>
> generally not the case.  Often the extension modules are kept in<br>
> a platform-specific directory somewhere else in the path.<br>
><br>
> Tonight I can look at the PEPs for this.<br>
><br>
>  - David<br>
><br>
<br>
</div></div>Where would you put them for a system vtk installation? For both the<br>
python 2 and the python 3 build, by default they are installed into the<br>
site-packages directory. It feels to me that this is a good place to put<br>
them. It's just that the import rules changed for py3k.<br>
<br>
However you are right that both of my proposals would break your<br>
workflow. The only thing which comes to my mind is to separate the<br>
extension into its own (private) package.<br></blockquote><div><br></div><div>I've looked over the guidelines for installing python modules, and it</div><div>seems that your original proposal was correct, i.e. the extension</div><div>modules should be placed in the same dir as the python files, which</div><div>would require either a) a relative import or b) placing the extension</div><div>modules one directory level up (which is messy).</div><div><br></div><div>The relative import breaks things for me when I try to use VTK from</div><div>the build directory (i.e. without doing a make install).</div><div><br></div><div>I have no immediate solution, but I'll think on this if I find any spare</div><div>time over the next couple days...</div><div><br></div><div> - David</div><div><br></div></div></div></div>