Make the server runnable with python3 -m ankisyncd

This commit is contained in:
flan 2018-08-20 14:42:40 +02:00
parent 82d7126425
commit c3024ba396

11
ankisyncd/__main__.py Normal file
View File

@ -0,0 +1,11 @@
import sys
if __package__ is None and not hasattr(sys, "frozen"):
import os.path
path = os.path.realpath(os.path.abspath(__file__))
sys.path.insert(0, os.path.dirname(os.path.dirname(path)))
import ankisyncd.sync_app
if __name__ == "__main__":
ankisyncd.sync_app.main()