From 27506e3ba1392778afb06fa3c6b20c43827cc8a2 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 26 Feb 2018 20:29:13 +0100 Subject: [PATCH] PyFalkon: Add __version__ and __version_info__ --- src/plugins/PyFalkon/pyfalkon.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/PyFalkon/pyfalkon.xml b/src/plugins/PyFalkon/pyfalkon.xml index 3f6508c42..c076669df 100644 --- a/src/plugins/PyFalkon/pyfalkon.xml +++ b/src/plugins/PyFalkon/pyfalkon.xml @@ -201,6 +201,15 @@ + + QList<QByteArray> version = QByteArray(Qz::VERSION).split('.'); + PyObject *pyFalkonVersion = PyTuple_New(3); + for (int i = 0; i < 3; ++i) + PyTuple_SET_ITEM(pyFalkonVersion, i, PyInt_FromLong(version[i].toInt())); + PyModule_AddObject(module, "__version_info__", pyFalkonVersion); + PyModule_AddStringConstant(module, "__version__", Qz::VERSION); + +