Subject: Use the temporary directory instead of the home directory for package building
From: "Dr. Tobias Quathamer" <toddy@debian.org>

Date: Sat, 28 Oct 2017 23:53:38 +0200


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

Index: openshot-qt-2.5.1/src/classes/info.py
===================================================================
--- openshot-qt-2.5.1.orig/src/classes/info.py
+++ openshot-qt-2.5.1/src/classes/info.py
@@ -49,6 +49,13 @@ EXPORT_PRESETS_PATH = os.path.join(PATH,
 
 # 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")
