X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fpython-systemd%2F_reader.c;h=50ad8892015e33ee0d034ce6d0117baad3ee5cfd;hb=5afbe712db5cc68213a24c45396ffb43fab05e3e;hp=b8365977466f3f19d5c31a22d6d89a29d323432a;hpb=7f876bc4281145e6c74e98de07c6648a5b51ed90;p=elogind.git diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c index b83659774..50ad88920 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;