comparison setup.py @ 15367:b357a972d6cd stable

setup: set env global earlier (3073)
author Matt Mackall <mpm@selenic.com>
date Wed, 26 Oct 2011 12:56:27 -0500
parents c41078b9d0b8
children eb6c0d47c3d5
comparison
equal deleted inserted replaced
15366:06b8db3f25c6 15367:b357a972d6cd
131 return '' 131 return ''
132 return out 132 return out
133 133
134 version = '' 134 version = ''
135 135
136 env = {'HGRCPATH': '', 'LANGUAGE': 'C'}
137
136 if os.path.isdir('.hg'): 138 if os.path.isdir('.hg'):
137 # Execute hg out of this directory with a custom environment which 139 # Execute hg out of this directory with a custom environment which
138 # includes the pure Python modules in mercurial/pure. We also take 140 # includes the pure Python modules in mercurial/pure. We also take
139 # care to not use any hgrc files and do no localization. 141 # care to not use any hgrc files and do no localization.
140 pypath = ['mercurial', os.path.join('mercurial', 'pure')] 142 pypath = ['mercurial', os.path.join('mercurial', 'pure')]
141 env = {'PYTHONPATH': os.pathsep.join(pypath), 143 env['PYTHONPATH'] = os.pathsep.join(pypath)
142 'HGRCPATH': '',
143 'LANGUAGE': 'C'}
144 if 'LD_LIBRARY_PATH' in os.environ: 144 if 'LD_LIBRARY_PATH' in os.environ:
145 env['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH'] 145 env['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH']
146 if 'SystemRoot' in os.environ: 146 if 'SystemRoot' in os.environ:
147 # Copy SystemRoot into the custom environment for Python 2.6 147 # Copy SystemRoot into the custom environment for Python 2.6
148 # under Windows. Otherwise, the subprocess will fail with 148 # under Windows. Otherwise, the subprocess will fail with