From 7c45f3d4725d9debf63ee935069f3a26e60dc4e9 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 20 Apr 2016 19:04:01 -0700 Subject: [PATCH] unsplit wormhole_server step 2: edit files --- setup.py | 6 +++--- src/wormhole/server/__init__.py | 2 -- src/wormhole/server/cli_args.py | 2 +- src/wormhole/server/cmd_usage.py | 2 +- src/wormhole/server/database.py | 2 +- src/wormhole/server/server.py | 2 +- src/wormhole/test/common.py | 2 +- src/wormhole/test/test_server.py | 2 +- 8 files changed, 9 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index bed9edf..4a01c6a 100644 --- a/setup.py +++ b/setup.py @@ -17,13 +17,13 @@ setup(name="magic-wormhole", "wormhole.blocking", "txwormhole", "wormhole.cli", - "wormhole_server", + "wormhole.server", "wormhole.test", ], - package_data={"wormhole_server": ["db-schemas/*.sql"]}, + package_data={"wormhole.server": ["db-schemas/*.sql"]}, entry_points={"console_scripts": ["wormhole = wormhole.cli.runner:entry", - "wormhole-server = wormhole_server.runner:entry", + "wormhole-server = wormhole.server.runner:entry", ]}, install_requires=["spake2==0.3", "pynacl", "requests", "argparse", "six", "twisted >= 16.1.0", "hkdf", diff --git a/src/wormhole/server/__init__.py b/src/wormhole/server/__init__.py index 0ff5129..e69de29 100644 --- a/src/wormhole/server/__init__.py +++ b/src/wormhole/server/__init__.py @@ -1,2 +0,0 @@ -from wormhole import __version__ -__version__ # hush pyflakes diff --git a/src/wormhole/server/cli_args.py b/src/wormhole/server/cli_args.py index f37946a..4bc87e1 100644 --- a/src/wormhole/server/cli_args.py +++ b/src/wormhole/server/cli_args.py @@ -1,6 +1,6 @@ import argparse from textwrap import dedent -from wormhole import __version__ +from .. import __version__ parser = argparse.ArgumentParser( usage="wormhole-server SUBCOMMAND (subcommand-options)", diff --git a/src/wormhole/server/cmd_usage.py b/src/wormhole/server/cmd_usage.py index e021206..6f46b7e 100644 --- a/src/wormhole/server/cmd_usage.py +++ b/src/wormhole/server/cmd_usage.py @@ -2,7 +2,7 @@ from __future__ import print_function import os, time from collections import defaultdict from .database import get_db -from wormhole.errors import UsageError +from ..errors import UsageError def abbrev(t): if t is None: diff --git a/src/wormhole/server/database.py b/src/wormhole/server/database.py index 66ed1d0..d8edee0 100644 --- a/src/wormhole/server/database.py +++ b/src/wormhole/server/database.py @@ -6,7 +6,7 @@ class DBError(Exception): pass def get_schema(version): - schema_bytes = resource_string("wormhole_server", + schema_bytes = resource_string("wormhole.server", "db-schemas/v%d.sql" % version) return schema_bytes.decode("utf-8") diff --git a/src/wormhole/server/server.py b/src/wormhole/server/server.py index 7a40012..166a6ba 100644 --- a/src/wormhole/server/server.py +++ b/src/wormhole/server/server.py @@ -5,7 +5,7 @@ from twisted.application import service from twisted.web import server, static, resource from autobahn.twisted.resource import WebSocketResource from .endpoint_service import ServerEndpointService -from wormhole import __version__ +from .. import __version__ from .database import get_db from .rendezvous import Rendezvous from .rendezvous_web import WebRendezvous diff --git a/src/wormhole/test/common.py b/src/wormhole/test/common.py index 5436fdb..bffa9c5 100644 --- a/src/wormhole/test/common.py +++ b/src/wormhole/test/common.py @@ -2,7 +2,7 @@ from twisted.application import service from twisted.internet import reactor, defer from twisted.python import log from txwormhole.transit import allocate_tcp_port -from wormhole_server.server import RelayServer +from ..server.server import RelayServer from .. import __version__ class ServerBase: diff --git a/src/wormhole/test/test_server.py b/src/wormhole/test/test_server.py index 1d7da4a..bd5f47f 100644 --- a/src/wormhole/test/test_server.py +++ b/src/wormhole/test/test_server.py @@ -12,7 +12,7 @@ from twisted.web.client import getPage, Agent, readBody from autobahn.twisted import websocket from .. import __version__ from .common import ServerBase -from wormhole_server import rendezvous, transit_server +from ..server import rendezvous, transit_server from txwormhole.eventsource import EventSource class Reachable(ServerBase, unittest.TestCase):