aboutsummaryrefslogtreecommitdiff
path: root/tests/GenerateSipBindings/rules_SipTest.py
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-04-23 17:24:11 +0200
committerStephen Kelly <steveire@gmail.com>2016-10-31 15:38:08 +0000
commit64eb5f8e1320feb78c56ec0acb7399ee6085770d (patch)
tree6ced89f400b6f4208fb5ad2fbd8501a20f1751bd /tests/GenerateSipBindings/rules_SipTest.py
parente052fc95db845a5e0f0b450c8fbffb35f0bbc638 (diff)
downloadextra-cmake-modules-64eb5f8e1320feb78c56ec0acb7399ee6085770d.tar.gz
extra-cmake-modules-64eb5f8e1320feb78c56ec0acb7399ee6085770d.tar.bz2
Add the PythonModuleGeneration module
This can be used by KF5 libraries to generate python 2 and 3 bindings.
Diffstat (limited to 'tests/GenerateSipBindings/rules_SipTest.py')
-rw-r--r--tests/GenerateSipBindings/rules_SipTest.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/GenerateSipBindings/rules_SipTest.py b/tests/GenerateSipBindings/rules_SipTest.py
new file mode 100644
index 00000000..e0cd2b9e
--- /dev/null
+++ b/tests/GenerateSipBindings/rules_SipTest.py
@@ -0,0 +1,17 @@
+
+import os, sys
+
+import rules_engine
+sys.path.append(os.path.dirname(os.path.dirname(rules_engine.__file__)))
+import Qt5Ruleset
+
+def local_function_rules():
+ return [
+ ["MyObject", "fwdDecl", ".*", ".*", ".*", rules_engine.function_discard],
+ ["MyObject", "fwdDeclRef", ".*", ".*", ".*", rules_engine.function_discard],
+ ]
+
+class RuleSet(Qt5Ruleset.RuleSet):
+ def __init__(self):
+ Qt5Ruleset.RuleSet.__init__(self)
+ self._fn_db = rules_engine.FunctionRuleDb(lambda: local_function_rules() + Qt5Ruleset.function_rules())