apps.packages Module¶
- paraview.apps.packages.get_dependency_versions() Dict[str, str][source]¶
Get a dictionary of dependency names and version strings
This functions by iterating over all site-packages directories that contain paraview, and attempting to retrieve a version for each package in that directory.
There is a blacklist that skips some packages, like catalyst, vtk, etc. This blacklist may need to be updated in future versions.
There is also a remapping of some names to their PyPI names. Not every import name matches the name of the package on PyPI. For example, import PIL comes from pillow on PyPI. We remap these names where needed.
It would be more preferable to use the dist-utils for all of these packages than the current method. However, it seems ParaView doesn’t create or keep the dist-utils for its Python packages.
- paraview.apps.packages.print_dependency_versions(versions: Dict[str, str])[source]¶
Print a list of dependencies similar to the format of pip list
For example, this may look like the following:
Package Version ————————– ————————– cftime 1.6.3 contourpy 1.1.0 cycler 0.10.0 fontTools 4.42.1 h5py 3.9.0 kiwisolver 1.4.5 …
The versions input is obtained from get_dependency_versions().
- paraview.apps.packages.print_requirements_file(versions: Dict[str, str])[source]¶
Print a requirements.txt file from a versions dictionary.
It is intended that this file will be installable like so: pip -r ./requirements.txt. The output appears like the following:
# Python dependencies for paraview version 5.13.3 cftime==1.6.3 contourpy==1.1.0 cycler==0.10.0 fontTools==4.42.1 h5py==3.9.0 kiwisolver==1.4.5 …
Some dependencies might have to be automatically built from source, since there may not be wheels for this particular Python version on PyPI. That will be handled automatically as long as all build dependencies are present.