aboutsummaryrefslogtreecommitdiffstats
path: root/tools/snippets_translate/snippets_translate.pyproject
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2021-01-05 01:10:55 +0100
committerCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2021-03-18 11:38:07 +0100
commit1c65d71c468f2166ab20a867011a6d217a5f3ec1 (patch)
tree3c9efa140a71a2e63276dddefc2f8fc3523dea2e /tools/snippets_translate/snippets_translate.pyproject
parentd97aedf37809c479ab409c4247b60c0cfcef35d6 (diff)
Long live snippets_translate!
This is not a C++ -> Python translator, but a line-by-line conversion tool. This scripts requires two arguments to identify a Qt and PySide directory including the sources. There is a set of file extensions that are currently omitted from the process, and for the ones that will be copied, there will be messages related if the file already exists or if it's new. If you use the '-v' option, you will see the C++ code and the converted Python code, so it's easy to check for issues and missing features. Also, two command line options were added to have a different behavior '--filter' to include a word to filter the full paths of all the snippets found (for example the name of a directory), and '-s/--single' to translate only a specific C++ file to be translated. Including test cases for transformations related to the C++ snippets. Fixes: PYSIDE-691 Pick-to: 6.0 Change-Id: I208e3a9139c7e84fe369a7c2ea93af240d83fa83 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'tools/snippets_translate/snippets_translate.pyproject')
-rw-r--r--tools/snippets_translate/snippets_translate.pyproject3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/snippets_translate/snippets_translate.pyproject b/tools/snippets_translate/snippets_translate.pyproject
new file mode 100644
index 000000000..8016eb637
--- /dev/null
+++ b/tools/snippets_translate/snippets_translate.pyproject
@@ -0,0 +1,3 @@
+{
+ "files": ["main.py", "converter.py", "handlers.py", "tests/test_converter.py"]
+}