BUG: VTK_VERSION missing, and PEP440 compat
In a couple of issues lately I've built and installed a Python wheel from the
master branch. The wheel shows up named like
vtk-9.0.20201117-cp39-cp39-linux_x86_64.whl, but it has no
vtk.VTK_VERSION attribute, see for example the following output where I use that wheel I build today (though I've observed the same behavior locally on macOS as well as Linux x86_64):
From my perspective as a scientific Python developer and user:
- This seems like a bug --
VTK_VERSIONused to exist and now it doesn't.
- It would be good to have this named as
vtk.VTK_VERSION == '9.0.dev20201117(or better,
10.0.dev20201117, depending on how you eventually planned to next branch from and then release the changes in
master) or something similar to follow some variant of PEP440.
- Most Python packages have
package.__version__, so it would be nice to alias
vtk.__version__ = vtk.VTK_VERSIONor translate
VTK_VERSIONinto a PEP440-compatible name to make people's lives easier, assuming you plan to have the VTK python distribution always match the VTK version (which is sensible out to some level of dot-release presumably).
Of course people have lived with
VTK_VERSION doesn't have to conform to PEP440 because it might just reflect the underlying C++ library naming scheme, and doing
getattr(vtk, 'VTK_VERSION', '9.0') is an easy enough workaround, so feel free to close if none of this matters. I just thought I'd bring it up in case these are useful ideas. From my limited perspective, an ideal solution would be to restore
VTK_VERSION so that it always exists (I assume it always exists for the C++ library?), and then make
vtk.__version__ a PEP440-compatible translation of it.
And apologies in advance if I missed some previous issues about this, I searched the bug tracker for VTK_VERSION at least and didn't see anything...