mercurial/utils/resourceutil.py
branchstable
changeset 44146 9e367157a990
parent 44136 a90039b07343
child 44148 aab70b540d3d
equal deleted inserted replaced
44145:62111bc5ff87 44146:9e367157a990
    31 
    31 
    32 # the location of data files matching the source code
    32 # the location of data files matching the source code
    33 if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
    33 if mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app':
    34     # executable version (py2exe) doesn't support __file__
    34     # executable version (py2exe) doesn't support __file__
    35     datapath = os.path.dirname(pycompat.sysexecutable)
    35     datapath = os.path.dirname(pycompat.sysexecutable)
    36     _rootpath = os.path.dirname(datapath)
    36     _rootpath = datapath
    37 else:
    37 else:
    38     datapath = os.path.dirname(os.path.dirname(pycompat.fsencode(__file__)))
    38     datapath = os.path.dirname(os.path.dirname(pycompat.fsencode(__file__)))
    39     _rootpath = os.path.dirname(datapath)
    39     _rootpath = os.path.dirname(datapath)
    40 
    40 
    41 try:
    41 try: