Skip to content
Snippets Groups Projects
Commit beba53b0 authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Moved mkdistfile main code into main() function

This prevents the variables used there from leaking into the module-global
scope.
parent 4f7c6318
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,8 @@ def create_zip(prefix: str, dist_dir: Path):
shutil.rmtree(str(to_zip))
print('Created', zip_path)
if __name__ == '__main__':
def main():
print('Building installation directory')
sys.argv = ['pyinstaller', 'flamenco-worker.spec', '--log-level', 'WARN']
run()
......@@ -61,3 +62,7 @@ if __name__ == '__main__':
create_zip(prefix, dist_dir)
else:
create_tar(prefix, dist_dir)
if __name__ == '__main__':
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment