##// END OF EJS Templates
hg: don't attempt to extend `sys.path` with the user site without `APPDATA`...
Matt Harbison -
r48694:769cd570 stable
parent child Browse files
Show More
@@ -28,14 +28,16 b" if libdir != '@' 'LIBDIR' '@':"
28 # to the documentation.
28 # to the documentation.
29 if getattr(sys, 'frozen', None) == 'console_exe':
29 if getattr(sys, 'frozen', None) == 'console_exe':
30 vi = sys.version_info
30 vi = sys.version_info
31 sys.path.append(
31 appdata = os.environ.get('APPDATA')
32 os.path.join(
32 if appdata:
33 os.environ['APPDATA'],
33 sys.path.append(
34 'Python',
34 os.path.join(
35 'Python%d%d' % (vi[0], vi[1]),
35 appdata,
36 'site-packages',
36 'Python',
37 'Python%d%d' % (vi[0], vi[1]),
38 'site-packages',
39 )
37 )
40 )
38 )
39
41
40 from hgdemandimport import tracing
42 from hgdemandimport import tracing
41
43
@@ -47,14 +47,16 b' if extra_path is not None:'
47 # Add user site to sys.path to load extensions without the full path
47 # Add user site to sys.path to load extensions without the full path
48 if os.name == 'nt':
48 if os.name == 'nt':
49 vi = sys.version_info
49 vi = sys.version_info
50 sys.path.append(
50 appdata = os.environ.get('APPDATA')
51 os.path.join(
51 if appdata:
52 os.environ['APPDATA'],
52 sys.path.append(
53 'Python',
53 os.path.join(
54 'Python%d%d' % (vi[0], vi[1]),
54 appdata,
55 'site-packages',
55 'Python',
56 'Python%d%d' % (vi[0], vi[1]),
57 'site-packages',
58 )
56 )
59 )
57 )
58 import hgdemandimport;
60 import hgdemandimport;
59 hgdemandimport.enable();
61 hgdemandimport.enable();
60 from mercurial import dispatch;
62 from mercurial import dispatch;
General Comments 0
You need to be logged in to leave comments. Login now