rust/hgcli/pyoxidizer.bzl
branchstable
changeset 47880 769cd5703b2c
parent 47865 95af358fcdfe
child 47884 07f3f154e03a
equal deleted inserted replaced
47879:c1ed2c967fac 47880:769cd5703b2c
    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
    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;
    61 dispatch.run();
    63 dispatch.run();
    62 """
    64 """