diff options
author | Florian Bruhin <git@the-compiler.org> | 2015-06-19 06:37:12 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2015-06-19 07:35:01 +0200 |
commit | 425a6d33cfb558d3de7c58aebc7de265e89c2685 (patch) | |
tree | d04e7318a158f07ff1baab5a7cefc4b238e761e9 | |
parent | 2f59abaf1371a98f0462b8cd73cd1acc690c2f79 (diff) | |
download | qutebrowser-425a6d33cfb558d3de7c58aebc7de265e89c2685.tar.gz qutebrowser-425a6d33cfb558d3de7c58aebc7de265e89c2685.zip |
Add __name__ == '__main__' block in freeze.py.
freeze.py now gets imported from freeze_tests.py, and shouldn't run its own
setup in that case.
-rwxr-xr-x | scripts/freeze.py | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/scripts/freeze.py b/scripts/freeze.py index f2b979036..888127d5b 100755 --- a/scripts/freeze.py +++ b/scripts/freeze.py @@ -94,19 +94,21 @@ executable = cx.Executable('qutebrowser/__main__.py', base=base, icon=os.path.join(BASEDIR, 'icons', 'qutebrowser.ico')) -try: - setupcommon.write_git_file() - cx.setup( - executables=[executable], - options={ - 'build_exe': build_exe_options, - 'bdist_msi': bdist_msi_options, - 'bdist_mac': bdist_mac_options, - 'bdist_dmg': bdist_dmg_options, - }, - **setupcommon.setupdata - ) -finally: - path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') - if os.path.exists(path): - os.remove(path) + +if __name__ == '__main__': + try: + setupcommon.write_git_file() + cx.setup( + executables=[executable], + options={ + 'build_exe': build_exe_options, + 'bdist_msi': bdist_msi_options, + 'bdist_mac': bdist_mac_options, + 'bdist_dmg': bdist_dmg_options, + }, + **setupcommon.setupdata + ) + finally: + path = os.path.join(BASEDIR, 'qutebrowser', 'git-commit-id') + if os.path.exists(path): + os.remove(path) |