We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43249c7 commit 8b1e28bCopy full SHA for 8b1e28b
mozart/__init__.py
@@ -85,7 +85,12 @@ def resource_not_found(e):
85
app.wsgi_app = ReverseProxied(app.wsgi_app)
86
87
# Only load config if it exists (allows imports without runtime environment)
88
-config_path = os.path.join(os.path.dirname(__file__), "..", "settings.cfg")
+# Priority: 1) Runtime location (PyPI installs), 2) Package location (editable installs)
89
+config_path = os.path.expanduser("~/mozart/etc/settings.cfg")
90
+if not os.path.exists(config_path):
91
+ # Fallback to package-relative location for editable installs
92
+ config_path = os.path.join(os.path.dirname(__file__), "..", "settings.cfg")
93
+
94
if os.path.exists(config_path):
95
app.config.from_pyfile(config_path)
96
0 commit comments