systemd-python: add __version__ strings

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2013-05-08 21:08:14 -04:00
parent 6866780115
commit 5afbe712db
7 changed files with 31 additions and 10 deletions

View File

@@ -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;