Skip to content

Commit

Permalink
update: add main
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Jul 17, 2024
1 parent a6776e2 commit 52e34ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/py/mat3ra/utils/wheel_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def inform_user(port):
print(f"import micropip\nawait micropip.install('{url_str}')\n")


if __name__ == "__main__":
def main():
parser = argparse.ArgumentParser(description="Python wheel server.")
parser.add_argument("--port", type=int, default=8080, help="Port to run the server on.")
parser.add_argument("--dir", type=str, default="./dist", help="Directory to serve.")
Expand All @@ -60,3 +60,7 @@ def inform_user(port):
print(f"Serving at http://{bind_addr}:{port}")
inform_user(port)
httpd.serve_forever()


if __name__ == "__main__":
main()

0 comments on commit 52e34ef

Please sign in to comment.