From 1b31806423c8fec4040fed6d1009db016860b763 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 1 May 2018 20:37:51 -0400 Subject: rename inkstitch/ to lib/ You can't have a module and a package named the same thing. PyInstaller wants to import the main script as if it were a module, and this doesn't work unless there's no directory of the same name with a __init__.py in it. --- lib/utils/inkscape.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/utils/inkscape.py (limited to 'lib/utils/inkscape.py') diff --git a/lib/utils/inkscape.py b/lib/utils/inkscape.py new file mode 100644 index 00000000..2d0298bc --- /dev/null +++ b/lib/utils/inkscape.py @@ -0,0 +1,15 @@ +from os.path import realpath, expanduser, join as path_join +import sys + +def guess_inkscape_config_path(): + if getattr(sys, 'frozen', None): + path = realpath(path_join(sys._MEIPASS, "..", "..", "..")) + if sys.platform == "win32": + import win32api + + # This expands ugly things like EXTENS~1 + path = win32api.GetLongPathName(path) + else: + path = expanduser("~/.config/inkscape") + + return path -- cgit v1.2.3