From: "Dr. Tobias Quathamer" <toddy@debian.org>
Date: Sat, 5 Mar 2022 16:21:40 +0100
Subject: Use the temporary directory instead of the home directory for
 package building

---
 src/classes/info.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/classes/info.py b/src/classes/info.py
index ba64b43..bbf4b30 100644
--- a/src/classes/info.py
+++ b/src/classes/info.py
@@ -48,6 +48,13 @@ EXPORT_PRESETS_PATH = os.path.join(PATH, "presets")
 
 # User paths
 HOME_PATH = os.path.join(os.path.expanduser("~"))
+# If the home directory does not exist, use the
+# temporay directory. This is needed during the
+# package build, otherwise the sphinx docs cannot
+# be bult.
+if not os.path.exists(HOME_PATH.encode("UTF-8")):
+    import tempfile
+    HOME_PATH = tempfile.gettempdir()
 USER_PATH = os.path.join(HOME_PATH, ".openshot_qt")
 BACKUP_PATH = os.path.join(USER_PATH)
 RECOVERY_PATH = os.path.join(USER_PATH, "recovery")
