summaryrefslogtreecommitdiff
path: root/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>2015-07-05 14:19:20 -0400
commit7b3e876ddef01e9f17ef56ea371074be2ee90139 (patch)
treea7b17831bb98c9cfc454b03a529a05024cdabe5d /systemd/_reader.c
parentcfcc1870673b08d67af2e6d2de94959fb5df8660 (diff)
downloadpython-systemd-7b3e876ddef01e9f17ef56ea371074be2ee90139.tar.gz
systemd-python: add __version__ strings
Diffstat (limited to 'systemd/_reader.c')
-rw-r--r--systemd/_reader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/systemd/_reader.c b/systemd/_reader.c
index b836597..50ad889 100644
--- a/systemd/_reader.c
+++ b/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;