##// END OF EJS Templates
setup: show how to set the module policy for imports...
timeless -
r28431:a7e3b72c default
parent child Browse files
Show More
@@ -212,10 +212,17 b' if version:'
212 212 f.write('version = "%s"\n' % version)
213 213
214 214 try:
215 oldpolicy = os.environ.get('HGMODULEPOLICY', None)
216 os.environ['HGMODULEPOLICY'] = 'py'
215 217 from mercurial import __version__
216 218 version = __version__.version
217 219 except ImportError:
218 220 version = 'unknown'
221 finally:
222 if oldpolicy is None:
223 del os.environ['HGMODULEPOLICY']
224 else:
225 os.environ['HGMODULEPOLICY'] = oldpolicy
219 226
220 227 class hgbuild(build):
221 228 # Insert hgbuildmo first so that files in mercurial/locale/ are found
General Comments 0
You need to be logged in to leave comments. Login now