diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-05-08 21:08:14 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-05-08 21:34:44 -0400 |
commit | 5afbe712db5cc68213a24c45396ffb43fab05e3e (patch) | |
tree | e811f7b05a129c8220b33d6dbef301ac9ffc7da0 /src/python-systemd/_daemon.c | |
parent | 6866780115a7c0af034f287d965f4bf6b02c1e6d (diff) |
systemd-python: add __version__ strings
Diffstat (limited to 'src/python-systemd/_daemon.c')
-rw-r--r-- | src/python-systemd/_daemon.c | 4 |
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; } |