diff --git a/rcon/__init__.py b/rcon/__init__.py index f420b56..b29a299 100644 --- a/rcon/__init__.py +++ b/rcon/__init__.py @@ -1,8 +1,6 @@ """RCON client library.""" -from rcon.async_rcon import rcon -from rcon.client import Client -from rcon.exceptions import RequestIdMismatch, WrongPassword +from rcon.source import RequestIdMismatch, WrongPassword, Client, rcon __all__ = ['RequestIdMismatch', 'WrongPassword', 'Client', 'rcon'] diff --git a/rcon/source/__init__.py b/rcon/source/__init__.py new file mode 100644 index 0000000..b58ae35 --- /dev/null +++ b/rcon/source/__init__.py @@ -0,0 +1,8 @@ +"""Source RCON implementation.""" + +from rcon.source.async_rcon import rcon +from rcon.source.client import Client +from rcon.source.exceptions import RequestIdMismatch, WrongPassword + + +__all__ = ['RequestIdMismatch', 'WrongPassword', 'Client', 'rcon'] diff --git a/rcon/async_rcon.py b/rcon/source/async_rcon.py similarity index 100% rename from rcon/async_rcon.py rename to rcon/source/async_rcon.py diff --git a/rcon/client.py b/rcon/source/client.py similarity index 100% rename from rcon/client.py rename to rcon/source/client.py diff --git a/rcon/config.py b/rcon/source/config.py similarity index 100% rename from rcon/config.py rename to rcon/source/config.py diff --git a/rcon/console.py b/rcon/source/console.py similarity index 100% rename from rcon/console.py rename to rcon/source/console.py diff --git a/rcon/errorhandler.py b/rcon/source/errorhandler.py similarity index 100% rename from rcon/errorhandler.py rename to rcon/source/errorhandler.py diff --git a/rcon/exceptions.py b/rcon/source/exceptions.py similarity index 100% rename from rcon/exceptions.py rename to rcon/source/exceptions.py diff --git a/rcon/gui.py b/rcon/source/gui.py similarity index 100% rename from rcon/gui.py rename to rcon/source/gui.py diff --git a/rcon/proto.py b/rcon/source/proto.py similarity index 100% rename from rcon/proto.py rename to rcon/source/proto.py diff --git a/rcon/rconclt.py b/rcon/source/rconclt.py similarity index 97% rename from rcon/rconclt.py rename to rcon/source/rconclt.py index b1285c3..33cf179 100644 --- a/rcon/rconclt.py +++ b/rcon/source/rconclt.py @@ -6,7 +6,7 @@ from pathlib import Path from rcon.client import Client from rcon.config import CONFIG_FILES, LOG_FORMAT, from_args -from rcon.errorhandler import ErrorHandler +from rcon.source.errorhandler import ErrorHandler __all__ = ['main'] diff --git a/rcon/rconshell.py b/rcon/source/rconshell.py similarity index 93% rename from rcon/rconshell.py rename to rcon/source/rconshell.py index 9e4fac5..cf6ad28 100644 --- a/rcon/rconshell.py +++ b/rcon/source/rconshell.py @@ -6,8 +6,8 @@ from pathlib import Path from rcon.config import CONFIG_FILES, LOG_FORMAT, from_args from rcon.console import PROMPT, rconcmd -from rcon.errorhandler import ErrorHandler -from rcon.readline import CommandHistory +from rcon.source.errorhandler import ErrorHandler +from rcon.source.readline import CommandHistory __all__ = ['get_args', 'main'] diff --git a/rcon/readline.py b/rcon/source/readline.py similarity index 100% rename from rcon/readline.py rename to rcon/source/readline.py diff --git a/setup.py b/setup.py index c96fc3c..314ed62 100755 --- a/setup.py +++ b/setup.py @@ -14,9 +14,9 @@ setup( extras_require={'GUI': ['pygobject', 'pygtk']}, entry_points={ 'console_scripts': [ - 'rcongui = rcon.gui:main', - 'rconclt = rcon.rconclt:main', - 'rconshell = rcon.rconshell:main', + 'rcongui = rcon.source.gui:main', + 'rconclt = rcon.source.rconclt:main', + 'rconshell = rcon.source.rconshell:main', ], }, url='https://github.com/conqp/rcon', diff --git a/tests/test_config.py b/tests/test_config.py index f8be230..91aa44c 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -6,7 +6,7 @@ from string import printable from typing import Iterator, Tuple from unittest import TestCase -from rcon.config import Config +from rcon import Config def random_passwd() -> str: diff --git a/tests/test_proto.py b/tests/test_proto.py index 1e4df3b..d8b567a 100644 --- a/tests/test_proto.py +++ b/tests/test_proto.py @@ -5,7 +5,7 @@ from io import BytesIO from random import randint from unittest import TestCase -from rcon.proto import LittleEndianSignedInt32, Packet, Type, random_request_id +from rcon import LittleEndianSignedInt32, Packet, Type, random_request_id class TestRandomRequestId(TestCase):