diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..db171b9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "shared_lib"] + path = shared_lib + url = https://git.rose-ash.com/coop/shared.git diff --git a/app.py b/app.py index f14e44e..14fd995 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,7 @@ from __future__ import annotations +import path_setup # noqa: F401 # adds shared_lib to sys.path + from quart import g from shared.factory import create_base_app diff --git a/path_setup.py b/path_setup.py new file mode 100644 index 0000000..1d4c9ab --- /dev/null +++ b/path_setup.py @@ -0,0 +1,7 @@ +import sys +import os + +# Add the shared library submodule to the Python path +_shared = os.path.join(os.path.dirname(os.path.abspath(__file__)), "shared_lib") +if _shared not in sys.path: + sys.path.insert(0, _shared) diff --git a/shared_lib b/shared_lib new file mode 160000 index 0000000..668d9c7 --- /dev/null +++ b/shared_lib @@ -0,0 +1 @@ +Subproject commit 668d9c7df8f3426286abff044c30dc519a43673e