Skip to content

Commit 2b17710

Browse files
committed
encode __version__ into module
1 parent e51e11b commit 2b17710

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/pythonapi/PythonCommands.cc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ extern "C" void DLL_PUBLIC DEVSIM_MODULE_INIT()
454454

455455
PyModule_AddObject(module, "error", st->error);
456456

457+
//https://www.python.org/dev/peps/pep-0396/
458+
PyDict_SetItemString(PyModule_GetDict(module), "__version__", PyUnicode_FromString(DEVSIM_VERSION_STRING));
459+
457460
devsim_initialization();
458461

459462
#if PY_MAJOR_VERSION >=3

0 commit comments

Comments
 (0)