You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.6 KiB

  1. #include "common.h"
  2. #include "storm-version-info/storm-version.h"
  3. PYBIND11_MODULE(info, m) {
  4. m.doc() = "Storm information";
  5. #ifdef STORMPY_DISABLE_SIGNATURE_DOC
  6. py::options options;
  7. options.disable_function_signatures();
  8. #endif
  9. py::class_<storm::StormVersion>(m, "Version", "Version information for Storm")
  10. // static properties are still called with self as argument (which we ignore), see
  11. // https://pybind11.readthedocs.io/en/master/advanced/classes.html#static-properties
  12. .def_property_readonly_static("major", [](py::object /* self */){ return storm::StormVersion::versionMajor; }, "Storm major version.")
  13. .def_property_readonly_static("minor", [](py::object /* self */){ return storm::StormVersion::versionMinor; }, "Storm minor version.")
  14. .def_property_readonly_static("patch", [](py::object /* self */){ return storm::StormVersion::versionPatch; }, "Storm patch version.")
  15. .def_property_readonly_static("development", [](py::object /* self */){ return storm::StormVersion::versionDev; }, "Flag if Storm is development version.")
  16. .def_property_readonly_static("short", [](py::object /* self */){ return storm::StormVersion::shortVersionString(); }, "Storm version in short representation.")
  17. .def_property_readonly_static("long", [](py::object /* self */){ return storm::StormVersion::longVersionString(); }, "Storm version in long representation.")
  18. .def_property_readonly_static("build_info", [](py::object /* self */){ return storm::StormVersion::buildInfo(); }, "Build info for Storm.")
  19. ;
  20. }