[vtk-developers] Solutions to TestSetGet/TestEmptyInput failures on RogueResearch3

David Cole DLRdave at aol.com
Wed May 6 09:28:27 EDT 2015


4) Exclude these tests on machines submitting dashboards with python <
2.6, make a note somewhere that says these tests require 2.6 or later,
and wait for 2.5 to go away...

Just another option to consider.

Another way to deal with it might be to simply print output from the
test itself saying "python < 2.6 does not have isabstract, test not
really running, fake pass anyway"


D



On Wed, May 6, 2015 at 3:34 AM, Andrew Maclean
<andrew.amaclean at gmail.com> wrote:
> Hi All,
>
> RogueResearch is running Python 2.5.
>
> Both TestSetGet.py and TestEmptyInput.py fail at this line:
>     vtkClasses = inspect.getmembers(
>                     vtk, inspect.isclass and not inspect.isabstract)
> with this error:
>     vtk, inspect.isclass and not inspect.isabstract)
> AttributeError: 'module' object has no attribute 'isabstract'
>
> Apparently the isabstract attribute was introduced in Python 2.6.
>
> From what I can see there are these options:
>
> 1) Skip these two tests by checking the version of Python used when VTK is
> built.
> 2) Extend option 1 by by creating a global variables in
> ./Cmake/VTKConfig.cmake.
> 3) Do nothing, and hope Python 2.5 is eventually deprecated.
>
> My preferred option is 2) as this could be useful when VTK supports Python 3
> e.g it may be useful to know which version of Python VTK is wrapped with, in
> the same way as we use VTK_QT_VERSION. If this is Ok I propose calling it
> VTK_WRAPPING_PYTHON_VERSION to distinguish it from VTK_PYTHON_VERSION in
> ./CmakeLists.txt (which can have the values 2, 2.x, 3, 3.x etc).
> VTK_WRAPPING_PYTHON_VERSION would be built from PYTHON_MAJOR_VERSION and
> PYTHON_MINOR_VERSION which are defined in ./CMake/FindPythonLibs.cmake.
> This would require just adding one line to ./CMake/VTKConfig.cmake.in,
> something like this:
> 2.1)
> SET(VTK_WRAPPING_PYTHON_VERSION
> "@PYTHON_MAJOR_VERSION at .@PYTHON_MINOR_VERSION@")
>
> or ... would it be better to simply just do this in this file, since these
> are defined in ./Utilities/Python/vtkPythonConfigure.h.in?
> 2.2)
> SET(VTK_PYTHON_MAJOR_VERSION "@VTK_PYTHON_MAJOR_VERSION @")
> SET(VTK_PYTHON_MINOR_VERSION"@VTK_PYTHON_MINOR_VERSION@")
>
>  I prefer option 2) and, on reflection, I would go with with 2.2)
>
> Please let me know what you think would be the best option.
>
> Regards
>     Andrew
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
>
> ___________________________________________
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>


More information about the vtk-developers mailing list