summaryrefslogtreecommitdiff
path: root/src/python-systemd/_reader.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-05-08 21:08:14 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-05-08 21:34:44 -0400
commit5afbe712db5cc68213a24c45396ffb43fab05e3e (patch)
treee811f7b05a129c8220b33d6dbef301ac9ffc7da0 /src/python-systemd/_reader.c
parent6866780115a7c0af034f287d965f4bf6b02c1e6d (diff)
systemd-python: add __version__ strings
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;