setup.py
changeset 10123 52c98c6d7297
parent 10028 873d9b9a7bac
parent 10120 fb890a546d44
child 10126 78b8acae2088
equal deleted inserted replaced
10121:ac212bcc852b 10123:52c98c6d7297
   102                          stderr=subprocess.PIPE, env=env)
   102                          stderr=subprocess.PIPE, env=env)
   103     out, err = p.communicate()
   103     out, err = p.communicate()
   104     # If root is executing setup.py, but the repository is owned by
   104     # If root is executing setup.py, but the repository is owned by
   105     # another user (as in "sudo python setup.py install") we will get
   105     # another user (as in "sudo python setup.py install") we will get
   106     # trust warnings since the .hg/hgrc file is untrusted. That is
   106     # trust warnings since the .hg/hgrc file is untrusted. That is
   107     # fine, we don't want to load it anyway.
   107     # fine, we don't want to load it anyway.  Python may warn about
       
   108     # a missing __init__.py in mercurial/locale, we also ignore that.
   108     err = [e for e in err.splitlines()
   109     err = [e for e in err.splitlines()
   109            if not e.startswith('Not trusting file')]
   110            if not e.startswith('Not trusting file') \
       
   111               and not e.startswith('warning: Not importing')]
   110     if err:
   112     if err:
   111         return ''
   113         return ''
   112     return out
   114     return out
   113 
   115 
   114 version = ''
   116 version = ''