summaryrefslogtreecommitdiff
path: root/src/python-systemd/_daemon.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/_daemon.c
parent6866780115a7c0af034f287d965f4bf6b02c1e6d (diff)
systemd-python: add __version__ strings
Diffstat (limited to 'src/python-systemd/_daemon.c')
-rw-r--r--src/python-systemd/_daemon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c
index ce2064935d..d3b4807368 100644
--- a/src/python-systemd/_daemon.c
+++ b/src/python-systemd/_daemon.c
@@ -291,6 +291,7 @@ PyMODINIT_FUNC init_daemon(void) {
return;
PyModule_AddIntConstant(m, "LISTEN_FDS_START", SD_LISTEN_FDS_START);
+ PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);
}
#else
@@ -310,7 +311,8 @@ PyMODINIT_FUNC PyInit__daemon(void) {
if (m == NULL)
return NULL;
- if (PyModule_AddIntConstant(m, "LISTEN_FDS_START", SD_LISTEN_FDS_START)) {
+ if (PyModule_AddIntConstant(m, "LISTEN_FDS_START", SD_LISTEN_FDS_START) ||
+ PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION)) {
Py_DECREF(m);
return NULL;
}