mercurial/util.py
changeset 27764 dd0c5f4d1b53
parent 27755 50c5192e4a5e
child 27765 f1fb93eebb1d
equal deleted inserted replaced
27763:0ac5b7ee5dc2 27764:dd0c5f4d1b53
   884     return (safehasattr(sys, "frozen") or # new py2exe
   884     return (safehasattr(sys, "frozen") or # new py2exe
   885             safehasattr(sys, "importers") or # old py2exe
   885             safehasattr(sys, "importers") or # old py2exe
   886             imp.is_frozen("__main__")) # tools/freeze
   886             imp.is_frozen("__main__")) # tools/freeze
   887 
   887 
   888 # the location of data files matching the source code
   888 # the location of data files matching the source code
   889 if mainfrozen():
   889 if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
   890     # executable version (py2exe) doesn't support __file__
   890     # executable version (py2exe) doesn't support __file__
   891     datapath = os.path.dirname(sys.executable)
   891     datapath = os.path.dirname(sys.executable)
   892 else:
   892 else:
   893     datapath = os.path.dirname(__file__)
   893     datapath = os.path.dirname(__file__)
   894 
   894