equal
deleted
inserted
replaced
52 urllibcompat, |
52 urllibcompat, |
53 ) |
53 ) |
54 from .utils import ( |
54 from .utils import ( |
55 compression, |
55 compression, |
56 procutil, |
56 procutil, |
|
57 resourceutil, |
57 stringutil, |
58 stringutil, |
58 ) |
59 ) |
59 |
60 |
60 base85 = policy.importmod('base85') |
61 base85 = policy.importmod('base85') |
61 osutil = policy.importmod('osutil') |
62 osutil = policy.importmod('osutil') |
1821 b.reverse() |
1822 b.reverse() |
1822 return pycompat.ossep.join(([b'..'] * len(a)) + b) or b'.' |
1823 return pycompat.ossep.join(([b'..'] * len(a)) + b) or b'.' |
1823 |
1824 |
1824 |
1825 |
1825 # the location of data files matching the source code |
1826 # the location of data files matching the source code |
1826 if procutil.mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app': |
1827 if resourceutil.mainfrozen() and getattr(sys, 'frozen', None) != 'macosx_app': |
1827 # executable version (py2exe) doesn't support __file__ |
1828 # executable version (py2exe) doesn't support __file__ |
1828 datapath = os.path.dirname(pycompat.sysexecutable) |
1829 datapath = os.path.dirname(pycompat.sysexecutable) |
1829 else: |
1830 else: |
1830 datapath = os.path.dirname(pycompat.fsencode(__file__)) |
1831 datapath = os.path.dirname(pycompat.fsencode(__file__)) |
1831 |
1832 |