insert package dir to sys.path to simplify import
3 files changed, 19 insertions(+), 13 deletions(-)

M wormhole/handler.py
M wormhole/proxy.py
M wormhole/server.py
M wormhole/handler.py +3 -3
@@ 1,8 1,8 @@ 
 import asyncio
 from socket import TCP_NODELAY
-from wormhole.logger import get_logger
-from wormhole.tools import get_content_length
-from wormhole.tools import get_host_and_port
+from logger import get_logger
+from tools import get_content_length
+from tools import get_host_and_port
 
 
 async def relay_stream(stream_reader, stream_writer,

          
M wormhole/proxy.py +10 -4
@@ 5,12 5,18 @@ if sys.version_info < (3, 5):
     print('Error: You need python 3.5.0 or above.')
     exit(1)
 
+import os
+from pathlib import Path
+sys.path.insert(
+    0, Path(os.path.realpath(__file__)).parent.as_posix()
+)
+
 import asyncio
 from argparse import ArgumentParser
-from wormhole.license import LICENSE
-from wormhole.logger import get_logger
-from wormhole.server import start_wormhole_server
-from wormhole.version import VERSION
+from license import LICENSE
+from logger import get_logger
+from server import start_wormhole_server
+from version import VERSION
 
 
 def main():

          
M wormhole/server.py +6 -6
@@ 2,12 2,12 @@ import asyncio
 import functools
 import sys
 from time import time
-from wormhole.authentication import get_ident
-from wormhole.authentication import verify
-from wormhole.handler import process_http
-from wormhole.handler import process_https
-from wormhole.handler import process_request
-from wormhole.logger import get_logger
+from authentication import get_ident
+from authentication import verify
+from handler import process_http
+from handler import process_https
+from handler import process_request
+from logger import get_logger
 
 
 MAX_RETRY = 3