From 151a260960ff3894c629e3e95e3f555addeec1bb Mon Sep 17 00:00:00 2001
From: Ankith <itsankith26@gmail.com>
Date: Sun, 4 Aug 2024 22:10:58 +0530
Subject: [PATCH] add auto-import logic to elasticapp

---
 backend/src/__init__.py | 7 +++++++
 backend/src/meson.build | 6 ++++++
 2 files changed, 13 insertions(+)
 create mode 100644 backend/src/__init__.py

diff --git a/backend/src/__init__.py b/backend/src/__init__.py
new file mode 100644
index 000000000..6d5236145
--- /dev/null
+++ b/backend/src/__init__.py
@@ -0,0 +1,7 @@
+
+# import submodules so that they can be easily accessed
+import elasticapp._linalg
+import elasticapp._rotations
+import elasticapp._PyTags
+import elasticapp._PyArrays
+import elasticapp._PyCosseratRods
diff --git a/backend/src/meson.build b/backend/src/meson.build
index 0c8fa76df..8b1e6290c 100644
--- a/backend/src/meson.build
+++ b/backend/src/meson.build
@@ -1,3 +1,9 @@
+# first bundle all pure-python files
+python_sources = files(
+    '__init__.py',
+)
+py.install_sources(python_sources, subdir: package)
+
 example_1 = py.extension_module(
     'example_1',
     sources: ['example_1.cpp'],