##// END OF EJS Templates
hg: add user-site to `sys.path` on Windows to allow pip-installed extensions...
Matt Harbison -
r46670:feae6f6d default draft
parent child Browse files
Show More
@@ -21,6 +21,17 b" if libdir != '@' 'LIBDIR' '@':"
21 libdir = os.path.abspath(libdir)
21 libdir = os.path.abspath(libdir)
22 sys.path.insert(0, libdir)
22 sys.path.insert(0, libdir)
23
23
24 # Make `pip install --user ...` packages available to the official Windows
25 # build. Most py2 packaging installs directly into the system python
26 # environment, so no changes are necessary for other platforms. The Windows
27 # py2 package uses py2exe, which lacks a `site` module. Hardcode it according
28 # to the documentation.
29 if getattr(sys, 'frozen', None) == 'console_exe':
30 vi = sys.version_info
31 sys.path.append(os.path.join(os.environ['APPDATA'], 'Python',
32 'Python%d%d' % (vi[0], vi[1]),
33 'site-packages'))
34
24 from hgdemandimport import tracing
35 from hgdemandimport import tracing
25
36
26 with tracing.log('hg script'):
37 with tracing.log('hg script'):
General Comments 0
You need to be logged in to leave comments. Login now