Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
call('pyrcc5 {} -o {}'.format(rc_file, py_file), shell=True)
@command
def locale():
for pro_file in glob('*.pro'):
call('pylupdate5 -translate-function _tr {}'.format(pro_file), shell=True)
for ts_file in glob(os.path.join(LOCALE_SRCPATH, '*.ts')):
dst_file = os.path.join(LOCALE_DSTPATH, os.path.splitext(os.path.split(ts_file)[1])[0] + '.qm')
call('lrelease {} -qm {}'.format(ts_file, dst_file), shell=True)
if __name__ == '__main__':
project_dir = os.path.dirname(__file__)
fbs.cmdline.main(project_dir)
def _main():
"""
Main entry point for the `fbs` command line script.
We init logging here instead of in fbs.cmdline.main(...) because the latter
can be called by projects using fbs, and it's bad practice for libraries to
configure logging. See eg. https://stackoverflow.com/a/26087972/1839209.
"""
_init_logging()
fbs.cmdline.main()