Browse Source

Move SourceRCON implementation into sub-package

pull/8/head
Richard Neumann 3 years ago
parent
commit
e1c8428345
  1. 4
      rcon/__init__.py
  2. 8
      rcon/source/__init__.py
  3. 0
      rcon/source/async_rcon.py
  4. 0
      rcon/source/client.py
  5. 0
      rcon/source/config.py
  6. 0
      rcon/source/console.py
  7. 0
      rcon/source/errorhandler.py
  8. 0
      rcon/source/exceptions.py
  9. 0
      rcon/source/gui.py
  10. 0
      rcon/source/proto.py
  11. 2
      rcon/source/rconclt.py
  12. 4
      rcon/source/rconshell.py
  13. 0
      rcon/source/readline.py
  14. 6
      setup.py
  15. 2
      tests/test_config.py
  16. 2
      tests/test_proto.py

4
rcon/__init__.py

@ -1,8 +1,6 @@
"""RCON client library.""" """RCON client library."""
from rcon.async_rcon import rcon from rcon.source import RequestIdMismatch, WrongPassword, Client, rcon
from rcon.client import Client
from rcon.exceptions import RequestIdMismatch, WrongPassword
__all__ = ['RequestIdMismatch', 'WrongPassword', 'Client', 'rcon'] __all__ = ['RequestIdMismatch', 'WrongPassword', 'Client', 'rcon']

8
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']

0
rcon/async_rcon.py → rcon/source/async_rcon.py

0
rcon/client.py → rcon/source/client.py

0
rcon/config.py → rcon/source/config.py

0
rcon/console.py → rcon/source/console.py

0
rcon/errorhandler.py → rcon/source/errorhandler.py

0
rcon/exceptions.py → rcon/source/exceptions.py

0
rcon/gui.py → rcon/source/gui.py

0
rcon/proto.py → rcon/source/proto.py

2
rcon/rconclt.py → rcon/source/rconclt.py

@ -6,7 +6,7 @@ from pathlib import Path
from rcon.client import Client from rcon.client import Client
from rcon.config import CONFIG_FILES, LOG_FORMAT, from_args from rcon.config import CONFIG_FILES, LOG_FORMAT, from_args
from rcon.errorhandler import ErrorHandler from rcon.source.errorhandler import ErrorHandler
__all__ = ['main'] __all__ = ['main']

4
rcon/rconshell.py → rcon/source/rconshell.py

@ -6,8 +6,8 @@ from pathlib import Path
from rcon.config import CONFIG_FILES, LOG_FORMAT, from_args from rcon.config import CONFIG_FILES, LOG_FORMAT, from_args
from rcon.console import PROMPT, rconcmd from rcon.console import PROMPT, rconcmd
from rcon.errorhandler import ErrorHandler from rcon.source.errorhandler import ErrorHandler
from rcon.readline import CommandHistory from rcon.source.readline import CommandHistory
__all__ = ['get_args', 'main'] __all__ = ['get_args', 'main']

0
rcon/readline.py → rcon/source/readline.py

6
setup.py

@ -14,9 +14,9 @@ setup(
extras_require={'GUI': ['pygobject', 'pygtk']}, extras_require={'GUI': ['pygobject', 'pygtk']},
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'rcongui = rcon.gui:main', 'rcongui = rcon.source.gui:main',
'rconclt = rcon.rconclt:main', 'rconclt = rcon.source.rconclt:main',
'rconshell = rcon.rconshell:main', 'rconshell = rcon.source.rconshell:main',
], ],
}, },
url='https://github.com/conqp/rcon', url='https://github.com/conqp/rcon',

2
tests/test_config.py

@ -6,7 +6,7 @@ from string import printable
from typing import Iterator, Tuple from typing import Iterator, Tuple
from unittest import TestCase from unittest import TestCase
from rcon.config import Config from rcon import Config
def random_passwd() -> str: def random_passwd() -> str:

2
tests/test_proto.py

@ -5,7 +5,7 @@ from io import BytesIO
from random import randint from random import randint
from unittest import TestCase 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): class TestRandomRequestId(TestCase):

Loading…
Cancel
Save