summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-11-11 12:22:41 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-02-25 12:16:43 +0800
commitf8032b7a0fd19eb7c879bdfa0ecfef95d7785f94 (patch)
treecfe18b4920865fb098cf7f463d765e1fb6b43fa5
parent4c98280e02c4b815d80f8fecc4393f183a61bf69 (diff)
downloadgtk-doc-win-no-msys.tar.gz
gtkdoc_uninstalled.py.in: Avoid unicode error on Windowswin-no-msys
On Windows, if the gtk-doc sources were checked out or extracted or built under the user's home directory, in c:\Users\<username>, the script will fail due to a SyntaxError (unicode error) as Python interprets '\U' to be a prefix to an unicode literal. Fix this by prepending the strings that indicate the sourcedir and builddir with an 'r', meaning that a raw string is being used. Please note that the installed scripts are not affected as they use forward slashes for the paths.
-rw-r--r--gtkdoc_uninstalled.py.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtkdoc_uninstalled.py.in b/gtkdoc_uninstalled.py.in
index 8febefd..c5ad625 100644
--- a/gtkdoc_uninstalled.py.in
+++ b/gtkdoc_uninstalled.py.in
@@ -1,5 +1,5 @@
import sys
-sourcedir = "@sourcedir@"
-builddir = "@builddir@"
+sourcedir = r"@sourcedir@"
+builddir = r"@builddir@"
sys.path.append(sourcedir)