diff options
-rw-r--r-- | sources/pyside2/tests/registry/existence_test.py | 7 | ||||
-rw-r--r-- | sources/pyside2/tests/registry/init_platform.py | 1 | ||||
-rw-r--r-- | sources/shiboken2/libshiboken/signature_doc.rst | 11 |
3 files changed, 19 insertions, 0 deletions
diff --git a/sources/pyside2/tests/registry/existence_test.py b/sources/pyside2/tests/registry/existence_test.py index 0313bd9f8..6db88a818 100644 --- a/sources/pyside2/tests/registry/existence_test.py +++ b/sources/pyside2/tests/registry/existence_test.py @@ -100,6 +100,13 @@ except SyntaxError: print("*** not a python file, removed:", shortpath) os.unlink(effectiveRefPath) have_refmodule = False +except NameError as e: + if "recreate" in e.args[0]: + print("*** explicit request to recreate:", shortpath) + else: + print("*** unexpected NameError:", e, "- creating", shortpath) + os.unlink(effectiveRefPath) + have_refmodule = False dict_name = "sig_dict" if have_refmodule and not hasattr(sig_exists, dict_name): print("*** wrong module without '{dict_name}', removed:" diff --git a/sources/pyside2/tests/registry/init_platform.py b/sources/pyside2/tests/registry/init_platform.py index 61964a3c1..a690a3120 100644 --- a/sources/pyside2/tests/registry/init_platform.py +++ b/sources/pyside2/tests/registry/init_platform.py @@ -219,6 +219,7 @@ def generate_all(): lines = f.readlines() license_line = next((lno for lno, line in enumerate(lines) if "$QT_END_LICENSE$" in line)) + fmt.print("#recreate # uncomment this to enforce generation") fmt.print("".join(lines[:license_line + 3])) version = sys.version.replace('\n', ' ') build = qt_build() diff --git a/sources/shiboken2/libshiboken/signature_doc.rst b/sources/shiboken2/libshiboken/signature_doc.rst index a984de4ce..cb9041d0c 100644 --- a/sources/shiboken2/libshiboken/signature_doc.rst +++ b/sources/shiboken2/libshiboken/signature_doc.rst @@ -265,6 +265,17 @@ we can now capture the error output of COIN and check the generated module in. +Explicitly Enforcing Recreation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The former way to regenerate the registry files was to remove the files +and check that in. This has the desired effect, but creates huge deltas. +As a more efficient way, we have prepared a comment in the first line +that contains the word "recreate". +By uncommenting this line, a NameError is triggered, which has the same +effect. + + init_platform.py ~~~~~~~~~~~~~~~~ |