Allow using an env var to force forms to be re-built

This commit is contained in:
Kovid Goyal 2022-01-09 18:30:26 +05:30
parent 65923491f1
commit 5e3244c65c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -42,7 +42,7 @@ def build_forms(srcdir, info=None, summary=False, check_for_migration=False):
# Ensure that people running from source have all their forms rebuilt for
# the qt5 migration
force_compile = False
force_compile = os.environ.get('CALIBRE_FORCE_BUILD_UI_FORMS', '') in ('1', 'yes', 'true')
if check_for_migration:
from calibre.gui2 import gprefs
force_compile = not gprefs.get(f'migrated_forms_to_qt{qt_major}', False)