rust/hgcli/pyoxidizer.bzl
branchstable
changeset 47865 95af358fcdfe
parent 47850 b962a913ee3b
child 47880 769cd5703b2c
equal deleted inserted replaced
47864:ad2c37075f46 47865:95af358fcdfe
    42 if extra_path is not None:
    42 if extra_path is not None:
    43     # extensions and hooks expect a working python environment
    43     # extensions and hooks expect a working python environment
    44     # We do not prepend the values because the Mercurial library wants to be in
    44     # We do not prepend the values because the Mercurial library wants to be in
    45     # the front of the sys.path to avoid picking up other installations.
    45     # the front of the sys.path to avoid picking up other installations.
    46     sys.path.extend(extra_path.split(os.pathsep))
    46     sys.path.extend(extra_path.split(os.pathsep))
       
    47 # Add user site to sys.path to load extensions without the full path
       
    48 if os.name == 'nt':
       
    49     vi = sys.version_info
       
    50     sys.path.append(
       
    51         os.path.join(
       
    52             os.environ['APPDATA'],
       
    53             'Python',
       
    54             'Python%d%d' % (vi[0], vi[1]),
       
    55             'site-packages',
       
    56         )
       
    57     )
    47 import hgdemandimport;
    58 import hgdemandimport;
    48 hgdemandimport.enable();
    59 hgdemandimport.enable();
    49 from mercurial import dispatch;
    60 from mercurial import dispatch;
    50 dispatch.run();
    61 dispatch.run();
    51 """
    62 """