summaryrefslogtreecommitdiff
path: root/src/python-systemd/_reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/python-systemd/_reader.c')
-rw-r--r--src/python-systemd/_reader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index b836597746..50ad889201 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -30,6 +30,7 @@
#include "pyutil.h"
#include "macro.h"
#include "util.h"
+#include "build.h"
typedef struct {
PyObject_HEAD
@@ -1126,7 +1127,8 @@ init_reader(void)
PyModule_AddIntConstant(m, "INVALIDATE", SD_JOURNAL_INVALIDATE) ||
PyModule_AddIntConstant(m, "LOCAL_ONLY", SD_JOURNAL_LOCAL_ONLY) ||
PyModule_AddIntConstant(m, "RUNTIME_ONLY", SD_JOURNAL_RUNTIME_ONLY) ||
- PyModule_AddIntConstant(m, "SYSTEM_ONLY", SD_JOURNAL_SYSTEM_ONLY)) {
+ PyModule_AddIntConstant(m, "SYSTEM_ONLY", SD_JOURNAL_SYSTEM_ONLY) ||
+ PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION)) {
#if PY_MAJOR_VERSION >= 3
Py_DECREF(m);
return NULL;