From dc7c989834cc5a8e563e734f5b2a120d7395b920 Mon Sep 17 00:00:00 2001 From: giles Date: Mon, 9 Feb 2026 23:41:50 +0000 Subject: [PATCH] feat: add shared library as git submodule Co-Authored-By: Claude Opus 4.6 --- .gitmodules | 3 +++ app.py | 1 + path_setup.py | 7 +++++++ shared_lib | 1 + 4 files changed, 12 insertions(+) create mode 100644 .gitmodules create mode 100644 path_setup.py create mode 160000 shared_lib 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 a5e8e78..5e53590 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,5 @@ from __future__ import annotations +import path_setup # noqa: F401 # adds shared_lib to sys.path from quart import g 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