diff --git a/my_project_name/__init__.py b/my_project_name/__init__.py new file mode 100644 index 0000000..186ec26 --- /dev/null +++ b/my_project_name/__init__.py @@ -0,0 +1,8 @@ +import sys + +# Check that we're not running on an unsupported Python version. +if sys.version_info < (3, 5): + print("matrix_reminder_bot requires Python 3.5 or above.") + sys.exit(1) + +__version__ = "0.0.1" diff --git a/bot_commands.py b/my_project_name/bot_commands.py similarity index 97% rename from bot_commands.py rename to my_project_name/bot_commands.py index 6522dbc..576bd8b 100644 --- a/bot_commands.py +++ b/my_project_name/bot_commands.py @@ -1,4 +1,4 @@ -from chat_functions import send_text_to_room +from my_project_name.chat_functions import send_text_to_room class Command(object): diff --git a/callbacks.py b/my_project_name/callbacks.py similarity index 95% rename from callbacks.py rename to my_project_name/callbacks.py index c26ddc4..fcc7a64 100644 --- a/callbacks.py +++ b/my_project_name/callbacks.py @@ -1,11 +1,8 @@ -from chat_functions import ( - send_text_to_room, -) -from bot_commands import Command +from my_project_name.bot_commands import Command from nio import ( JoinError, ) -from message_responses import Message +from my_project_name.message_responses import Message import logging logger = logging.getLogger(__name__) diff --git a/chat_functions.py b/my_project_name/chat_functions.py similarity index 100% rename from chat_functions.py rename to my_project_name/chat_functions.py diff --git a/config.py b/my_project_name/config.py similarity index 98% rename from config.py rename to my_project_name/config.py index b72b3ed..f55b7b0 100644 --- a/config.py +++ b/my_project_name/config.py @@ -4,7 +4,7 @@ import os import yaml import sys from typing import List, Any -from errors import ConfigError +from my_project_name.errors import ConfigError logger = logging.getLogger() diff --git a/errors.py b/my_project_name/errors.py similarity index 100% rename from errors.py rename to my_project_name/errors.py diff --git a/main.py b/my_project_name/main.py similarity index 95% rename from main.py rename to my_project_name/main.py index 19b3cfa..c29ec97 100644 --- a/main.py +++ b/my_project_name/main.py @@ -16,9 +16,9 @@ from aiohttp import ( ServerDisconnectedError, ClientConnectionError ) -from callbacks import Callbacks -from config import Config -from storage import Storage +from my_project_name.callbacks import Callbacks +from my_project_name.config import Config +from my_project_name.storage import Storage logger = logging.getLogger(__name__) diff --git a/message_responses.py b/my_project_name/message_responses.py similarity index 94% rename from message_responses.py rename to my_project_name/message_responses.py index 744bcb3..d4beab7 100644 --- a/message_responses.py +++ b/my_project_name/message_responses.py @@ -1,4 +1,4 @@ -from chat_functions import send_text_to_room +from my_project_name.chat_functions import send_text_to_room import logging logger = logging.getLogger(__name__) diff --git a/storage.py b/my_project_name/storage.py similarity index 100% rename from storage.py rename to my_project_name/storage.py