unsplit wormhole_server step 2: edit files

This commit is contained in:
Brian Warner 2016-04-20 19:04:01 -07:00
parent ec13404fca
commit 7c45f3d472
8 changed files with 9 additions and 11 deletions

View File

@ -17,13 +17,13 @@ setup(name="magic-wormhole",
"wormhole.blocking", "wormhole.blocking",
"txwormhole", "txwormhole",
"wormhole.cli", "wormhole.cli",
"wormhole_server", "wormhole.server",
"wormhole.test", "wormhole.test",
], ],
package_data={"wormhole_server": ["db-schemas/*.sql"]}, package_data={"wormhole.server": ["db-schemas/*.sql"]},
entry_points={"console_scripts": entry_points={"console_scripts":
["wormhole = wormhole.cli.runner:entry", ["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", install_requires=["spake2==0.3", "pynacl", "requests", "argparse",
"six", "twisted >= 16.1.0", "hkdf", "six", "twisted >= 16.1.0", "hkdf",

View File

@ -1,2 +0,0 @@
from wormhole import __version__
__version__ # hush pyflakes

View File

@ -1,6 +1,6 @@
import argparse import argparse
from textwrap import dedent from textwrap import dedent
from wormhole import __version__ from .. import __version__
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
usage="wormhole-server SUBCOMMAND (subcommand-options)", usage="wormhole-server SUBCOMMAND (subcommand-options)",

View File

@ -2,7 +2,7 @@ from __future__ import print_function
import os, time import os, time
from collections import defaultdict from collections import defaultdict
from .database import get_db from .database import get_db
from wormhole.errors import UsageError from ..errors import UsageError
def abbrev(t): def abbrev(t):
if t is None: if t is None:

View File

@ -6,7 +6,7 @@ class DBError(Exception):
pass pass
def get_schema(version): def get_schema(version):
schema_bytes = resource_string("wormhole_server", schema_bytes = resource_string("wormhole.server",
"db-schemas/v%d.sql" % version) "db-schemas/v%d.sql" % version)
return schema_bytes.decode("utf-8") return schema_bytes.decode("utf-8")

View File

@ -5,7 +5,7 @@ from twisted.application import service
from twisted.web import server, static, resource from twisted.web import server, static, resource
from autobahn.twisted.resource import WebSocketResource from autobahn.twisted.resource import WebSocketResource
from .endpoint_service import ServerEndpointService from .endpoint_service import ServerEndpointService
from wormhole import __version__ from .. import __version__
from .database import get_db from .database import get_db
from .rendezvous import Rendezvous from .rendezvous import Rendezvous
from .rendezvous_web import WebRendezvous from .rendezvous_web import WebRendezvous

View File

@ -2,7 +2,7 @@ from twisted.application import service
from twisted.internet import reactor, defer from twisted.internet import reactor, defer
from twisted.python import log from twisted.python import log
from txwormhole.transit import allocate_tcp_port from txwormhole.transit import allocate_tcp_port
from wormhole_server.server import RelayServer from ..server.server import RelayServer
from .. import __version__ from .. import __version__
class ServerBase: class ServerBase:

View File

@ -12,7 +12,7 @@ from twisted.web.client import getPage, Agent, readBody
from autobahn.twisted import websocket from autobahn.twisted import websocket
from .. import __version__ from .. import __version__
from .common import ServerBase from .common import ServerBase
from wormhole_server import rendezvous, transit_server from ..server import rendezvous, transit_server
from txwormhole.eventsource import EventSource from txwormhole.eventsource import EventSource
class Reachable(ServerBase, unittest.TestCase): class Reachable(ServerBase, unittest.TestCase):