diff --git a/contrib/clearOldCache.py b/contrib/clearOldCache.py index a7000e1..03650ce 100644 --- a/contrib/clearOldCache.py +++ b/contrib/clearOldCache.py @@ -18,7 +18,8 @@ import re import os.path # incantation to be able to import overviewer_core -sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) +if not hasattr(sys, "frozen"): + sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) from overviewer_core import world from overviewer import list_worlds diff --git a/contrib/findSigns.py b/contrib/findSigns.py index 2dbacd8..8961365 100644 --- a/contrib/findSigns.py +++ b/contrib/findSigns.py @@ -30,7 +30,8 @@ import os import cPickle # incantation to be able to import overviewer_core -sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) +if not hasattr(sys, "frozen"): + sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) from overviewer_core import nbt diff --git a/contrib/playerInspect.py b/contrib/playerInspect.py index cf12ee3..638e1b0 100644 --- a/contrib/playerInspect.py +++ b/contrib/playerInspect.py @@ -5,7 +5,8 @@ Very basic player.dat inspection script import sys, os # incantation to be able to import overviewer_core -sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) +if not hasattr(sys, "frozen"): + sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) from overviewer_core.nbt import load from overviewer_core import items diff --git a/contrib/rerenderBlocks.py b/contrib/rerenderBlocks.py index 7dde88d..56f6bcf 100644 --- a/contrib/rerenderBlocks.py +++ b/contrib/rerenderBlocks.py @@ -21,7 +21,8 @@ import sys,os import re # incantation to be able to import overviewer_core -sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) +if not hasattr(sys, "frozen"): + sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) from overviewer_core import nbt from overviewer_core import world diff --git a/contrib/validateRegionFile.py b/contrib/validateRegionFile.py index c723734..75b6a87 100644 --- a/contrib/validateRegionFile.py +++ b/contrib/validateRegionFile.py @@ -9,7 +9,8 @@ import os import sys # incantation to be able to import overviewer_core -sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) +if not hasattr(sys, "frozen"): + sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '..'))) from overviewer_core import nbt diff --git a/contribManager.py b/contribManager.py index 29737eb..00f3a09 100755 --- a/contribManager.py +++ b/contribManager.py @@ -8,7 +8,8 @@ import os.path import ast # incantation to be able to import overviewer_core -sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '.'))) +if not hasattr(sys, "frozen"): + sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '.'))) from overviewer_core import nbt diff --git a/setup.py b/setup.py index a0b8e35..cd1b7d0 100755 --- a/setup.py +++ b/setup.py @@ -105,7 +105,7 @@ if py2exe is not None: b = 3 else: b = 1 - setup_kwargs['options']['py2exe'] = {'bundle_files' : b, 'excludes': 'Tkinter'} + setup_kwargs['options']['py2exe'] = {'bundle_files' : b, 'excludes': 'Tkinter', 'includes':['fileinput', 'overviewer_core.items']} # # py2app options