Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
parser.add_argument("--debug", action="store_true",
help=_("Enable debug output"))
+ # version
+ parser.add_argument("--version", action="version",
+ version="%%(prog)s %s" % location.__version__)
+
# lookup an IP address
lookup = subparsers.add_parser("lookup",
help=_("Lookup one or multiple IP addresses"),
Py_INCREF(&WriterType);
PyModule_AddObject(m, "Writer", (PyObject *)&WriterType);
+ // Add constants
+ PyObject* d = PyModule_GetDict(m);
+
+ // Version
+ PyDict_SetItemString(d, "__version__", PyUnicode_FromString(VERSION));
+
return m;
}