[gtk-doc/win-no-msys: 22/22] gtkdoc_uninstalled.py.in: Avoid unicode error on Windows




commit f8032b7a0fd19eb7c879bdfa0ecfef95d7785f94
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Nov 11 12:22:41 2020 +0800

    gtkdoc_uninstalled.py.in: Avoid unicode error on Windows
    
    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.

 gtkdoc_uninstalled.py.in | 4 ++--
 1 file 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]