<div dir="ltr"><div>FYI <a href="http://markmail.org/thread/6fybkjbz5xpr3qt7">http://markmail.org/thread/6fybkjbz5xpr3qt7</a></div><div>Is the email thread from the last time we talked about the VTK's minimum python version.</div>

<div><br></div></div><div class="gmail_extra"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div>
<br><br><div class="gmail_quote">On Thu, Jul 17, 2014 at 7:16 PM, Andrew Maclean <span dir="ltr"><<a href="mailto:andrew.amaclean@gmail.com" target="_blank">andrew.amaclean@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Thanks for the update Ben.<div><br></div><div>I didn't realise that this was triggered by OSX10.9<br><div><br></div><div>Let me know what I can do in the way of reconfiguring the python tests so that they run on both Python 3.x and Python 2.6+. I'm happy to spend time doing this.</div>


<div><br></div><div>I think you are going to have to ultimately bump up the Python version especially if we want to support Python 3. Currently I think it is 2.5 so going to 2.6 would be Ok or even 2.7!!!</div><div><br></div>


<div>I remember trying to make Python code run on earlier versions by testing for the Python version, unfortunately the python interpreter seems to precompile all branches so this approach failed. I never found a solution. So this is another argument for bumping the version</div>


<div><br></div><div>I see numpy supports 2.6/7 and 3.x (<a href="http://www.scipy.org/scipylib/faq.html" target="_blank">http://www.scipy.org/scipylib/faq.html</a>). So I suspect those using ParaView/VTK/Numpy are already using Python 2.6/2.7. </div>


<div><br></div><div>It might be an idea to put it out to the community to see who is actually using Python 2.5 or earlier with VTK 6.0 and if so would they see any problems upgrading to Python 2.7.</div><div><br></div><div>


We really should be supporting Python 3.x because that is where all the Python development is going on now and I suspect that Numpy and SciPy will be focussing their efforts there too.</div><div><br></div><div>Regards</div>

<span class="HOEnZb"><font color="#888888">
<div>Andrew</div></font></span></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Thu, Jul 17, 2014 at 11:39 PM, Ben Boeckel <span dir="ltr"><<a href="mailto:ben.boeckel@kitware.com" target="_blank">ben.boeckel@kitware.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div><br>
On Thu, Jul 17, 2014 at 09:54:51 +1000, Andrew Maclean wrote:<br>
> What are these options and what do they do? They have appeared in the recent<br>
> master.<br>
<br>
</div>These are meant for ParaView, in two different use cases, explained<br>
below.<br>
<div><br>
> To amplify:<br>
> 1) I am wondering why KITS are being brought back and how linking will work. In<br>
> the case of the usual modular VTK you can, in your CMakeLists.txt file, specify<br>
> a minimal set of libraries. Will this change if KITS are used? If it does, I<br>
> see more problems in supporting the two different versions of VTK i.e VTK and<br>
> VTK with kits, in the CMakeLists.txt files.<br>
<br>
</div>This is meant to help reduce the number of shared libraries built with<br>
ParaView. The problem is that on OS X 10.9 has too large of a library<br>
loader path (it used to be a dynamic buffer in the loader, but is now of<br>
a static size). This is triggered by either linking too many libraries<br>
or the paths to the libraries being too long. Due to the variables<br>
available with modular VTK, there should be no difference between the<br>
two (either linking directly to the target or using<br>
${vtk-module}_LIBRARIES). It also requires CMake 3.0 for INTERFACE<br>
libraries so that target linking works transparently.<br>
<br>
It is meant to be a purely internal thing and isn't necessary in the<br>
normal course of using VTK.<br>
<div><br>
> 2) Why is there a need to specify that vtkpython and pvtkpython be built? I<br>
> would have thought that once Python is selected that these are built as a<br>
> matter of course.<br>
<br>
</div>This is because, in ParaView, we are looking to build a purely static<br>
build with Python and NumPy support. This brings in extra requirements<br>
when linking of Python which (p)vtkpython would need to link (e.g., ssl,<br>
crypto, util, and some others). The solution was to either turn off<br>
vtkpython in this case or to add a magic variable which ParaView sets<br>
for extra libraries (p)vtkpython needs to link to work properly. It was<br>
decided that for ParaView, turning off vtkpython makes the most sense<br>
since pvpython and pvbatch exist.<br>
<div><br>
> Also I see some work is being done to support Python 3. Will there be an option<br>
> to select which version of Python to use?<br>
<br>
</div>I hope so (I'm just watching the branch for now).<br>
<div><br>
> As for the tests, I think most of the tests should run in Python 3 the only<br>
> tests I can think that wont are those with a print statement and this is easily<br>
> fixed for both Python 2.6+/3.<br>
<br>
</div>Anything that catches exceptions will likely need updated as well (and<br>
the minimum version bumped as there isn't a nice way to catch an<br>
exception that isn't a syntax error in either 2.4 or 3.0 without just<br>
catching a type and asking sys.exc_info() for the actual object). Other<br>
than that, I think we just need to watch for integer division now being<br>
floating point in Python 3.<br>
<span><font color="#888888"><br>
--Ben<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><div class="">-- <br>___________________________________________<br>Andrew J. P. Maclean<br><br>___________________________________________
</div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br></div>